/* =========================================================================
   Nexon LLC — landing page styles
   Editorial-minimal: Fraunces (display) + Hanken Grotesk (body), emerald/teal
   ========================================================================= */

:root {
  /* Color tokens */
  --bg:           #f6f9f7;   /* subtle cool off-white */
  --surface:      #ffffff;
  --surface-2:    #eef4f1;   /* alt section background */
  --ink:          #0c1512;   /* near-black, green-tinted */
  --ink-soft:     #2c3a35;
  --muted:        #5d6b65;   /* muted body text */
  --line:         rgba(10, 30, 24, 0.09);
  --line-strong:  rgba(10, 30, 24, 0.16);

  --accent:       #10b981;   /* emerald — accents, icons, glow */
  --accent-2:     #0d9488;   /* teal */
  --accent-strong:#047857;   /* deep emerald — buttons (AA text contrast) */
  --accent-deep:  #06241f;   /* very deep teal-green — dark band */

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Shape & depth */
  --radius:       16px;
  --radius-sm:    11px;
  --shadow-sm:    0 1px 2px rgba(10, 30, 24, .05), 0 2px 8px rgba(10, 30, 24, .04);
  --shadow-md:    0 10px 30px -12px rgba(10, 30, 24, .18);
  --shadow-lg:    0 30px 60px -20px rgba(6, 60, 48, .28);

  --container:    1120px;
  --ease:         cubic-bezier(.22, 1, .36, 1);
}

/* ---------------------------------- reset --------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* faint grain texture for atmosphere */
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(16, 185, 129, .07), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2.5px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------------------- layout ---------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}
.container.narrow { max-width: 760px; }

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.section-sub { color: var(--muted); margin-top: 16px; font-size: 1.08rem; }

.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 14px;
}

.grid { display: grid; gap: clamp(18px, 2.5vw, 26px); }

