/* Newshine — design tokens */
:root {
  --ns-page-bg: #0B0B0C;
  --ns-ink: #F2F2EE;
  --ns-ink-soft: #8A8A90;
  --ns-rule: #1c1c1f;

  --ns-accent: #E89A3C;
  --ns-accent-hover: #B97524;
  --ns-accent-warm: #F2A94B;
  --ns-accent-bright: #FFD08A;

  /* hero / products / why / contact / footer */
  --inv-bg: #F2F2EE;
  --inv-fg: #0B0B0C;
  --inv-meta: #6B6B70;
  --inv-rule: #E7E7EA;
  --inv-surface-2: #ECECE8;

  /* now — opposite of the dominant sections */
  --now-bg: #18181B;
  --now-fg: #F2F2EE;
  --now-rule: #2A2A2E;
  --now-meta: #8A8A90;

  --font-display: "Manrope", system-ui, sans-serif;
  --font-mark: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* layout: content capped at 1280, gutter grows beyond that */
  --max-width: 1280px;
  --gutter: max(48px, calc((100vw - var(--max-width)) / 2));
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ns-page-bg: #F2F2EE;
    --ns-ink: #0B0B0C;
    --ns-ink-soft: #6B6B70;
    --ns-rule: #E7E7EA;

    --inv-bg: #0B0B0C;
    --inv-fg: #F2F2EE;
    --inv-meta: #8A8A90;
    --inv-rule: #1c1c1f;
    --inv-surface-2: #18181B;

    --now-bg: #ECECE8;
    --now-fg: #0B0B0C;
    --now-rule: #D6D6D2;
    --now-meta: #6B6B70;
  }
}

/* base */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ns-page-bg);
  color: var(--ns-ink);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* wordmark */
.word {
  font-family: var(--font-mark);
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: inherit;
  cursor: pointer;
  user-select: none;
}
.word .i-slot {
  position: relative;
  display: inline-block;
  width: 0.55em;
  text-align: center;
}
.word .dot {
  position: absolute;
  top: -0.46em;
  left: 50%;
  transform: translateX(-50%);
  width: 0.22em;
  height: 0.22em;
  border-radius: 50%;
  background: var(--ns-accent);
  transition: background 0.4s ease, box-shadow 0.6s ease;
  will-change: box-shadow;
}
.word .dot::before {
  content: "";
  position: absolute;
  inset: -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 154, 60, 0.5) 0%, rgba(232, 154, 60, 0) 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.word .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, 0) 70deg,
    rgba(255, 255, 255, 0.95) 90deg,
    rgba(255, 255, 255, 0) 110deg,
    rgba(255, 255, 255, 0) 360deg
  );
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.word:hover .dot {
  background: var(--ns-accent-bright);
  box-shadow:
    0 0 0 0.06em rgba(255, 208, 138, 0.55),
    0 0 0.4em 0.1em rgba(255, 195, 110, 0.7),
    0 0 1em 0.2em rgba(232, 154, 60, 0.45);
}
.word:hover .dot::before {
  opacity: 1;
  animation: halo-pulse 1.6s ease-in-out infinite;
}
.word:hover .dot::after {
  opacity: 1;
  animation: shine-rotate 1.8s linear infinite;
}
@keyframes halo-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%      { transform: scale(1.25); opacity: 0.45; }
}
@keyframes shine-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Twinkle motes */
.word .twinkle {
  position: absolute;
  width: 0.10em;
  height: 0.10em;
  border-radius: 50%;
  background: var(--ns-accent-bright);
  opacity: 0;
  pointer-events: none;
}
.word:hover .twinkle {
  animation: twinkle-fly 1.4s ease-out infinite;
}
.word .twinkle.t1 { top: -0.55em; left: 65%; animation-delay: 0.0s; }
.word .twinkle.t2 { top: -0.30em; left: 30%; animation-delay: 0.45s; }
.word .twinkle.t3 { top: -0.62em; left: 38%; animation-delay: 0.85s; }
@keyframes twinkle-fly {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
  30%  { opacity: 1; transform: translate(0, -0.2em) scale(1); }
  100% { opacity: 0; transform: translate(0, -0.7em) scale(0.4); }
}

@media (prefers-reduced-motion: reduce) {
  .word .dot,
  .word .dot::before,
  .word .dot::after,
  .word .twinkle {
    animation: none !important;
    transition: background 0.2s ease;
  }
}

/* nav */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gutter);
  background: var(--inv-bg);
  color: var(--inv-fg);
}

/* hero */
.hero {
  padding: 80px var(--gutter);
  background: var(--inv-bg);
  color: var(--inv-fg);
}
.hero .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--inv-meta);
  margin-bottom: clamp(24px, 4vw, 50px);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(38px, 6.7vw, 86px);
  letter-spacing: -0.035em;
  line-height: 0.96;
  margin: 0;
}
.hero h1 b { font-weight: 700; }
.hero h1 .accent {
  color: var(--ns-accent-warm);
  font-weight: 400;
}
.hero .lower {
  margin-top: clamp(28px, 5.5vw, 70px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
}
.hero .lower p {
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.6;
  color: var(--inv-meta);
  max-width: 460px;
  margin: 0;
}

/* marquee */
.marquee {
  border-top: 1px solid var(--inv-rule);
  border-bottom: 1px solid var(--inv-rule);
  background: var(--inv-bg);
  color: var(--inv-fg);
  padding: clamp(14px, 1.7vw, 22px) 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(22px, 2.8vw, 36px);
  letter-spacing: -0.02em;
}
.marquee .track {
  display: inline-block;
  animation: scroll 36s linear infinite;
  will-change: transform;
}
.marquee .track span { margin: 0 28px; }
.marquee .track .d { color: var(--ns-accent); }
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee .track { animation: none; }
}

