:root {
  --color-primary: #0a1128;
  --color-secondary: rgba(0, 119, 182, 0.12);
  --color-accent: #00e5ff;
  --color-accent-soft: rgba(0, 229, 255, 0.35);
  --color-surface: rgba(10, 17, 40, 0.72);
  --color-text: #e8f1ff;
  --color-text-muted: rgba(232, 241, 255, 0.72);
  --color-border: rgba(0, 229, 255, 0.22);
  --font-primary: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-display: "Outfit", system-ui, sans-serif;
  --space-xs: 0.35rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.75rem;
  --space-xl: 2.75rem;
  --space-2xl: 4rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --shadow-soft: 0 1rem 2.5rem rgba(0, 0, 0, 0.35);
  --transition-fast: 0.28s ease;
  --transition-slow: 0.55s ease;
  --header-offset: 5.5rem;
  --max-readable: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-primary);
  color: var(--color-text);
  background: radial-gradient(120% 90% at 10% 0%, #132046 0%, #0a1128 45%, #05070f 100%);
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover,
a:focus-visible {
  color: #7df9ff;
}

:focus-visible {
  outline: 0.15rem solid var(--color-accent);
  outline-offset: 0.12rem;
}

.shell-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.shell-main {
  flex: 1 1 auto;
  width: 100%;
}

.shell-inner {
  width: min(100% - 8%, var(--max-readable));
  margin-inline: auto;
}

/* Caustic refractive layer */
.layer-caustic {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at var(--caustic-x, 50%) var(--caustic-y, 40%), rgba(0, 229, 255, 0.35) 0%, transparent 42%),
    radial-gradient(circle at calc(var(--caustic-x, 50%) + 12%) calc(var(--caustic-y, 40%) + 8%), rgba(125, 249, 255, 0.22) 0%, transparent 38%),
    conic-gradient(from 120deg at 70% 30%, rgba(0, 119, 182, 0.25), transparent 55%, rgba(0, 229, 255, 0.15));
  transition: opacity 1.2s ease;
}

/* Scroll droplet */
.widget-scroll-droplet {
  position: fixed;
  right: 4%;
  bottom: 8%;
  width: 1.1rem;
  height: 3.5rem;
  border-radius: 999rem;
  border: 0.08rem solid var(--color-border);
  background: rgba(10, 17, 40, 0.55);
  backdrop-filter: blur(0.45rem);
  z-index: 40;
  overflow: hidden;
}

.widget-scroll-droplet-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.15), var(--color-accent-soft));
  transition: height 0.12s linear;
}

/* Header: floating glass, non-sticky */
.banner-site-header {
  position: relative;
  z-index: 45;
  width: min(100% - 6%, 68rem);
  margin: var(--space-md) auto 0;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  border: 0.06rem solid var(--color-border);
  background: rgba(10, 17, 40, 0.55);
  backdrop-filter: blur(0.85rem);
  box-shadow: var(--shadow-soft);
}

.grid-header-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand-plain-label {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: clamp(0.95rem, 2.4vw, 1.1rem);
  color: var(--color-text);
  text-decoration: none;
}

.brand-plain-label:hover {
  color: var(--color-accent);
}

