/* =========================================================================
   NODO Design System v2 — tokens-modern.css
   Apple.com clarity + Higgsfield.ai depth.
   Big tight typography, generous whitespace, soft shadows,
   one signature gradient hero, optional glass cards.
   ========================================================================= */

@import url('https://rsms.me/inter/inter.css');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* =====================================================================
     SURFACES — Apple-style near-white + Higgsfield-style deep dark
     ===================================================================== */
  --bg:              #ffffff;          /* primary canvas */
  --bg-soft:         #fbfbfd;          /* Apple section background */
  --bg-mute:         #f5f5f7;          /* Apple panel background */
  --bg-hairline:     #d2d2d7;          /* Apple divider */
  --bg-dark:         #000000;          /* hero / footer / dark sections */
  --bg-dark-2:       #0b0b0f;          /* card on dark */
  --bg-dark-3:       #16161c;          /* raised card on dark */
  --bg-dark-4:       #1f1f27;          /* inset on dark */

  /* Glass — Higgsfield-style translucent */
  --glass-light:     rgba(255,255,255,0.72);
  --glass-light-br:  rgba(0,0,0,0.06);
  --glass-dark:      rgba(20,20,26,0.55);
  --glass-dark-br:   rgba(255,255,255,0.08);

  /* =====================================================================
     INK
     ===================================================================== */
  --fg:              #1d1d1f;          /* Apple primary text */
  --fg-muted:        #6e6e73;          /* Apple secondary text */
  --fg-subtle:       #86868b;          /* Apple tertiary text */
  --fg-on-dark:      #f5f5f7;
  --fg-muted-dark:   #a1a1a6;
  --fg-subtle-dark:  #6e6e73;

  /* =====================================================================
     ACCENTS — keep NODO red as brand, add electric cyan for dark mode glow
     ===================================================================== */
  --brand:           #ff3b30;          /* punchier than retro red, iOS-ish */
  --brand-2:         #ff6b3d;          /* warm gradient pair */
  --brand-deep:      #c5261c;          /* hover */
  --link:            #0071e3;          /* Apple link blue */
  --link-hover:      #0077ed;
  --glow-cyan:       #00d4ff;          /* Higgsfield electric */
  --glow-violet:     #7d4cff;          /* Higgsfield purple */
  --success:         #30d158;
  --warning:         #ffd60a;
  --danger:          #ff453a;

  /* Signature gradients */
  --grad-hero:       linear-gradient(135deg, #ff3b30 0%, #7d4cff 55%, #00d4ff 100%);
  --grad-glow:       radial-gradient(60% 60% at 50% 0%, rgba(125,76,255,0.45) 0%, rgba(255,59,48,0.20) 35%, transparent 70%);
  --grad-card:       linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  --grad-mesh:       radial-gradient(at 20% 0%, rgba(125,76,255,0.25) 0px, transparent 50%),
                     radial-gradient(at 80% 0%, rgba(0,212,255,0.20) 0px, transparent 50%),
                     radial-gradient(at 50% 100%, rgba(255,59,48,0.18) 0px, transparent 50%);

  /* =====================================================================
     TYPOGRAPHY — Inter, sized like Apple
     ===================================================================== */
  --font-display:    'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --font-body:       'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --font-mono:       'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Type scale — Apple's hero is huge */
  --fs-xs:     12px;
  --fs-sm:     14px;
  --fs-base:   17px;        /* Apple body */
  --fs-md:     19px;
  --fs-lg:     21px;
  --fs-xl:     28px;
  --fs-2xl:    40px;
  --fs-3xl:    56px;
  --fs-4xl:    80px;
  --fs-5xl:    112px;       /* hero */

  --lh-tight:  1.05;
  --lh-snug:   1.15;
  --lh-base:   1.47;        /* Apple body */
  --lh-loose:  1.65;

  --ls-mega:   -0.04em;     /* Apple display tracks tight */
  --ls-tight:  -0.022em;
  --ls-base:   -0.01em;
  --ls-wide:   0.04em;
  --ls-eyebrow:0.16em;

  --fw-regular:400;
  --fw-medium: 500;
  --fw-semi:   600;
  --fw-bold:   700;
  --fw-black:  800;

  /* =====================================================================
     SPACING — 8px base
     ===================================================================== */
  --s-1:  4px;   --s-2:  8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;   --s-6: 32px;   --s-7: 48px;  --s-8: 64px;
  --s-9: 96px;   --s-10:128px;  --s-11:160px; --s-12:200px;

  /* =====================================================================
     RADII — Apple/Higgsfield rounded
     ===================================================================== */
  --r-1: 6px;
  --r-2: 12px;
  --r-3: 18px;
  --r-4: 24px;
  --r-5: 32px;
  --r-pill: 980px;

  /* =====================================================================
     SHADOWS — soft, blurred, layered (no hard offsets)
     ===================================================================== */
  --sh-1: 0 1px 2px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.03);
  --sh-2: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06);
  --sh-3: 0 4px 12px rgba(0,0,0,0.08), 0 24px 48px rgba(0,0,0,0.08);
  --sh-4: 0 12px 32px rgba(0,0,0,0.12), 0 32px 80px rgba(0,0,0,0.16);
  --sh-glow-brand: 0 0 0 1px rgba(255,59,48,0.20), 0 12px 60px rgba(255,59,48,0.35);
  --sh-glow-cyan:  0 0 0 1px rgba(0,212,255,0.20), 0 12px 60px rgba(0,212,255,0.35);
  --sh-glass:      0 1px 0 rgba(255,255,255,0.06) inset, 0 12px 40px rgba(0,0,0,0.45);

  /* =====================================================================
     MOTION — Apple's snappy default
     ===================================================================== */
  --ease-snap: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-ios:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t-fast:    160ms;
  --t-base:    280ms;
  --t-slow:    500ms;

  /* =====================================================================
     LAYOUT — Apple's 980 / 1200 max-widths
     ===================================================================== */
  --container-narrow: 692px;
  --container:        980px;
  --container-wide:   1200px;
  --gutter:           24px;
}

