/* Melenica Group shared shell: fonts, tokens, base, header, buttons, footer. Used by every page. */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Lexend Zetta"; src: url("fonts/lexend-zetta-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --bg: #000000;
  --bg-2: #0c0c0e;
  --surface: rgba(255, 255, 255, 0.035);
  --glass: rgba(23, 23, 23, 0.62);
  --hair: rgba(255, 255, 255, 0.08);
  --hair-2: rgba(255, 255, 255, 0.14);
  --ink: #f4f4f5;
  --muted: #9d9d9d;
  --accent: #e9e9e9;
  --accent-ink: #000000;
  --cyan: #bebebe;
  --chrome: linear-gradient(180deg, #ffffff 0%, #e2e2e2 38%, #a7a7a7 62%, #d9d9d9 100%);
  --chrome-text: linear-gradient(175deg, #ffffff 10%, #d6d6d6 45%, #8f8f8f 75%, #c9c9c9 100%);
  --font-brand: "Lexend Zetta", "Bricolage Grotesque", system-ui, sans-serif; /* official wordmark lettering (D-071): do not change */
  --focus: #e9e9e9;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-code: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1320px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .35s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in .5s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); filter: blur(4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--font-body); overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--accent); color: var(--accent-ink); }

.prelaunch { font-size: .85rem; color: var(--muted); text-align: center; padding: .55rem var(--gutter); border-bottom: 1px solid var(--hair); background: var(--bg-2); }
.prelaunch strong { color: var(--ink); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem; padding: .8rem var(--gutter); background: rgba(0, 0, 0, .62); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--hair); }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand .mark { width: 38px; height: auto; filter: drop-shadow(0 0 10px rgba(255, 255, 255, .18)); }
.wordmark { display: inline-grid; justify-items: center; gap: .3rem; font: 300 .95rem/1 var(--font-brand); letter-spacing: .02em; text-transform: uppercase; background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark span { display: block; font-size: .5rem; font-weight: 300; letter-spacing: .9em; margin-right: -.9em; color: #c9c9c9; -webkit-text-fill-color: #c9c9c9; }
.menu-toggle { margin-left: auto; display: none; background: none; color: var(--ink); border: 1px solid var(--hair-2); border-radius: 999px; padding: .5rem 1rem; font: inherit; cursor: pointer; }
.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav a:not(.btn) { display: block; padding: .5rem .8rem; text-decoration: none; color: var(--muted); border-radius: 999px; transition: color .2s, background .2s; }
.nav a:not(.btn):hover { color: var(--ink); background: var(--surface); }
@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: rgba(0, 0, 0, .96); border-bottom: 1px solid var(--hair); display: none; padding: .5rem var(--gutter) 1rem; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; }
}

/* Buttons */
.btn { --mx: 0px; --my: 0px; position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .8rem 1.4rem; border-radius: 999px; font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer; transform: translate3d(var(--mx), var(--my), 0); transition: transform .35s var(--ease-out), background .2s, border-color .2s, box-shadow .3s; will-change: transform; }
.btn > span { display: inline-block; transform: translate3d(calc(var(--mx) * .35), calc(var(--my) * .35), 0); transition: transform .35s var(--ease-out); }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 0 rgba(236, 236, 236, 0); }
.btn-accent:hover { box-shadow: 0 10px 40px -8px rgba(236, 236, 236, .55); }
.btn-line { border: 1px solid var(--hair-2); color: var(--ink); background: rgba(255, 255, 255, .02); }
.btn-line:hover { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .05); }
.btn-xl { min-height: 64px; padding: 1.1rem 2.2rem; font-size: 1.15rem; }

.glass { background: var(--glass); border: 1px solid var(--hair); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
.live-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(236, 236, 236, .6); animation: pulse 2s infinite; margin-right: .5rem; vertical-align: .1em; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(236, 236, 236, 0); } 100% { box-shadow: 0 0 0 0 rgba(236, 236, 236, 0); } }

/* Footer */
.site-footer { border-top: 1px solid var(--hair); padding: 3.5rem var(--gutter) 2rem; color: var(--muted); }
.foot { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.foot p { margin-top: 1rem; max-width: 30em; }
.foot h2 { font: 600 .95rem/1 var(--font-body); color: var(--ink); margin-bottom: 1rem; letter-spacing: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.foot a:not(.brand) { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot-base { max-width: var(--max); margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; flex-wrap: wrap; }
.foot-base a { color: var(--muted); }
@media (max-width: 700px) { .foot { grid-template-columns: 1fr; } }

/* Header order: brand, nav, menu button (mobile). */
.site-header .nav { order: 2; }
.site-header .menu-toggle { order: 4; }

.nav a[aria-current="page"]:not(.btn) { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }

/* Brand finish: brushed chrome from the official logo (D-071) */
.btn-accent { background: var(--chrome); color: #0a0a0c; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 8px 30px -12px rgba(255, 255, 255, .35); }
.btn-accent:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 12px 44px -8px rgba(255, 255, 255, .5); }
.chrome-text, .kinetic, .kinetic .line, main h1, main h1 .line { background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.live-dot { background: #ffffff; }
.foot .tagline { margin-top: .9rem; font: 300 .75rem/1.6 var(--font-brand); letter-spacing: .28em; text-transform: uppercase; color: #c9c9c9; }

/* Tap targets: footer links at least 24 px tall */
.foot li a { display: inline-block; padding: .35rem 0; }
/* Reduced motion: stop looping animations  */
@media (prefers-reduced-motion: reduce) {
  .live-dot, .art-flow .flow, .ring { animation: none !important; }
}
.no-motion .live-dot, .no-motion .art-flow .flow, .no-motion .ring { animation: none !important; }
.foot-base a { display: inline-block; padding: .35rem 0; }

/* Chrome studio finish (D-074): black, white, silver only. Italic serif for short accent phrases. */
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.btn-sm { min-height: 44px; padding: .6rem 1.1rem; font-size: .92rem; }
.btn-accent { color: #000; }

/* Mobile menu: opaque panel with a scrim below, nothing shows through */
@media (max-width: 860px) {
  .nav { background: #000; }
  /* Fully opaque: nothing on the page shows through below the links; the logo and Close stay bright above it. */
  .nav.open { z-index: 1; box-shadow: 0 0 0 100vmax #000; }
  .site-header > .brand, .site-header > .menu-toggle { position: relative; z-index: 2; }
  .site-header:has(.nav.open) { z-index: 70; background: #000; }
  body:has(.nav.open) .m-bar { visibility: hidden; }
}
/* Header stays legible over light (silver) sections */
.site-header.on-light { background: rgba(0, 0, 0, .94); }
/* Sections focused by an in-page menu link: no outline box around the whole section */
main [tabindex="-1"]:focus { outline: none; }
