/* ============================================================
   Aphina homepage — site styles
   Editorial single-page layout on top of design-system tokens.
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- Container ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .container { padding: 0 20px; } }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--aphina-magenta);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--aphina-magenta);
  display: inline-block;
}
.eyebrow.no-rule::before { display: none; }
.eyebrow.muted { color: var(--color-fg-tertiary); }
.eyebrow.muted::before { background: var(--color-fg-tertiary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 600;
  padding: 12px 20px;
  border-radius: 6px;
  border: 0.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition:
    background var(--dur-base) var(--ease-standard),
    color var(--dur-base) var(--ease-standard),
    border-color var(--dur-base) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard);
}
.btn:active { transform: scale(0.98); }
.btn-lg { padding: 16px 26px; font-size: 15px; }
.btn-primary { background: var(--aphina-magenta); color: #fff; }
.btn-primary:hover { background: var(--aphina-magenta-600); }
.btn-primary .btn-arrow { transition: transform var(--dur-base) var(--ease-emphasized); }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--color-fg); border-color: var(--color-border); }
.btn-ghost:hover { background: var(--color-surface-sunken); border-color: var(--color-border-strong); }
.btn-onDark {
  background: #fff; color: var(--color-fg);
}
.btn-onDark:hover { background: var(--aphina-magenta); color: #fff; }

/* ---------- Nav ---------- */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--color-border-hairline);
}
.nav {
  display: flex; align-items: center;
  height: 72px;
  gap: 32px;
}
.nav-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { height: 20px; }
.nav-spacer { flex: 1; }
.nav-meta {
  font-family: var(--font-ui); font-size: 12.5px;
  color: var(--color-fg-secondary);
  letter-spacing: 0.04em;
}
.nav-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--aphina-emerald); display: inline-block; margin-right: 8px; vertical-align: middle; box-shadow: 0 0 0 4px rgba(16,185,129,0.12); }
@media (max-width: 720px) { .nav-meta { display: none; } }
/* Hide header entirely on mobile — brand wordmark already appears above the H1 */
@media (max-width: 720px) {
  .nav-wrap { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; }
.hero-inner { padding: 96px 0 120px; position: relative; }
@media (max-width: 880px) { .hero-inner { padding: 96px 0 80px; } }
@media (max-width: 720px) { .hero-inner { padding: 112px 0 72px; } }

/* Hero brand wordmark sits above the H1 */
.hero-logo {
  height: 36px;
  width: auto;
  display: block;
  margin: 0 0 48px;
}
.hero-logo--center { margin-left: auto; margin-right: auto; }
@media (max-width: 720px) {
  .hero-logo { height: 28px; margin-bottom: 32px; }
}

/* Hero title — editorial, balance-wrapped */
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 8.6vw, 124px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--color-fg);
  text-wrap: balance;
}
.hero-title .accent {
  position: relative;
  background-image: linear-gradient(180deg, transparent 70%, rgba(255,27,109,0.32) 70%);
  padding: 0 4px;
}
.hero-title .accent-magenta { color: var(--aphina-magenta); background-image: none; padding: 0; }
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-fg-secondary);
  margin: 36px 0 0;
  max-width: 720px;
  text-wrap: balance;
}
.hero-tagline strong {
  color: var(--color-fg);
  font-weight: 600;
}
.hero-ctas {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 48px;
  align-items: center;
}
.hero-meta {
  margin-top: 18px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--color-fg-tertiary);
}

/* Hero background filigree */
.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(26,26,26,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26,26,26,0.045) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero-glow {
  position: absolute;
  width: 720px; height: 720px;
  right: -160px; top: -240px;
  background: radial-gradient(circle at center, rgba(255,27,109,0.10), transparent 60%);
  pointer-events: none;
}
.hero-mark-bg {
  position: absolute;
  right: -120px; bottom: -160px;
  width: 720px; height: 720px;
  pointer-events: none;
  opacity: 0.04;
}
.hero-mark-bg img { width: 100%; height: 100%; object-fit: contain; }

/* Hero — meta row (above title) */
.hero-meta-row {
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.hero-meta-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui);
  font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-fg-secondary);
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 0.5px solid var(--color-border-hairline);
}
.hero-meta-pill .pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--aphina-magenta);
  box-shadow: 0 0 0 4px rgba(255,27,109,0.15);
}

/* Hero — variant: split */
.hero-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: end; }
.hero-split .hero-aside { padding-bottom: 12px; }
@media (max-width: 980px) { .hero-split { grid-template-columns: 1fr; gap: 48px; } }

/* Hero — variant: centered */
.hero-centered { text-align: center; max-width: 1100px; margin: 0 auto; }
.hero-centered .eyebrow { display: inline-flex; }
.hero-centered .hero-tagline { margin-left: auto; margin-right: auto; }
.hero-centered .hero-ctas { justify-content: center; }

/* Hero aside (split variant): runs of small label/value */
.hero-aside {
  font-family: var(--font-sans);
}
.aside-line {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-top: 0.5px solid var(--color-border-hairline);
  align-items: baseline;
}
.aside-line:last-child { border-bottom: 0.5px solid var(--color-border-hairline); }
.aside-line .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-fg-tertiary);
}
.aside-line .val {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 500;
  color: var(--color-fg);
  letter-spacing: -0.005em;
}
.aside-line .val em { font-style: normal; color: var(--aphina-magenta); font-weight: 600; }

/* ============================================================
   PILLARS — "Why Aphina"
   ============================================================ */
.section { padding: 120px 0; }
@media (max-width: 880px) { .section { padding: 80px 0; } }
.section--mist { background: var(--aphina-mist); border-top: 0.5px solid var(--color-border-hairline); border-bottom: 0.5px solid var(--color-border-hairline); }

