/* Premium Write hero — UI chrome over the canvas scene. Everything is scoped to .syn-hero. */
html, body { margin: 0; background: #14171c; }

.syn-hero {
  --accent: #8fb3f0; /* logo light blue; navy on the day theme below */
  --accent-2: #22c7b5;
  --fg: #f2efe6;
  --fg-soft: rgba(242, 239, 230, .62);
  --panel: rgba(34, 36, 42, .9);
  --btn: rgba(255, 255, 255, .05);
  --btn-hover: rgba(255, 255, 255, .13);
  position: relative; width: 100%; height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden; isolation: isolate; background: #14171c; color: var(--fg);
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.syn-hero[data-theme="day"] {
  --accent: #1e3a6e;
  --fg: #1d201c;
  --fg-soft: rgba(29, 32, 28, .64);
  --panel: rgba(247, 243, 231, .92);
  --btn: rgba(255, 255, 255, .6);
  --btn-hover: rgba(255, 255, 255, .95);
  background: #efe8d2;
}
.syn-hero *, .syn-hero *::before { box-sizing: border-box; }
.syn-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.syn-vignette {
  position: absolute; inset: 0; pointer-events: none; transition: opacity .8s;
  background: radial-gradient(ellipse at 50% 52%, transparent 48%, rgba(0, 0, 0, .42) 100%);
}
[data-theme="day"] .syn-vignette { opacity: 0; }

/* logo, tagline, clock */
.syn-logo {
  position: absolute; top: 26px; left: clamp(20px, 3vw, 44px); z-index: 3; display: flex; align-items: center; gap: 12px;
  color: var(--fg); text-decoration: none; font-size: 19px; font-weight: 500; letter-spacing: .34em; transition: color .5s;
}
.syn-hello {
  position: absolute; top: 34px; left: 50%; transform: translateX(-50%); margin: 0; white-space: nowrap; pointer-events: none;
  font-size: 11px; font-weight: 700; letter-spacing: .44em; text-transform: uppercase; color: var(--fg); opacity: 0;
  animation: syn-hello 6s ease 0.4s forwards;
}
@keyframes syn-hello { 0% { opacity: 0 } 15%, 60% { opacity: .3 } 100% { opacity: 0 } }
.syn-clock {
  position: absolute; top: 76px; right: clamp(20px, 3vw, 44px); margin: 0; z-index: 3;
  font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--fg); font-variant-numeric: tabular-nums;
}
.syn-clock::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 9px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }

/* round tool buttons + menus */
.syn-tools { position: absolute; top: 20px; right: clamp(16px, 2.6vw, 40px); z-index: 4; display: flex; gap: 12px; }
.syn-wrap { position: relative; }
.syn-btn {
  width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: var(--btn); color: var(--fg); transition: background .25s, color .5s, box-shadow .5s, transform .2s;
}
.syn-btn:hover, .syn-btn[aria-expanded="true"] { background: var(--btn-hover); }
.syn-btn:active { transform: scale(.94); }
.syn-btn:focus-visible, .syn-menu button:focus-visible, .syn-dock button:focus-visible, .syn-cta a:focus-visible, .syn-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.syn-btn svg { width: 19px; height: 19px; }
.syn-btn.is-on { color: var(--accent); }
[data-theme="day"] .syn-btn { box-shadow: 0 0 22px 6px rgba(255, 255, 255, .7); }

.syn-menu {
  position: absolute; top: 54px; right: -46px; min-width: 178px; padding: 10px 0; border-radius: 16px;
  background: var(--panel); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s, background .5s;
}
.syn-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.syn-menu button {
  position: relative; display: block; width: 100%; padding: 10px 24px 10px 40px; border: 0; background: none; cursor: pointer; text-align: left;
  font: 700 11px/1 'Space Grotesk', system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase; color: var(--fg-soft);
}
.syn-menu button:hover { color: var(--fg); background: rgba(128, 128, 128, .13); }
.syn-menu button[aria-checked="true"] { color: var(--fg); }
.syn-menu button[aria-checked="true"]::before {
  content: ''; position: absolute; left: 22px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent);
}