.nav-cluster-desktop {
  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-cluster-desktop a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-cluster-desktop a:hover {
  color: var(--color-text);
}

/* Burger always last in header */
.control-burger-menu {
  order: 99;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  border: 0.06rem solid var(--color-border);
  background: rgba(0, 229, 255, 0.08);
  color: var(--color-text);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.control-burger-menu:hover {
  transform: translateY(-0.08rem) scale(1.03);
  box-shadow: 0 0.35rem 1.2rem rgba(0, 229, 255, 0.25);
}

.control-burger-menu:active {
  transform: scale(0.97);
}

.control-burger-menu .icon-bar {
  display: block;
  width: 1.15rem;
  height: 0.1rem;
  margin: 0.18rem auto;
  background: currentColor;
  border-radius: 999rem;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.control-burger-menu.is-open .icon-bar:nth-child(1) {
  transform: translateY(0.28rem) rotate(45deg);
}

.control-burger-menu.is-open .icon-bar:nth-child(2) {
  opacity: 0;
}

.control-burger-menu.is-open .icon-bar:nth-child(3) {
  transform: translateY(-0.28rem) rotate(-45deg);
}

.panel-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.panel-nav-overlay.is-visible {
  pointer-events: auto;
  opacity: 1;
}

.panel-nav-overlay-backdrop {
  flex: 1 1 auto;
  background: rgba(5, 7, 15, 0.55);
  backdrop-filter: blur(0.2rem);
}

.panel-nav-sheet {
  width: min(100%, 20rem);
  padding: var(--space-xl) var(--space-lg);
  background: rgba(10, 17, 40, 0.92);
  border-left: 0.06rem solid var(--color-border);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.panel-nav-overlay.is-visible .panel-nav-sheet {
  transform: translateX(0);
}

.list-overlay-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.list-overlay-links a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.05rem;
}

/* Full-width hero banners */
.block-hero-fullwidth {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: clamp(18rem, 52vh, 32rem);
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 0.06rem solid var(--color-border);
}

.block-hero-fullwidth .hero-photo-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.block-hero-fullwidth .hero-photo-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.block-hero-fullwidth .hero-copy-layer {
  position: relative;
  z-index: 1;
  width: min(100% - 8%, var(--max-readable));
  margin: 0 auto;
  padding: 35px;
  background: linear-gradient(180deg, rgba(10, 17, 40, 0.05) 0%, rgba(10, 17, 40, 0.82) 55%, rgba(10, 17, 40, 0.95) 100%);
  backdrop-filter: blur(0.35rem);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.block-hero-fullwidth h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin: 0 0 var(--space-sm);
  letter-spacing: 0.02em;
}

.block-hero-fullwidth p {
  margin: 0;
  max-width: 38rem;
  color: var(--color-text-muted);
}

/* Sections */
.section-flow {
  padding: var(--space-xl) 0;
}

.section-flow:nth-of-type(even) .shell-inner {
  position: relative;
}

.grid-asymmetric-duo {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 48rem) {
  .grid-asymmetric-duo {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }

  .grid-asymmetric-duo.is-flipped {
    direction: rtl;
  }

  .grid-asymmetric-duo.is-flipped > * {
    direction: ltr;
  }
}

.card-glass-panel {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 0.06rem solid var(--color-border);
  background: var(--color-secondary);
  backdrop-filter: blur(0.75rem);
  box-shadow: var(--shadow-soft);
}

.card-glass-panel h2 {
  font-family: var(--font-display);
  margin-top: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
}

.card-glass-panel p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.figure-offset-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 0.06rem solid var(--color-border);
  box-shadow: var(--shadow-soft);
  transform: rotate(-1.2deg);
}

.figure-offset-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.grid-trio-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 40rem) {
  .grid-trio-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tile-product-glass {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 0.06rem solid var(--color-border);
  background: rgba(10, 17, 40, 0.55);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.tile-product-glass h3 {
  margin: 0;
  font-size: 1.1rem;
}

.tile-product-glass .price-tag {
  font-weight: 600;
  color: var(--color-accent);
}

/* Buttons liquid */
.control-liquid-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.65rem 1.35rem;
  border-radius: 999rem;
  border: 0.06rem solid var(--color-border);
  background: linear-gradient(120deg, rgba(0, 229, 255, 0.2), rgba(0, 119, 182, 0.35));
  color: var(--color-text);
  font-size: 0.95rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.control-liquid-button::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255, 255, 255, 0.35), transparent 45%);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s ease, transform 0.45s ease;
}

.control-liquid-button:hover {
  transform: translateY(-0.08rem) scale(1.02);
  box-shadow: 0 0.6rem 1.8rem rgba(0, 229, 255, 0.28);
}

.control-liquid-button:hover::after {
  opacity: 1;
  transform: scale(1);
}

.control-liquid-button.secondary-tone {
  background: rgba(10, 17, 40, 0.55);
}

/* Footer */
.banner-site-footer {
  margin-top: var(--space-xl);
  padding: var(--space-lg) 0 calc(var(--space-lg) + 0.5rem);
  border-top: 0.06rem solid var(--color-border);
  background: rgba(5, 7, 15, 0.85);
}

.grid-footer-compact {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.list-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-footer-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.list-footer-nav a:hover {
  color: var(--color-text);
}

.footer-meta-line {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* Forms */
.form-contact-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 52rem) {
  .form-contact-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }
}