.section-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 72px;
}
@media (max-width: 880px) { .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; } }
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 18px 0 0;
  color: var(--color-fg);
  text-wrap: balance;
}
.section-title .accent-magenta { color: var(--aphina-magenta); }
.section-deck {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--color-fg-secondary);
  margin: 0;
  max-width: 460px;
}

/* ---- Pillars : numbered editorial (default) ---- */
.pillars-num {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 0.5px solid var(--color-border);
}
.pillars-num .pillar {
  padding: 40px 36px 40px 0;
  border-right: 0.5px solid var(--color-border-hairline);
  position: relative;
}
.pillars-num .pillar:last-child { border-right: none; padding-right: 0; }
.pillars-num .pillar .num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--aphina-magenta);
  font-weight: 600;
}
.pillars-num .pillar .ptitle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 28px 0 16px;
  color: var(--color-fg);
  max-width: 280px;
  text-wrap: balance;
}
.pillars-num .pillar .pdesc {
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--color-fg-secondary);
  margin: 0;
  max-width: 320px;
}
@media (max-width: 880px) {
  .pillars-num { grid-template-columns: 1fr; }
  .pillars-num .pillar { border-right: none; border-bottom: 0.5px solid var(--color-border-hairline); padding: 28px 0; }
  .pillars-num .pillar:last-child { border-bottom: none; }
}

/* ---- Pillars : cards ---- */
.pillars-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pillars-cards .pcard {
  background: var(--color-surface);
  border: 0.5px solid var(--color-border-hairline);
  border-radius: 14px;
  padding: 32px;
  position: relative;
  transition: box-shadow var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
  display: flex; flex-direction: column; gap: 20px;
  min-height: 320px;
}
.pillars-cards .pcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,27,109,0.22);
}
.pcard-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--aphina-magenta-100);
  color: var(--aphina-magenta);
  display: inline-flex; align-items: center; justify-content: center;
}
.pcard-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-fg-tertiary);
  margin-bottom: 0;
}
.pcard-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 23px;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--color-fg);
  margin: 0;
  text-wrap: balance;
}
.pcard-desc {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--color-fg-secondary);
  margin: 0;
  flex: 1;
}
@media (max-width: 980px) { .pillars-cards { grid-template-columns: 1fr; } }

/* ---- Pillars : rows (editorial split) ---- */
.pillars-rows { display: flex; flex-direction: column; }
.pillars-rows .prow {
  display: grid;
  grid-template-columns: 80px 1fr 1.4fr;
  gap: 56px;
  padding: 48px 0;
  border-top: 0.5px solid var(--color-border);
  align-items: start;
}
.pillars-rows .prow:last-child { border-bottom: 0.5px solid var(--color-border); }
.pillars-rows .prow .prow-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--aphina-magenta);
  font-weight: 600;
  padding-top: 8px;
}
.pillars-rows .prow .prow-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--color-fg);
  text-wrap: balance;
}
.pillars-rows .prow .prow-desc {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--color-fg-secondary);
  margin: 0;
  max-width: 540px;
}
@media (max-width: 880px) {
  .pillars-rows .prow { grid-template-columns: 1fr; gap: 16px; padding: 32px 0; }
}

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: var(--aphina-graphite);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-band-inner {
  padding: 120px 0;
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: end;
}
.cta-band-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 18px 0 0;
  color: #fff;
  text-wrap: balance;
  max-width: 720px;
}
.cta-band-title .accent { background-image: linear-gradient(180deg, transparent 70%, rgba(255,27,109,0.45) 70%); padding: 0 4px; }
.cta-band-sub {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.65);
  margin: 0 0 28px;
  max-width: 460px;
}
.cta-band-sub .u-benefit {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--aphina-magenta);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.cta-band-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band-bg {
  position: absolute;
  top: -240px; right: -180px;
  width: 720px; height: 720px;
  background: radial-gradient(circle at center, rgba(255,27,109,0.22), transparent 60%);
  pointer-events: none;
}
.cta-band-mark {
  position: absolute;
  bottom: -120px; right: -80px;
  opacity: 0.06;
  width: 520px; height: 520px;
  pointer-events: none;
}
.cta-band-mark img { width: 100%; height: 100%; object-fit: contain; }
.cta-band-email {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  margin-top: 28px;
  display: inline-flex; align-items: center; gap: 8px;
}
.cta-band-email a { color: #fff; text-decoration: none; border-bottom: 0.5px solid rgba(255,255,255,0.3); padding-bottom: 1px; }
.cta-band-email a:hover { color: var(--aphina-magenta); border-color: var(--aphina-magenta); }
@media (max-width: 880px) {
  .cta-band-inner { grid-template-columns: 1fr; padding: 80px 0; gap: 32px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #0F0F10;
  color: rgba(255,255,255,0.6);
  padding: 56px 0 32px;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-bottom: 32px;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand img { height: 18px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  color: rgba(255,255,255,0.65);
  font-family: var(--font-ui);
  font-size: 13px;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-standard);
}
.footer-links a:hover { color: #fff; }
.footer-tag {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.5);
}
.footer-base {
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
  padding-top: 24px;
  flex-wrap: wrap;
}

/* ============================================================
   Tweaks overrides — dark surface mode
   ============================================================ */
body.theme-dark .nav-wrap { background: rgba(15,15,16,0.78); border-color: rgba(255,255,255,0.06); }
body.theme-dark .nav-meta { color: rgba(255,255,255,0.55); }

/* Hide hero filigree mark when tweak is off */
body.no-accent-mark .hero-mark-bg,
body.no-accent-mark .hero-glow,
body.no-accent-mark .hero-grid { display: none; }
body.no-accent-mark .cta-band-mark { display: none; }
