/* ============================================================
   InfluencerKey — Redesign
   Design system: minimal & editorial, warm-neutral palette
   ============================================================ */

:root {
  /* ---- Color tokens ---- */
  --paper:        #FAF9F6;   /* warm white background      */
  --paper-2:      #F2F0EA;   /* subtle section tint        */
  --surface:      #FFFFFF;   /* cards                      */
  --ink:          #1A1A1A;   /* near-black text            */
  --ink-soft:     #5C584F;   /* muted body text            */
  --ink-faint:    #8C877C;   /* captions / meta            */
  --accent:       #C8553D;   /* terracotta — the "key"     */
  --accent-dark:  #A8432E;
  --line:         rgba(26, 26, 26, 0.10);
  --line-soft:    rgba(26, 26, 26, 0.06);

  /* ---- Typography ---- */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-serif:   "Fraunces", Georgia, serif;

  /* ---- Spacing scale (8pt grid) ---- */
  --sp-1: 8px;  --sp-2: 16px; --sp-3: 24px; --sp-4: 40px;
  --sp-5: 64px; --sp-6: 96px; --sp-7: 128px;

  /* ---- Radii & shadow ---- */
  --r-sm: 8px;  --r-md: 14px; --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(26,26,26,.04), 0 4px 14px rgba(26,26,26,.05);
  --shadow-md: 0 8px 30px rgba(26,26,26,.08);

  --maxw: 1140px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: var(--sp-7); }
.section--tint { background: var(--paper-2); }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); }
.eyebrow {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: var(--accent); display: inline-block; }
.display { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 56ch; }
.muted { color: var(--ink-soft); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: 999px;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { border: 1.5px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---- Header / Nav ---- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), padding .3s var(--ease);
}
.site-header.scrolled {
  background: rgba(250,249,246,.85);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line-soft);
  padding-block: 12px;
}
.brand { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 9px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-size: 15px; color: var(--ink-soft); transition: color .2s var(--ease); position: relative; }
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1.5px; width: 0;
  background: var(--accent); transition: width .25s var(--ease);
}
.nav a:not(.btn):hover::after, .nav a.active:not(.btn)::after { width: 100%; }
.nav-cta { margin-left: 6px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: .3s var(--ease); }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); transition: .3s var(--ease); }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
body.nav-open .nav-toggle span::after  { top: 0; transform: rotate(-45deg); }

/* ---- Hero ---- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero__bg {
  position: absolute; inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(40% 50% at 78% 22%, rgba(200,85,61,.20), transparent 70%),
    radial-gradient(45% 55% at 12% 78%, rgba(200,85,61,.12), transparent 70%),
    radial-gradient(60% 60% at 50% 50%, rgba(242,240,234,.7), transparent 75%);
  filter: blur(8px);
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero__inner { max-width: 880px; }
.hero h1 { margin: 22px 0 22px; }
.hero .lead { margin-bottom: 36px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__trust { margin-top: 56px; display: flex; align-items: center; gap: 18px; color: var(--ink-faint); font-size: 14px; }
.hero__trust .line { width: 40px; height: 1px; background: var(--line); }
.scroll-hint {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  z-index: 1; color: var(--ink-faint); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-hint .mouse { width: 22px; height: 36px; border: 1.5px solid var(--line); border-radius: 14px; position: relative; }
.scroll-hint .mouse::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 6px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); animation: wheel 1.6s var(--ease) infinite; }
@keyframes wheel { 0%{opacity:0;transform:translate(-50%,0)} 30%{opacity:1} 100%{opacity:0;transform:translate(-50%,12px)} }

/* ---- Section heading block ---- */
.head { max-width: 720px; margin-bottom: var(--sp-5); }
.head .h2 { margin: 16px 0 14px; }

/* ---- Services ---- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 34px 30px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--line); }
.card__icon { width: 52px; height: 52px; border-radius: 14px; background: var(--paper-2); display: grid; place-items: center; color: var(--accent); margin-bottom: 22px; }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 15.5px; }

/* ---- Process ---- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding-top: 18px; }
.step__num { font-family: var(--font-serif); font-size: 2.4rem; color: var(--accent); line-height: 1; }
.step__num::before { counter-increment: step; content: "0" counter(step); }
.step h3 { font-size: 1.15rem; margin: 14px 0 8px; }
.step p { color: var(--ink-soft); font-size: 15px; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 40px; right: -11px; width: 22px; height: 1px; background: var(--line); }

/* ---- About + stats ---- */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.about p { color: var(--ink-soft); margin-bottom: 18px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat { background: var(--surface); padding: 30px 26px; }
.stat__num { font-family: var(--font-serif); font-size: 2.6rem; line-height: 1; color: var(--ink); }
.stat__num span { color: var(--accent); }
.stat__label { color: var(--ink-faint); font-size: 14px; margin-top: 8px; }

/* ---- Contact ---- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact .lead { margin-top: 16px; }
.contact__mail { margin-top: 24px; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.contact__mail a { color: var(--accent); border-bottom: 2px solid transparent; transition: border-color .2s var(--ease); }
.contact__mail a:hover { border-color: var(--accent); }
.form { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; letter-spacing: .01em; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 13px 15px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,85,61,.12); }
.field textarea { resize: vertical; min-height: 120px; }
.form .btn { width: 100%; justify-content: center; margin-top: 6px; }
.form__note { font-size: 13px; color: var(--ink-faint); margin-top: 14px; text-align: center; }
.form__ok { display: none; background: rgba(200,85,61,.10); color: var(--accent-dark); border: 1px solid rgba(200,85,61,.25); border-radius: var(--r-sm); padding: 14px; font-size: 14px; margin-bottom: 16px; }
.form__ok.show { display: block; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: rgba(250,249,246,.7); padding-block: var(--sp-5) var(--sp-3); }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: var(--sp-4); border-bottom: 1px solid rgba(250,249,246,.12); }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--paper); display: inline-flex; align-items: center; gap: 9px; }
.footer-brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { color: var(--paper); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; font-family: var(--font-display); }
.footer-col a { display: block; color: rgba(250,249,246,.7); font-size: 15px; padding: 5px 0; transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--paper); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: var(--sp-3); font-size: 13.5px; color: rgba(250,249,246,.55); }
.social { display: flex; gap: 14px; }
.social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(250,249,246,.2); display: grid; place-items: center; color: rgba(250,249,246,.8); transition: .25s var(--ease); }
.social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- Reveal animation ---- */
/* Hidden state only applies when <html> has .anim (added by JS).
   If JS fails to load, content stays fully visible — never blank. */
html.anim .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.anim .reveal.in { opacity: 1; transform: none; }
html.anim .reveal[data-d="1"] { transition-delay: .08s; }
html.anim .reveal[data-d="2"] { transition-delay: .16s; }
html.anim .reveal[data-d="3"] { transition-delay: .24s; }

/* ---- Responsive ---- */
@media (max-width: 940px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:not(:last-child)::after { display: none; }
  .about, .contact { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding-block: var(--sp-6); }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px;
    background: var(--paper); padding: 40px;
    transform: translateX(100%); transition: transform .35s var(--ease);
    box-shadow: -20px 0 60px rgba(26,26,26,.12);
  }
  body.nav-open .nav { transform: none; }
  .nav a { font-size: 20px; }
  .nav-cta { margin-left: 0; }
  .hero { min-height: 92vh; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