/* hero copy */
.syn-copy {
  position: absolute; z-index: 2; left: clamp(22px, 5.2vw, 92px); top: max(calc(var(--header-h) + 10px), 17%); max-width: min(440px, 36vw);
  transition: opacity .5s, transform .5s;
}
.syn-copy h1 {
  margin: 0 0 18px; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: clamp(30px, min(4.3vw, 8.6vh), 66px);
  line-height: .98; letter-spacing: -.01em; color: var(--fg); transition: color .5s;
}
.syn-copy h1 em { font-style: italic; color: var(--accent); }
[data-theme="night"] .syn-copy h1 em { color: #8fb3f0; }
.syn-copy p { margin: 0 0 26px; font-size: clamp(14px, 1.05vw, 16px); line-height: 1.6; color: var(--fg-soft); transition: color .5s; }
.syn-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.syn-cta a { white-space: nowrap; }
/* .is-tight / .is-stacked are set by js/hero.js from the space actually available */
.syn-hero.is-tight .syn-copy p { display: none; }
.syn-hero.is-stacked .syn-copy { top: 74px; left: clamp(18px, 5vw, 48px); right: clamp(18px, 5vw, 48px); max-width: 620px; }
.syn-hero.is-stacked .syn-copy h1 { font-size: clamp(28px, min(7.4vw, 6.4vh), 50px); margin-bottom: 10px; }
.syn-hero.is-stacked .syn-copy p {
  font-size: clamp(13px, 2.2vw, 15.5px); line-height: 1.5; margin-bottom: 16px; max-width: 540px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.syn-hero.is-stacked .syn-primary { padding: 12px 20px; }
@media (min-width: 600px) { .syn-hero.is-stacked .syn-copy h1 br { display: none; } }
@media (max-height: 640px) { .syn-hero.is-stacked .syn-copy p { -webkit-line-clamp: 2; } }
@media (max-height: 540px) { .syn-hero.is-stacked .syn-copy p { display: none; } }
@media (max-width: 380px) { .syn-cta a { font-size: 11px; letter-spacing: .12em; } .syn-hero.is-stacked .syn-primary { padding: 11px 16px; } }
.syn-primary {
  padding: 14px 26px; border-radius: 999px; background: var(--fg); color: #14171c; text-decoration: none;
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; transition: transform .2s, background .5s, color .5s;
}
[data-theme="day"] .syn-primary { color: #f2efe6; }
.syn-primary:hover { transform: translateY(-2px); }
.syn-secondary { color: var(--fg); text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.syn-secondary span { display: inline-block; transition: transform .2s; }
.syn-secondary:hover span { transform: translateX(4px); }

/* floating status label that follows the scene */
.syn-tip {
  position: absolute; left: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 6px 11px 6px 9px; border-radius: 3px;
  background: #f6f3ea; color: #1b1d1a; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .35s;
  font-size: 9.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; box-shadow: 0 4px 14px rgba(0, 0, 0, .22); will-change: transform;
}
.syn-tip.is-on { opacity: 1; }
.syn-tip i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.syn-tip span::after { content: ''; display: inline-block; width: 1px; height: 9px; margin-left: 3px; background: var(--accent); vertical-align: -1px; animation: syn-caret .9s steps(1) infinite; }
@keyframes syn-caret { 50% { opacity: 0 } }

/* dock + focus card */
.syn-dock {
  position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 24px; width: fit-content; max-width: calc(100% - 24px); margin: 0 auto; display: flex; gap: 6px; padding: 5px;
  border-radius: 999px; background: var(--panel); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); overflow-x: auto; scrollbar-width: none; transition: background .5s;
}
.syn-dock::-webkit-scrollbar { display: none; }
.syn-dock button {
  flex: none; padding: 10px 16px; border: 0; border-radius: 999px; background: none; cursor: pointer; color: var(--fg-soft);
  font: 700 10.5px/1 'Space Grotesk', system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase; transition: background .2s, color .2s;
}
.syn-dock button:hover { color: var(--fg); background: rgba(128, 128, 128, .16); }
.syn-dock button.is-on { color: #fff; background: var(--accent); }
[data-theme="night"] .syn-dock button.is-on { color: #0d1a33; }
.syn-back {
  position: absolute; z-index: 3; top: calc(var(--header-h) + 12px); left: clamp(20px, 3vw, 44px); padding: 10px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--panel); color: var(--fg); font: 700 10.5px/1 'Space Grotesk', system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase;
}
.syn-card {
  position: absolute; z-index: 3; left: clamp(22px, 5.2vw, 92px); bottom: 96px; max-width: 360px; padding: 22px 24px; border-radius: 18px;
  background: var(--panel); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}
.syn-card h2 { margin: 0 0 8px; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: 28px; line-height: 1.05; }
.syn-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--fg-soft); }
.syn-hero.is-focus .syn-copy { opacity: 0; transform: translateY(8px); pointer-events: none; }
.syn-hero [hidden] { display: none !important; }

@media (max-width: 860px) {
  .syn-hello { display: none; }
  .syn-logo { font-size: 16px; letter-spacing: .28em; top: 24px; }
  .syn-tools { gap: 6px; top: 16px; }
  .syn-btn { width: 38px; height: 38px; }
  .syn-menu { right: -8px; }
  .syn-dock { bottom: 14px; justify-content: flex-start; }
  .syn-dock button { padding: 10px 13px; }
  .syn-card { left: 14px; right: 14px; bottom: 76px; max-width: none; padding: 16px 18px; }
  .syn-card h2 { font-size: 23px; }
  .syn-back { top: 66px; left: 16px; }
  .syn-clock { top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .syn-hello { animation: none; }
  .syn-tip span::after { animation: none; }
}