/* products / lead block */
.products {
  background: var(--inv-bg);
  color: var(--inv-fg);
  padding: clamp(36px, 6vw, 80px) var(--gutter) clamp(20px, 3vw, 40px);
}
.products .lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 3vw, 40px);
  margin-bottom: clamp(24px, 4vw, 50px);
}
.products .lead h2 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 3.75vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}
.products .lead h2 b { font-weight: 700; }
.products .lead p {
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.6;
  color: var(--inv-meta);
  max-width: 380px;
  margin: auto 0 0 auto;
}
.products .placeholder {
  padding: clamp(24px, 4.5vw, 60px) 4px 20px;
  border-top: 1px solid var(--inv-rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4.5vw, 60px);
  align-items: start;
}
.products .placeholder .head {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(24px, 2.8vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--inv-fg);
}
.products .placeholder .head .accent { color: var(--ns-accent); }
.products .placeholder .body {
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.7;
  color: var(--inv-meta);
  max-width: 360px;
  margin-left: auto;
}

/* why */
.why {
  background: var(--inv-bg);
  color: var(--inv-fg);
  padding: clamp(36px, 6vw, 80px) var(--gutter);
}
.why .grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(16px, 4.5vw, 60px);
}
.why .label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--inv-meta);
}
.why h2 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(26px, 3.4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
  max-width: 720px;
}
.why h2 b { font-weight: 700; }
.why .pillars {
  margin-top: clamp(28px, 4vw, 50px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--inv-rule);
}
.why .pillars .col {
  padding: 24px 24px 0 0;
  border-right: 1px solid var(--inv-rule);
}
.why .pillars .col:last-child {
  border-right: none;
  padding-right: 0;
}
.why .pillars .col .n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ns-accent);
}
.why .pillars .col h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin: 14px 0 8px;
}
.why .pillars .col p {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.6;
  color: var(--inv-meta);
  margin: 0;
}

/* now */
.now {
  padding: clamp(36px, 5.5vw, 70px) var(--gutter);
  background: var(--now-bg);
  color: var(--now-fg);
  border-top: 1px solid var(--ns-rule);
}
.now h2 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(26px, 3.4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 8px;
}
.now h2 .accent {
  color: var(--ns-accent-hover);
  font-weight: 700;
}
.now .stamp {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--now-meta);
}

/* contact */
.contact {
  padding: clamp(40px, 7vw, 90px) var(--gutter);
  background: var(--inv-bg);
  color: var(--inv-fg);
  border-top: 1px solid var(--inv-rule);
}
.contact .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 3vw, 40px);
  align-items: end;
}
.contact h2 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 4.4vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
  max-width: 700px;
}
.contact h2 b { font-weight: 700; }
.contact .links {
  display: grid;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--inv-meta);
  text-align: right;
}
.contact .links a {
  color: inherit;
  text-decoration: none;
}
.contact .links a:hover { color: var(--ns-accent-hover); }
.contact .links a b {
  color: var(--ns-accent-warm);
  font-weight: 500;
}

/* doc — privacy / support pages */
.doc {
  background: var(--inv-bg);
  color: var(--inv-fg);
  padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(60px, 8vw, 120px);
  min-height: calc(100vh - 200px);
}
.doc article {
  max-width: 720px;
}
.doc .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--inv-meta);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--inv-rule);
  margin-bottom: clamp(28px, 4vw, 48px);
}
.doc h1 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(38px, 5.4vw, 64px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 clamp(32px, 4vw, 48px);
}
.doc section { margin-bottom: clamp(22px, 2.8vw, 32px); }
.doc h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  color: var(--inv-fg);
}
.doc p, .doc li {
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.7;
  color: var(--inv-meta);
  margin: 0 0 12px;
  max-width: 64ch;
}
.doc ul {
  padding-left: 18px;
  margin: 0 0 12px;
}
.doc li { margin: 0 0 8px; }
.doc b, .doc strong {
  color: var(--inv-fg);
  font-weight: 600;
}
.doc i, .doc em {
  font-style: italic;
  color: var(--inv-fg);
}
.doc a {
  color: var(--inv-fg);
  text-decoration: underline;
  text-decoration-color: var(--ns-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.doc a:hover {
  color: var(--ns-accent-hover);
  text-decoration-color: var(--ns-accent-hover);
}

/* footer */
.ft {
  border-top: 1px solid var(--inv-rule);
  padding: 28px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 11px;
  background: var(--inv-bg);
  color: var(--inv-meta);
}

/* mobile — layout shifts only; type already scales via clamp() */
@media (max-width: 720px) {
  .nav { padding: 16px var(--gutter); }

  .hero h1 { letter-spacing: -0.025em; line-height: 1.0; }
  .hero .lower { grid-template-columns: 1fr; gap: 18px; }

  .products .lead { grid-template-columns: 1fr; }
  .products .lead p { margin: 0; }
  .products .placeholder { grid-template-columns: 1fr; }
  .products .placeholder .body { margin-left: 0; }

  .why .grid { grid-template-columns: 1fr; gap: 16px; }
  .why .pillars { grid-template-columns: 1fr; margin-top: 28px; }
  .why .pillars .col {
    border-right: none;
    border-bottom: 1px solid var(--inv-rule);
    padding: 16px 0;
  }
  .why .pillars .col:last-child { border-bottom: none; }

  .contact .row { grid-template-columns: 1fr; }
  .contact .links { text-align: left; }

  .ft {
    padding: 18px var(--gutter);
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}
