/* ==========================================================================
   FinApt Group — Base Styles
   Reset, global typography, and foundational element styles.
   ========================================================================== */

/* ── Google Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* ── Modern Reset ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-body-bg);
  overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--color-dark-1);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
}

h4, h5, h6 {
  font-family: var(--font-family);
  color: var(--color-dark-1);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
}

h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  line-height: var(--lh-h1);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-h2);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h3);
}

h4 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h4);
}

h5 {
  font-size: var(--fs-h5);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h4);
}

h6 {
  font-size: var(--fs-h6);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h4);
}

p {
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-accent-1);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-dark-2);
}

strong, b {
  font-weight: var(--fw-semibold);
}

small {
  font-size: var(--fs-small);
}

/* ── Lists ────────────────────────────────────────────────────────── */
ul, ol {
  list-style: none;
}

/* ── Images ───────────────────────────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Selection ────────────────────────────────────────────────────── */
::selection {
  background-color: var(--color-accent-1);
  color: var(--color-light-1);
}

/* ── Focus Styles ─────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-accent-1);
  outline-offset: 2px;
}

/* ── Utility Classes ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-white  { color: var(--color-light-1); }
.text-muted  { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent-1); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Overline Label ───────────────────────────────────────────────── */
.overline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family);
  font-size: var(--fs-overline);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent-1);
  margin-bottom: var(--space-2);
}

.overline::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-1), var(--color-accent-3));
  border-radius: 1px;
}

/* ── Section Header Pattern ───────────────────────────────────────── */
.section-header {
  max-width: var(--content-max);
  margin-bottom: 36px;
}

.section-header.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header.centered .overline {
  justify-content: center;
}

.section-header p {
  font-size: var(--fs-body);
  margin-top: var(--space-1);
}

/* ── Scroll Reveal Animation ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Clip reveal variant */
.reveal--clip {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal--clip.revealed {
  clip-path: inset(0 0 0 0);
}

/* Scale reveal variant */
.reveal--scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal--scale.revealed {
  opacity: 1;
  transform: scale(1);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.25s; }
.reveal-delay-4 { transition-delay: 0.35s; }
.reveal-delay-5 { transition-delay: 0.45s; }
.reveal-delay-6 { transition-delay: 0.55s; }