/* =========================================================================
   BASELINE
   ========================================================================= */

* { box-sizing: border-box; }

html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  font-weight: var(--fw-regular);
  letter-spacing: var(--ls-base);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

h1, .h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, var(--fs-5xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-mega);
  font-weight: var(--fw-bold);
  margin: 0 0 var(--s-5);
}

h2, .h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, var(--fs-3xl));
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-mega);
  font-weight: var(--fw-bold);
  margin: 0 0 var(--s-5);
}

h3, .h3 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  font-weight: var(--fw-semi);
  margin: 0 0 var(--s-4);
}

h4, .h4 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  font-weight: var(--fw-semi);
  margin: 0 0 var(--s-3);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--fg-muted);
}

p { margin: 0 0 var(--s-4); text-wrap: pretty; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-snap);
}
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 4px; }

code, kbd, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

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

/* =========================================================================
   UTILITIES
   ========================================================================= */
.display { font-family: var(--font-display); }
.mono    { font-family: var(--font-mono); }
.muted   { color: var(--fg-muted); }
.subtle  { color: var(--fg-subtle); }

.bg-white { background: var(--bg); }
.bg-soft  { background: var(--bg-soft); }
.bg-mute  { background: var(--bg-mute); }
.bg-dark  { background: var(--bg-dark); color: var(--fg-on-dark); }

.container        { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide   { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--gutter); }

/* Section rhythm — Apple uses big vertical gaps */
.section    { padding: var(--s-11) 0; }
.section-sm { padding: var(--s-9) 0; }

/* Glass card */
.glass {
  background: var(--glass-light);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-light-br);
  border-radius: var(--r-3);
}
.glass-dark {
  background: var(--glass-dark);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--glass-dark-br);
  border-radius: var(--r-3);
}

/* Gradient text — Higgsfield trick */
.text-gradient {
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Pill button — Apple/Higgsfield */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  letter-spacing: -0.01em;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-snap),
              background var(--t-fast) var(--ease-snap),
              box-shadow var(--t-fast) var(--ease-snap),
              color var(--t-fast) var(--ease-snap);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: #000; box-shadow: var(--sh-2); }

.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-deep); box-shadow: var(--sh-glow-brand); }

.btn-ghost { background: transparent; color: var(--fg); border-color: var(--bg-hairline); }
.btn-ghost:hover { border-color: var(--fg); }

.btn-on-dark { background: #fff; color: #000; }
.btn-on-dark:hover { box-shadow: var(--sh-glow-cyan); }

.btn-ghost-dark { background: transparent; color: var(--fg-on-dark); border-color: rgba(255,255,255,0.20); }
.btn-ghost-dark:hover { border-color: #fff; }

.btn-sm { padding: 9px 18px; font-size: var(--fs-sm); }
.btn-lg { padding: 18px 32px; font-size: var(--fs-md); }

/* Hairline divider */
.hr { height: 1px; background: var(--bg-hairline); border: 0; margin: 0; }
.hr-dark { height: 1px; background: rgba(255,255,255,0.10); border: 0; margin: 0; }

/* Focus ring — accessible */
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 4px;
}
