/*
 * Author: Hariram S <ramhari4090@gmail.com>
 *
 * The parts every page of dotwave.app shares, in the site's dark style: the
 * sticky blurred top bar, the mobile menu, the footer and the cookie banner.
 * Class names carry a "dw-" prefix so this file can sit beside the older blog
 * stylesheet (static/css/design-system.css, which has its own .site-nav and
 * .site-footer) without either overriding the other. It also sets the site's
 * typefaces, Geist and Geist Mono, through --font and --mono; the blog
 * stylesheet reads --font for its body text.
 *
 * Colours: near-black ground, white and neutral-grey text (every text colour
 * here is 4.5:1 or more on its ground), low-alpha white borders, and the brand
 * violet as the one accent (focus rings and the primary button's glow).
 *
 * Used by:
 *     every page in landing/ (home, features, use cases, about, contact,
 *     privacy, blog)
 *
 * Depends on:
 *     landing/assets/site.js   (toggles .open on #navMobile, aria-expanded on
 *                               #navToggle, .scrolled on #nav, injects .consent-banner)
 *     landing/assets/icons.svg (Phosphor icons for the menu)
 */

:root {
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --dw-bg: #0a0a0b;
  --dw-ink: #ededed;
  --dw-muted: #a1a1aa;
  --dw-line: rgba(255, 255, 255, .1);
  --dw-line-2: rgba(255, 255, 255, .16);
  --dw-violet: #7c5cff;
  --dw-violet-ink: #b4a3ff;
  --dw-m: clamp(20px, 4vw, 48px);
  color-scheme: dark;
}

.dw-skip {
  position: absolute; left: var(--dw-m); top: -80px; z-index: 300;
  background: #fff; color: #000; padding: 12px 18px; border-radius: 999px; font: 600 15px/1 var(--font);
  text-decoration: none;
}
.dw-skip:focus { top: 12px; }

/* Top bar: sticky, blurred, a hairline underneath once the page scrolls. */
.dw-nav {
  position: sticky; top: 0; z-index: 50; font-family: var(--font); color: var(--dw-ink);
  background: rgba(10, 10, 11, .72); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s ease, background-color .3s ease;
}
.dw-nav.scrolled { border-bottom-color: var(--dw-line); }
.dw-nav-in { max-width: 1240px; margin: 0 auto; padding: 12px var(--dw-m); display: flex; align-items: center; gap: 24px; }
.dw-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; color: #fff; text-decoration: none; }
.dw-brand img { width: 26px; height: 26px; display: block; border-radius: 6px; background: #fff; }
.dw-nav-in > nav { margin-left: 20px; }
.dw-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.dw-links a, .dw-signin {
  display: inline-block; white-space: nowrap; padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--dw-muted);
  text-decoration: none; border-radius: 999px; transition: color .2s ease, background-color .2s ease;
}
.dw-links a:hover, .dw-signin:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.dw-links a[aria-current="page"] { color: #fff; }
.dw-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Buttons: pills. Primary is white on black with a violet glow; secondary is outlined. */
.dw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 1px solid #fff; border-radius: 999px;
  background: #fff; color: #0a0a0b; font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 0 0 0 rgba(124, 92, 255, 0), 0 8px 30px -8px rgba(124, 92, 255, .55);
  transition: transform .2s cubic-bezier(.23, 1, .32, 1), box-shadow .3s ease, background-color .2s ease;
}
.dw-btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 4px rgba(124, 92, 255, .22), 0 12px 40px -8px rgba(124, 92, 255, .7); }
.dw-btn:active { transform: scale(.98); }
.dw-btn-sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.dw-btn-ghost { background: transparent; color: #fff; border-color: var(--dw-line-2); box-shadow: none; }
.dw-btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .3); box-shadow: none; }
.dw-btn-ink, .dw-btn-light { /* older names used by generated markup map to the primary pill */ }

.dw-toggle {
  display: none; min-height: 40px; padding: 0 14px; background: transparent; border: 1px solid var(--dw-line-2); border-radius: 999px;
  font: 500 14px/1 var(--font); color: #fff; cursor: pointer; align-items: center; gap: 8px;
}
.dw-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.dw-mobile { display: none; }