/* -------------------------------- buttons --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 10px 20px; font-size: .95rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(4, 120, 87, .8);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(4, 120, 87, .85); }

.btn-ghost { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent-strong); }

.btn-light { background: #fff; color: var(--accent-deep); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .4); }

/* -------------------------------- header ---------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 249, 247, .72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark { display: grid; place-items: center; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) {
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  transition: color .2s var(--ease);
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------- hero ----------------------------------- */
.hero { position: relative; padding: clamp(60px, 10vw, 120px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero-glow {
  position: absolute;
  top: -200px; left: 50%;
  width: 900px; height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(16, 185, 129, .22), rgba(13, 148, 136, .08) 55%, transparent 75%);
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}
.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-top: 6px;
}
.hero-title em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(120deg, var(--accent-strong), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 600px;
  margin-top: 24px;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 34px; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.hero-note em { font-style: normal; opacity: .7; }

/* hero product mockup */
.hero-visual {
  width: 100%;
  max-width: 940px;
  margin-top: clamp(48px, 7vw, 80px);
  perspective: 1600px;
}
.window {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotateX(7deg);
  transform-origin: center top;
}
.window-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.window-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.window-bar .dot:nth-child(1) { background: #f0a9a0; }
.window-bar .dot:nth-child(2) { background: #f2cf8c; }
.window-bar .dot:nth-child(3) { background: #9bd6a8; }
.window-url {
  margin-left: 14px;
  font-size: .8rem;
  color: var(--muted);
  background: var(--bg);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.window-body { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 22px; text-align: left; }

.mock-side { display: flex; flex-direction: column; gap: 12px; }
.mock-pill { height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); width: 70%; }
.mock-line { height: 11px; border-radius: 6px; background: var(--surface-2); }
.mock-line.short { width: 55%; }

.mock-main { display: flex; flex-direction: column; gap: 20px; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mock-stat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.mock-stat b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; display: block; }
.mock-stat small { color: var(--muted); font-size: .8rem; }

.mock-chart {
  display: flex; align-items: flex-end; gap: 12px;
  height: 150px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.mock-chart span {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(to top, var(--accent-2), var(--accent));
  opacity: .9;
}
.mock-chart span:last-child { background: linear-gradient(to top, var(--accent-strong), var(--accent)); }

/* ------------------------------- social proof ----------------------------- */
.logos { padding: clamp(40px, 6vw, 64px) 0; border-bottom: 1px solid var(--line); }
.logos-label { text-align: center; font-size: .85rem; color: var(--muted); letter-spacing: .04em; }
.logos-label em { font-style: normal; opacity: .6; }
.logos-row {
  display: flex; flex-wrap: wrap;
  justify-content: center; align-items: center;
  gap: clamp(28px, 6vw, 64px);
  margin-top: 28px;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
  opacity: .35;
  letter-spacing: -0.01em;
  transition: opacity .25s var(--ease);
}
.logos-row:hover .logo-text { opacity: .22; }
.logos-row .logo-text:hover { opacity: .65; }

/* ------------------------------- feature cards ---------------------------- */
.features-grid { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16,185,129,.14), rgba(13,148,136,.14));
  color: var(--accent-strong);
  margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; }
.card p { color: var(--muted); margin-top: 10px; font-size: .98rem; }

/* --------------------------------- steps ---------------------------------- */
.steps-grid { grid-template-columns: repeat(3, 1fr); }
.step { padding: 8px 4px; }
.step-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 500;
  font-style: italic;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 14px;
}
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; }
.step p { color: var(--muted); margin-top: 8px; }

/* ----------------------------- testimonials (when re-enabled) ------------- */
.testimonials-grid { grid-template-columns: repeat(3, 1fr); }
.quote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.quote blockquote { font-family: var(--font-display); font-size: 1.18rem; line-height: 1.45; font-style: italic; }
.quote figcaption { margin-top: 18px; display: flex; flex-direction: column; }
.quote figcaption b { font-weight: 600; }
.quote figcaption span { color: var(--muted); font-size: .9rem; }

/* ---------------------------------- FAQ ----------------------------------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.faq-item[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; width: 18px; height: 18px; flex: none; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 14px; height: 2px; border-radius: 2px;
  background: var(--accent-strong);
  transform: translate(-50%, -50%);
  transition: transform .3s var(--ease);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0); }
.faq-body { padding: 0 22px 22px; color: var(--muted); }
.faq-body a { color: var(--accent-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------- CTA band --------------------------------- */
.cta-band {
  background:
    radial-gradient(800px 400px at 20% 0%, rgba(16, 185, 129, .28), transparent 60%),
    linear-gradient(135deg, var(--accent-deep), #0a3a32);
  color: #fff;
}
.cta-inner { text-align: center; padding: clamp(64px, 9vw, 110px) 0; display: flex; flex-direction: column; align-items: center; }
.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.cta-band p { color: rgba(255, 255, 255, .82); margin-top: 16px; max-width: 480px; font-size: 1.1rem; }
.cta-band .btn-light { margin-top: 32px; }

/* --------------------------------- footer --------------------------------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .68); padding-top: clamp(56px, 7vw, 80px); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.site-footer .brand-name { color: #fff; }
.footer-tag { margin-top: 16px; max-width: 260px; font-size: .95rem; }
.footer-col h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; font-weight: 600; }
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: .98rem; transition: color .2s var(--ease); width: fit-content; }
.footer-col a:hover { color: #fff; }
.footer-col a[aria-disabled="true"] { opacity: .55; cursor: default; }
.footer-col a em { font-style: normal; opacity: .6; font-size: .85em; }

.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 26px 0;
  font-size: .9rem;
}
.footer-bottom a { transition: color .2s var(--ease); }
.footer-bottom a:hover { color: #fff; }

/* ------------------------------ scroll reveal ----------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--rd, 0) * 90ms);
}
.reveal.in { opacity: 1; transform: none; }

/* hero uses fixed stagger via data-delay (set by JS as --rd) */

/* ------------------------------ responsive -------------------------------- */
@media (max-width: 900px) {
  .features-grid, .steps-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 70px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    padding: 18px clamp(20px, 5vw, 40px) 26px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    transition: transform .38s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links .btn { margin-top: 10px; }

  .window-body { grid-template-columns: 1fr; }
  .mock-side { flex-direction: row; flex-wrap: wrap; }
  .mock-side .mock-line { flex: 1 1 40%; }
}

@media (max-width: 560px) {
  .features-grid, .steps-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .window { transform: none; }
  .mock-stats { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: flex-start; }
}

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