/* ============================================================
   NSOffice Glass UI - design tokens
   Fusion: NSOffice.AI brand (color, type) x Apple HIG (space,
   motion, UX) x Liquid Glass (surfaces).
   Link this one file. Fonts load from Google Fonts.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,700;9..40,800;9..40,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,300,0,0&display=swap');

:root {
  /* ---------- Brand color (NSOffice.AI wins all color conflicts) ---------- */
  --blue: #0000FE;            /* Electric Blue: the single anchor */
  --blue-hover: #1A1AFF;
  --blue-soft: #E8E8FF;       /* tint for selected states, chips */
  --lavender: #EEEBFF;        /* icon containers only */
  --ink: #2E343F;             /* primary text */
  --slate: #9AA7BC;           /* secondary text, strokes at low alpha */
  --bg: #FFFFFF;
  --bg-alt: #F7F8FC;          /* cool section alternation */
  --line: rgba(154, 167, 188, 0.25);

  /* Derived for dark contexts (brand has no official dark set; keep
     Electric Blue for fills, use bright blue for text/links on dark) */
  --blue-bright: #4D6BFF;
  --ink-dark-bg: #0B0E14;
  --ink-dark-surface: #141926;
  --text-on-dark: #F2F5FA;
  --text-on-dark-2: rgba(242, 245, 250, 0.62);

  /* ---------- Type (DM Sans everywhere; Apple's scale, brand's font) ---------- */
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-hero:    900 clamp(40px, 6vw, 64px)/1.05 var(--font);  /* Black */
  --text-title:   800 32px/1.15 var(--font);                    /* ExtraBold */
  --text-heading: 700 22px/1.25 var(--font);                    /* Bold */
  --text-body:    400 16px/1.55 var(--font);
  --text-medium:  500 15px/1.45 var(--font);
  --text-caption: 400 13px/1.4  var(--font);
  --text-light:   300 15px/1.55 var(--font);

  /* ---------- Space (Apple 4/8 rhythm wins all layout conflicts) ---------- */
  --space-xs: 4px;  --space-sm: 8px;  --space-md: 16px;
  --space-lg: 24px; --space-xl: 48px; --space-2xl: 96px;
  --content-max: 680px;    /* long-form reading width */
  --page-max: 1200px;

  /* ---------- Radii and shadow (soft, cool-tinted, generous) ---------- */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 980px;
  --shadow-card: 0 4px 24px rgba(46, 52, 63, 0.07), 0 1px 3px rgba(46, 52, 63, 0.05);
  --shadow-float: 0 16px 48px rgba(0, 0, 254, 0.10), 0 4px 12px rgba(46, 52, 63, 0.06);

  /* ---------- Motion (Apple micro-interactions) ---------- */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --t-fast: 0.2s var(--ease);
  --t-med: 0.3s var(--ease);
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font: var(--text-body); color: var(--ink); background: var(--bg); }
h1 { font: var(--text-hero); letter-spacing: -0.02em; }
h2 { font: var(--text-title); letter-spacing: -0.01em; }
h3 { font: var(--text-heading); }
.caption, small { font: var(--text-caption); color: var(--slate); }
a { color: var(--blue); text-decoration: none; transition: opacity var(--t-fast); }
a:hover { opacity: 0.75; }

/* ---------- Hive texture (faint hexagonal background motif) ---------- */
.hive {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 2 52 16v28L28 58 4 44V16z M28 60 52 74v28L28 116 4 102V74z' fill='none' stroke='%239AA7BC' stroke-opacity='0.10' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 97px;
}

/* ---------- Aurora mesh backdrop (gives glass something to bend) ----------
   Brand-hued blobs behind glass panels. Use inside a position:relative
   section with overflow:hidden; put .glass content above it. */
.aurora { position: absolute; inset: 0; filter: blur(60px) saturate(1.4); pointer-events: none; }
.aurora .blob { position: absolute; border-radius: 50%; width: max(48vmin, 320px); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: 0.85; }
.aurora .blob:nth-child(1) { left: 15%; top: 15%; background: radial-gradient(circle, #0000FE, transparent 70%); opacity: 0.35; }
.aurora .blob:nth-child(2) { left: 85%; top: 25%; background: radial-gradient(circle, #B9AEFF, transparent 70%); }
.aurora .blob:nth-child(3) { left: 30%; top: 85%; background: radial-gradient(circle, #7C96FF, transparent 70%); opacity: 0.55; }
.aurora .blob:nth-child(4) { left: 82%; top: 78%; background: radial-gradient(circle, #DDE4FF, transparent 70%); }

/* ---------- Glass materials (pair with liquid-glass.js) ----------
   .glass-light: default, for the white/lavender brand world
   .glass-dark: for dark showcase sections and hero imagery      */
.glass-light {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0.22));
  box-shadow:
    0 24px 60px rgba(46, 52, 63, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.85),
    inset 0 -8px 20px rgba(255, 255, 255, 0.20),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  color: var(--ink);
}
.glass-dark {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(11, 14, 20, 0.20), rgba(11, 14, 20, 0.34));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    inset 0 -8px 20px rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.13);
  color: var(--text-on-dark);
}

/* ---------- Flat-white fallback card (when there is nothing to refract) ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  transition: box-shadow var(--t-med), transform var(--t-med);
}
.card:hover { box-shadow: var(--shadow-float); transform: translateY(-2px); }

/* ---------- The One Decision Bar (hero motif; treat like a logo) ---------- */
.decision-bar {
  display: flex; align-items: center; gap: var(--space-sm);
  width: min(640px, 100%);
  padding: 10px 10px 10px 22px;
  border-radius: var(--radius-pill);
}
.decision-bar input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  font: var(--text-medium); color: inherit;
}
.decision-bar input::placeholder { color: var(--slate); }
.decision-bar .go {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); color: #fff; border: none; cursor: pointer;
  transition: transform var(--t-fast), filter var(--t-fast);
}
.decision-bar .go:hover { transform: scale(1.05); filter: brightness(1.15); }

/* ---------- Buttons (Apple pill, brand blue) ---------- */
.btn { display: inline-flex; align-items: center; gap: var(--space-sm);
  padding: 12px 24px; min-height: 44px; border-radius: var(--radius-pill);
  font: var(--text-medium); font-weight: 700; border: none; cursor: pointer;
  transition: transform var(--t-fast), filter var(--t-fast), background var(--t-fast); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { transform: scale(1.02); filter: brightness(1.12); }
.btn-secondary { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.btn-secondary:hover { background: var(--blue-soft); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg-alt); }

/* ---------- Lavender icon chip (Material Symbols, line style) ---------- */
.icon-chip {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--lavender); color: var(--blue);
}
.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* ---------- Motion primitives ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.6s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
