/* ==========================================================================
   GIGVI "SUNLINE" DESIGN SYSTEM — the ONE system, imported by every page.
   Direction: sunlit paper, deep pine ink, a single sun-gold accent reserved
   exclusively for the primary action. Border-line motif instead of cards.
   Type: Space Grotesk (display) + Inter (body). Type-driven, zero stock.
   ========================================================================== */

:root {
  /* color */
  --bg: #FBF7EC;          /* warm sun-paper */
  --surface: #FFFFFF;
  --ink: #17322B;         /* deep pine */
  --muted: #48594F;       /* AA on --bg */
  --brand: #1E6B4C;       /* forest green — links, secondary marks */
  --accent: #F2B630;      /* sun gold — PRIMARY CTA ONLY */
  --accent-ink: #17322B;  /* text on gold */
  --line: #E3DCC4;        /* hairline on paper */
  --line-strong: #17322B; /* ink hairline (header motif) */
  --dark: #142A24;        /* dark panel */
  --dark-ink: #F3EEDF;    /* text on dark panel */
  --tint: #F3ECD8;        /* soft tint block */

  /* type */
  --font-display: "Space Grotesk", "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;

  /* motion */
  --dur-1: 160ms;
  --dur-2: 320ms;
  --ease: cubic-bezier(0.65, 0, 0.35, 1);

  /* measure */
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 7.2vw, 4.9rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.85rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 62ch; }
.lede { font-size: clamp(1.15rem, 2vw, 1.375rem); line-height: 1.5; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ---------- layout primitives ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.section + .section { border-top: 1px solid var(--line); }
.section--dark { background: var(--dark); color: var(--dark-ink); }
.section--dark h2, .section--dark h3 { color: var(--dark-ink); }
.section--dark p { color: color-mix(in srgb, var(--dark-ink) 82%, transparent); }
.section--tint { background: var(--tint); }

.grid-2 { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); }
@media (min-width: 56rem) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
@media (min-width: 56rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-3 > * { background: var(--bg); padding: clamp(1.25rem, 3vw, 2rem); }

/* ---------- numbered eyebrow (mono badge + label) ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.25rem;
}
.eyebrow .num {
  display: inline-grid; place-items: center;
  min-width: 2.1rem; height: 1.35rem; padding-inline: 0.35rem;
  background: var(--tint); border: 1px solid var(--line);
  border-radius: 999px; color: var(--brand);
  font-size: 0.72rem; letter-spacing: 0.06em;
}
.section--dark .eyebrow { color: var(--accent); }
.section--dark .eyebrow .num { background: transparent; border-color: color-mix(in srgb, var(--dark-ink) 30%, transparent); color: var(--accent); }

/* ---------- header: double hairline signature ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--line-strong);
}
.site-header::after {
  content: ""; display: block; height: 1px; background: var(--line-strong);
  position: absolute; left: 0; right: 0; bottom: -6px;
}
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 3.75rem; gap: 1rem; }
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: 0.02em; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.55rem;
}
.brand .sun { width: 1.05rem; height: 1.05rem; flex: none; }
.main-nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.4vw, 1.75rem); }
.main-nav a {
  font-family: var(--font-display); font-size: 0.92rem; font-weight: 500;
  color: var(--ink); text-decoration: none; padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { border-bottom-color: var(--brand); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.nav-toggle { display: none; }
@media (max-width: 47.99rem) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-display); font-weight: 500; font-size: 0.9rem;
    background: none; border: 1px solid var(--line-strong); border-radius: 999px;
    padding: 0.4rem 0.9rem; color: var(--ink); cursor: pointer;
  }
  .main-nav {
    display: none; position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0.25rem;
    background: var(--bg); border-bottom: 3px solid var(--line-strong);
    padding: 0.75rem var(--gutter) 1.25rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { font-size: 1.05rem; padding-block: 0.55rem; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: clip; border-bottom: 1px solid var(--line); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-in {
  position: relative; z-index: 1;
  min-height: min(86vh, 54rem);
  display: grid; align-content: center; gap: 2.25rem;
  padding-block: clamp(4rem, 10vh, 7rem);
}
@media (min-width: 64rem) {
  .hero-in { grid-template-columns: minmax(0, 1.55fr) minmax(14rem, 0.45fr); }
}
.hero-meta {
  align-self: center;
  border-left: 1px solid var(--line-strong);
  padding-left: 1.25rem;
  display: grid; gap: 1.1rem;
  font-family: var(--font-display); font-size: 0.86rem;
}
.hero-meta dt { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.15rem; }
.hero-meta dd { margin: 0; font-weight: 500; }
@media (max-width: 63.99rem) {
  .hero-meta { grid-template-columns: repeat(3, auto); border-left: 0; border-top: 1px solid var(--line-strong); padding: 1rem 0 0; gap: 1.5rem; }
}

/* ---------- buttons: gold = the one loud thing ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.5rem; border-radius: 0.55rem;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 2px 0 var(--line-strong); }
.btn--primary:hover { box-shadow: 0 4px 0 var(--line-strong); transform: translateY(-1px); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--tint); text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }
.btn .arr { transition: transform var(--dur-1) var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- sunline wipe: stacked bars threshold (signature divider) ---------- */
.sunline { display: grid; gap: 0; padding-block: 0.4rem; background: var(--bg); }
.sunline i { display: block; background: var(--brand); opacity: 0.85; }
.sunline i:nth-child(4n) { background: var(--accent); opacity: 1; }

/* ---------- trust strip ---------- */
.trust { border-block: 1px solid var(--line-strong); background: var(--surface); }
.trust-in { display: flex; flex-wrap: wrap; gap: 0; }
.trust-in > span {
  font-family: var(--font-display); font-size: 0.92rem; font-weight: 500;
  padding: 0.85rem 1.4rem; border-right: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 0.55rem;
}
.trust-in > span:first-child { padding-left: 0; }
.trust .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- feature rows (border-list, no cards) ---------- */
.rows { border-top: 1px solid var(--line-strong); }
.row {
  display: grid; gap: 0.5rem 2rem; padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 56rem) { .row { grid-template-columns: 3.2rem 1fr 1.3fr; align-items: baseline; } }
.row .idx { font-family: var(--font-display); font-size: 0.85rem; color: var(--brand); font-weight: 500; }
.row h3 { margin: 0; }
.row p { margin: 0; color: var(--muted); }

/* ---------- Elyneva app card (CSS-built, no raster) ---------- */
.appcard {
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: 1rem;
  padding: 1.4rem; max-width: 22rem;
  box-shadow: 0 10px 0 -4px var(--accent);
  transform: rotate(-1.5deg);
}
.appcard .apptop { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.appicon {
  width: 2.6rem; height: 2.6rem; border-radius: 0.7rem; flex: none;
  background: radial-gradient(circle at 30% 25%, var(--accent), var(--brand) 78%);
  position: relative;
}
.appicon::after { content: ""; position: absolute; inset: 28%; border-radius: 50%; background: var(--surface); }
.appcard .appname { font-family: var(--font-display); font-weight: 700; }
.appcard .appsub { font-size: 0.8rem; color: var(--muted); }
.metric { border-top: 1px solid var(--line); padding: 0.7rem 0; }
.metric:last-child { border-bottom: 1px solid var(--line); }
.metric b { font-family: var(--font-display); font-size: 0.86rem; display: block; }
.metric span { font-size: 0.8rem; color: var(--muted); display: block; margin-bottom: 0.4rem; }
.metric .bar { height: 0.42rem; border-radius: 999px; background: var(--tint); overflow: hidden; }
.metric .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--accent)); width: var(--w, 60%); }