:where(.dw-nav, .dw-foot, .consent-banner) a:focus-visible, :where(.dw-nav, .dw-foot, .consent-banner) button:focus-visible, .dw-skip:focus-visible {
  outline: 2px solid var(--dw-violet); outline-offset: 3px; border-radius: 999px;
}

@media (max-width: 1100px) {
  .dw-nav-in > nav, .dw-signin { display: none; }
  .dw-toggle { display: inline-flex; }
  .dw-mobile { display: none; padding: 8px var(--dw-m) 24px; border-top: 1px solid var(--dw-line); }
  .dw-mobile.open { display: block; }
  .dw-mobile a { display: block; padding: 14px 0; font: 500 20px/1.2 var(--font); color: #fff; text-decoration: none; border-bottom: 1px solid var(--dw-line); }
  .dw-mobile .dw-btn { margin-top: 16px; width: 100%; font-size: 16px; color: #0a0a0b; border-bottom: 1px solid #fff; }
}
@media (max-width: 420px) {
  .dw-actions .dw-btn { display: none; }
}

/* Footer */
.dw-foot { position: relative; background: var(--dw-bg); color: var(--dw-ink); font-family: var(--font); border-top: 1px solid var(--dw-line); overflow: hidden; }
.dw-foot-in { position: relative; max-width: 1240px; margin: 0 auto; padding: clamp(56px, 7vw, 88px) var(--dw-m) 32px; }
.dw-foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px 24px; }
.dw-foot-reach { grid-column: 1 / 4; }
.dw-foot-reach p { margin: 0 0 20px; font-size: 15px; line-height: 1.6; color: var(--dw-muted); max-width: 34ch; }
.dw-foot-reach a.big { display: inline-block; font-size: 18px; font-weight: 500; color: #fff; text-decoration: none; border-bottom: 1px solid var(--dw-line-2); padding-bottom: 2px; }
.dw-foot-reach a.big:hover { border-bottom-color: #fff; }
.dw-foot-cols { grid-column: 4 / 13; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.dw-foot h2 { margin: 0 0 14px; font: 500 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--dw-muted); }
.dw-foot ul { list-style: none; margin: 0; padding: 0; }
.dw-foot li a { display: inline-block; padding: 5px 0; font-size: 14px; color: #d4d4d8; text-decoration: none; transition: color .2s ease; }
.dw-foot li a:hover { color: #fff; }
.dw-foot-mark {
  margin: clamp(48px, 7vw, 88px) 0 0; font-weight: 700; letter-spacing: -0.06em; line-height: .8;
  font-size: clamp(80px, 19vw, 280px); white-space: nowrap; text-align: center;
  color: transparent; background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 85%); -webkit-background-clip: text; background-clip: text;
  user-select: none;
}
.dw-foot-base { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid var(--dw-line); font-size: 13px; color: var(--dw-muted); flex-wrap: wrap; }
.dw-foot-base button, .dw-foot-base a { font: inherit; color: #d4d4d8; background: none; border: 0; padding: 8px 0; cursor: pointer; text-decoration: none; }
.dw-foot-base button:hover, .dw-foot-base a:hover { color: #fff; }
@media (max-width: 1100px) {
  .dw-foot-reach, .dw-foot-cols { grid-column: 1 / -1; }
  .dw-foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .dw-foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Cookie banner, injected by site.js. A floating card, so it carries a border and a shadow. */
.consent-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; max-width: 600px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; padding: 16px 18px; border-radius: 16px;
  background: rgba(17, 17, 19, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--dw-line-2); color: var(--dw-ink); font: 400 14px/1.5 var(--font);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
}
.consent-banner p { margin: 0; flex: 1 1 260px; color: #d4d4d8; }
.consent-banner a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: flex; gap: 8px; }
.consent-banner button {
  min-height: 36px; padding: 0 14px; border-radius: 999px; font: 500 14px/1 var(--font); cursor: pointer;
  background: transparent; color: #fff; border: 1px solid var(--dw-line-2);
}
.consent-banner button.consent-accept { background: #fff; color: #0a0a0b; border-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .dw-btn, .dw-nav, .dw-links a, .dw-foot li a { transition: none; }
  .dw-btn:hover { transform: none; }
}