.field-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.field-stack label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.field-stack input,
.field-stack textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 0.06rem solid var(--color-border);
  background: rgba(10, 17, 40, 0.65);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
}

.field-stack textarea {
  min-height: 9rem;
  resize: vertical;
}

.row-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.embed-map-shell {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 0.06rem solid var(--color-border);
  min-height: 16rem;
}

.embed-map-shell iframe {
  width: 100%;
  height: 100%;
  min-height: 16rem;
  border: 0;
}

/* Privacy modal */
.shell-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(5, 7, 15, 0.72);
  backdrop-filter: blur(0.35rem);
}

.shell-consent-modal[hidden] {
  display: none;
}

.card-consent-dialog {
  max-width: 32rem;
  width: 100%;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 0.06rem solid var(--color-border);
  background: rgba(10, 17, 40, 0.92);
  box-shadow: var(--shadow-soft);
}

.row-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Analysis tool */
.shell-analysis-workbench {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 56rem) {
  .shell-analysis-workbench {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }
}

.panel-slider-cluster {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.range-labeled {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.range-labeled input[type="range"] {
  width: 100%;
  accent-color: var(--color-accent);
}

.figure-silhouette-meter {
  position: relative;
  max-width: 16rem;
  margin-inline: auto;
}

.figure-silhouette-meter svg {
  width: 100%;
  height: auto;
  display: block;
}

.readout-analysis-summary {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Recipes */
.grid-ingredient-picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: var(--space-md);
}

.tile-ingredient-card {
  border-radius: var(--radius-md);
  border: 0.06rem solid var(--color-border);
  background: rgba(10, 17, 40, 0.55);
  padding: var(--space-md);
  cursor: pointer;
  text-align: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.tile-ingredient-card.is-active {
  border-color: var(--color-accent);
  transform: translateY(-0.15rem);
}

.tile-ingredient-card h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1rem;
}

.panel-ingredient-detail h3 {
  margin-top: 0;
}

.zone-mixer-board {
  min-height: 12rem;
  border-radius: var(--radius-lg);
  border: 0.08rem dashed var(--color-border);
  padding: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: flex-start;
  background: rgba(0, 119, 182, 0.08);
}

.chip-mixer-token {
  padding: 0.35rem 0.75rem;
  border-radius: 999rem;
  border: 0.06rem solid var(--color-border);
  background: rgba(10, 17, 40, 0.75);
  font-size: 0.85rem;
  cursor: grab;
}

.chip-mixer-token:active {
  cursor: grabbing;
}

/* Rhythm clock */
.figure-rhythm-dial {
  position: relative;
  width: min(100%, 22rem);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  border: 0.12rem solid var(--color-border);
  background: radial-gradient(circle at 30% 25%, rgba(0, 229, 255, 0.18), transparent 55%), rgba(10, 17, 40, 0.65);
  box-shadow: var(--shadow-soft);
}

.figure-rhythm-dial .dial-tick {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 0.04rem dashed rgba(0, 229, 255, 0.25);
}

.figure-rhythm-dial .dial-handle {
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--color-accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0.6rem rgba(0, 229, 255, 0.55);
  cursor: grab;
  touch-action: none;
}

.list-rhythm-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* Legal prose */
.article-legal-prose {
  max-width: 48rem;
  margin: 0 auto;
}

.article-legal-prose h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.article-legal-prose h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-top: var(--space-lg);
}

.article-legal-prose p,
.article-legal-prose li {
  color: var(--color-text-muted);
}

.meta-updated-line {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* Thank you / 404 */
.panel-centered-message {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.panel-centered-message h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  color: var(--color-text-muted);
}

.stack-gap-lg {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.stack-gap-top-md {
  margin-top: var(--space-md);
}

/* Desktop nav from 1024px; burger visible only up to 1023px */
@media (min-width: 64rem) {
  .nav-cluster-desktop {
    display: flex;
    order: 2;
    margin-left: auto;
    margin-right: 0;
  }

  .control-burger-menu {
    display: none;
  }

  .panel-nav-overlay {
    display: none !important;
  }
}

@media (max-width: 63.9375rem) {
  .nav-cluster-desktop {
    display: none;
  }

  .control-burger-menu {
    display: inline-flex;
  }
}