/* ---------- fact table ---------- */
.facts { width: 100%; border-collapse: collapse; border-block: 1.5px solid var(--line-strong); }
.facts th, .facts td { text-align: left; padding: 0.85rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500; width: 38%; }
.facts td { font-weight: 500; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }

/* ---------- forms ---------- */
.form { display: grid; gap: 1.1rem; max-width: 34rem; }
.field label { display: block; font-family: var(--font-display); font-weight: 500; font-size: 0.9rem; margin-bottom: 0.35rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 0.55rem;
  padding: 0.75rem 0.9rem;
}
.field input:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; }
.field .err { display: none; color: #9C2B1B; font-size: 0.83rem; margin-top: 0.3rem; }
.field.invalid input, .field.invalid textarea { border-color: #9C2B1B; }
.field.invalid .err { display: block; }
.form-success {
  display: none; border: 1.5px solid var(--line-strong); border-radius: 0.75rem;
  background: var(--surface); padding: 1.5rem; max-width: 34rem;
}
.form-success.show { display: block; }
.checkmark { width: 3rem; height: 3rem; margin-bottom: 0.75rem; }
.checkmark circle { stroke: var(--brand); stroke-width: 2; fill: var(--tint); }
.checkmark path { stroke: var(--brand); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; }
.form-success.show .checkmark path { animation: draw 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- faq / legal lists ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq details:first-of-type { border-top: 1.5px solid var(--line-strong); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 500; color: var(--brand); transition: transform var(--dur-1) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 0.7rem; color: var(--muted); }
.legal h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-top: 2.4em; }
.legal h2:first-of-type { margin-top: 0; }
.legal ul { padding-left: 1.2em; max-width: 62ch; }
.legal li { margin-bottom: 0.4em; }

/* ---------- persistent mobile action bar ---------- */
.actionbar {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  display: none; gap: 1px; background: var(--line-strong);
  border-top: 1.5px solid var(--line-strong);
}
.actionbar a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 0.95rem 0.5rem calc(0.95rem + env(safe-area-inset-bottom));
  text-decoration: none;
}
.actionbar a.call { background: var(--accent); color: var(--accent-ink); }
.actionbar a.mail { background: var(--surface); color: var(--ink); }
@media (max-width: 47.99rem) {
  .actionbar { display: flex; }
  body { padding-bottom: 3.4rem; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-ink); border-top: 3px solid var(--accent); }
.site-footer a { color: var(--dark-ink); }
.footer-grid { display: grid; gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 56rem) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer h3 { color: var(--dark-ink); font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-legal { border-top: 1px solid color-mix(in srgb, var(--dark-ink) 22%, transparent); padding-block: 1.4rem 2rem; font-size: 0.8rem; color: color-mix(in srgb, var(--dark-ink) 68%, transparent); }
.footer-legal p { max-width: none; margin-bottom: 0.6em; }

/* ---------- reveal (progressive enhancement only) ---------- */
.js .rv { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .rv { opacity: 1; transform: none; }
}
