:root {
  --ink: #1d2930;
  --muted: #5f6e75;
  --paper: #f7faf7;
  --soft: #edf5f1;
  --line: #d9e1dd;
  --accent: #df6f45;
  --accent-dark: #a34627;
  --green: #658f80;
  --blue: #526f9d;
  --glass-alpha: 0.86;
  --glass-blur: 24px;
  --surface-alpha: 0.58;
  --panel: rgba(255, 255, 255, 0.56);
  --glass-line: rgba(255, 255, 255, 0.58);
  --glass-shine: rgba(255, 255, 255, 0.72);
  --shadow: 0 22px 58px rgba(29, 41, 48, 0.15);
  --hover-shadow: 0 28px 70px rgba(29, 41, 48, 0.2);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(237, 245, 241, 0.92), rgba(255, 250, 242, 0.18) 48%, rgba(242, 246, 249, 0.86)),
    linear-gradient(245deg, rgba(82, 111, 157, 0.16), transparent 36%, rgba(223, 111, 69, 0.12) 72%, rgba(101, 143, 128, 0.18)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0, rgba(255, 255, 255, 0.2) 1px, transparent 1px, transparent 18px),
    var(--paper);
  background-attachment: fixed;
  font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.shell { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--glass-line);
  background: rgba(247, 250, 247, var(--surface-alpha));
  box-shadow: 0 12px 38px rgba(29, 41, 48, 0.08);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.35);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.35);
}
.topbar-inner {
  display: grid;
  grid-template: "brand settings" auto "nav nav" auto / minmax(0, 1fr) 42px;
  gap: 10px 12px;
  align-items: center;
  padding: 16px 0;
}
.brand { grid-area: brand; display: inline-flex; align-items: center; gap: 9px; font-weight: 900; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 6px; box-shadow: 0 8px 18px rgba(29, 41, 48, 0.12); }
nav { grid-area: nav; display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 0.94rem; }
nav a { position: relative; text-decoration: none; }
nav a::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--green), var(--blue));
  content: "";
  transform: scaleX(0);
  transition: transform 180ms var(--ease);
}
nav a:hover::after, nav a:focus-visible::after { transform: scaleX(1); }
.site-settings { position: relative; grid-area: settings; justify-self: end; }
.settings-button, .settings-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255,255,255,var(--glass-alpha)), rgba(255,255,255,0.28));
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 10px 24px rgba(29, 41, 48, 0.1);
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms ease;
}
.settings-button:hover, .settings-button[aria-expanded="true"], .settings-close:hover { box-shadow: inset 0 1px 0 var(--glass-shine), 0 16px 36px rgba(29, 41, 48, 0.16); }
.settings-button:active, .settings-close:active { transform: scale(0.96); }
.settings-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-panel {
  position: absolute;
  top: 50px;
  right: 0;
  display: grid;
  gap: 14px;
  width: min(320px, calc(100vw - 36px));
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,var(--glass-alpha)), rgba(255,255,255,0.34)), var(--panel);
  box-shadow: inset 0 1px 0 var(--glass-shine), var(--shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.35);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.35);
}
.settings-panel[hidden] { display: none; }
.settings-head, .settings-about, .settings-field > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-about { min-height: 38px; padding: 0 12px; border: 1px solid var(--glass-line); border-radius: 8px; background: rgba(255,255,255,0.34); }
.settings-close { width: 32px; height: 32px; font-size: 1.2rem; }
.settings-panel label, .settings-field { display: grid; gap: 8px; color: var(--muted); font-size: 0.88rem; }
.settings-panel select, .settings-panel input { width: 100%; accent-color: var(--accent-dark); }
.settings-panel select { min-height: 38px; padding: 0 10px; border: 1px solid var(--glass-line); border-radius: 8px; background: rgba(255,255,255,var(--glass-alpha)); color: var(--ink); }
.settings-segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border: 1px solid var(--glass-line); border-radius: 8px; background: rgba(255,255,255,0.34); }
.settings-segmented button { min-height: 34px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.settings-segmented button[aria-pressed="true"] { background: var(--ink); color: var(--paper); font-weight: 900; }

.hero { display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(340px, 1.12fr); gap: 42px; align-items: center; min-height: 620px; padding: 70px 0 76px; }
.back-link { display: inline-block; margin-bottom: 36px; color: var(--muted); text-underline-offset: 5px; }
.eyebrow { margin: 0 0 10px; color: var(--accent-dark); font-size: 0.78rem; font-weight: 900; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 8ch; margin-bottom: 18px; font-size: clamp(3.2rem, 7.8vw, 6.3rem); line-height: 0.9; letter-spacing: -0.055em; }
h2 { margin-bottom: 18px; font-size: clamp(2.2rem, 4vw, 3.65rem); line-height: 1; letter-spacing: -0.035em; }
h3 { margin-bottom: 12px; font-size: 1.25rem; }
.hero-lede, .section-intro > p:last-child { max-width: 700px; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.3rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.button {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  overflow: hidden;
  border: 1px solid rgba(29,41,48,0.32);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, rgba(29,41,48,0.92), rgba(42,68,73,0.84));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 14px 30px rgba(29,41,48,0.16);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms var(--ease), box-shadow 180ms ease;
}
.button:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), var(--hover-shadow); }
.text-link { font-weight: 800; text-underline-offset: 5px; }
.hero-visual { position: relative; min-width: 0; padding: 18px 0 68px 18px; }
.hero-visual::before { position: absolute; inset: 6% 0 22% 6%; z-index: -1; border-radius: 50%; background: linear-gradient(135deg, rgba(223,111,69,0.28), rgba(101,143,128,0.3), rgba(82,111,157,0.28)); filter: blur(42px); content: ""; }
.browser-frame, .work-card, .quote-card, .next-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,0.72), rgba(255,255,255,0.3)), var(--panel);
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 16px 42px rgba(29,41,48,0.1);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
}
.browser-bar { display: grid; grid-template-columns: 9px 9px 9px 1fr; gap: 7px; align-items: center; min-height: 38px; padding: 0 14px; border-bottom: 1px solid var(--glass-line); background: rgba(255,255,255,0.46); }
.browser-bar > span { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.browser-bar > span:nth-child(2) { background: #e0ad48; }
.browser-bar > span:nth-child(3) { background: var(--green); }
.browser-bar small { justify-self: center; color: var(--muted); font-size: 0.68rem; }
.browser-frame > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.hero-facts { position: absolute; right: 18px; bottom: 0; left: 54px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 16px; border: 1px solid var(--glass-line); border-radius: 8px; background: rgba(255,255,255,var(--glass-alpha)); box-shadow: var(--shadow); backdrop-filter: blur(var(--glass-blur)) saturate(1.3); }
.hero-facts span { flex: 1 0 100%; color: var(--muted); font-size: 0.72rem; font-weight: 900; text-transform: uppercase; }
.hero-facts strong { padding: 6px 10px; border: 1px solid rgba(255,255,255,0.52); border-radius: 999px; background: rgba(255,255,255,0.44); font-size: 0.78rem; }

.section { padding: 76px 0; }
section[id] { scroll-margin-top: 112px; }
.section-intro { display: grid; grid-template-columns: minmax(160px, 0.38fr) minmax(0, 1fr); gap: 28px; align-items: end; margin-bottom: 34px; }
.section-intro .eyebrow, .section-intro h2 { margin-bottom: 0; }
.work-section { border-block: 1px solid var(--glass-line); background: linear-gradient(135deg, rgba(255,255,255,0.28), rgba(237,245,241,0.24) 48%, rgba(82,111,157,0.1)), rgba(255,255,255,0.16); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.work-card { min-height: 100%; padding: 24px; transition: transform 180ms var(--ease), box-shadow 180ms ease; }
.work-card::after { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--accent); content: ""; }
.work-card:nth-child(2)::after { background: var(--green); }
.work-card:nth-child(3)::after { background: var(--blue); }
.work-card:hover { transform: translateY(-5px); box-shadow: var(--hover-shadow); }
.work-card > span { display: inline-grid; min-width: 38px; min-height: 28px; place-items: center; margin-bottom: 30px; border-radius: 999px; color: var(--accent-dark); background: rgba(223,111,69,0.12); font-size: 0.78rem; font-weight: 900; }
.work-card:nth-child(2) > span { color: #426f60; background: rgba(101,143,128,0.15); }
.work-card:nth-child(3) > span { color: #3d5e8f; background: rgba(82,111,157,0.14); }
.work-card p { margin-bottom: 0; color: var(--muted); }

.result-band { position: relative; overflow: hidden; color: #f7faf7; background: linear-gradient(125deg, #18272e, #28413f 56%, #32445f); }
.result-band::before, .result-band::after { position: absolute; width: 380px; height: 380px; border-radius: 50%; content: ""; filter: blur(12px); }
.result-band::before { top: -210px; left: -120px; background: rgba(223,111,69,0.2); }
.result-band::after { right: -160px; bottom: -230px; background: rgba(82,111,157,0.28); }
.result-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 0.9fr; gap: 50px; align-items: center; }
.result-grid .section-intro { display: block; margin-bottom: 0; }
.result-grid .eyebrow { color: #f2a883; }
.result-grid .section-intro > p:last-child { color: rgba(247,250,247,0.74); }
.quote-card { padding: clamp(32px, 5vw, 54px); border-color: rgba(255,255,255,0.2); background: linear-gradient(145deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 24px 60px rgba(0,0,0,0.2); }
.quote-card::before { position: absolute; top: -26px; left: 18px; color: rgba(255,255,255,0.12); content: "“"; font-size: 9rem; font-weight: 900; line-height: 1; }
blockquote { position: relative; margin: 0 0 24px; font-size: clamp(1.45rem, 2.7vw, 2.2rem); font-weight: 750; line-height: 1.25; }
figcaption { color: var(--muted); font-size: 0.88rem; }
.quote-card figcaption { color: rgba(247,250,247,0.68); }

.screens-section { overflow: hidden; background: linear-gradient(135deg, rgba(237,245,241,0.42), rgba(255,255,255,0.12) 46%, rgba(223,111,69,0.08)); }
.screens-grid { position: relative; min-height: 650px; padding: 10px 8px 36px; }
.screen-card { position: relative; margin: 0; transition: transform 200ms var(--ease); }
.screen-card img { display: block; width: 100%; }
.screen-card figcaption { padding: 14px 8px 4px; color: var(--muted); font-weight: 800; }
.screen-desktop { width: calc(100% - 168px); }
.device-laptop { margin-inline: 4.5%; filter: drop-shadow(0 28px 28px rgba(29,41,48,0.24)); }
.laptop-lid { position: relative; padding: 17px 17px 19px; border: 2px solid #687178; border-bottom: 0; border-radius: 20px 20px 5px 5px; background: linear-gradient(145deg, #273139, #10171c); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16); }
.laptop-lid img { border-radius: 3px; }
.laptop-camera { position: absolute; top: 6px; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: #050709; box-shadow: 0 0 0 1px rgba(255,255,255,0.08); transform: translateX(-50%); }
.laptop-base { position: relative; height: 20px; margin-inline: -4.5%; border-radius: 2px 2px 14px 14px; background: linear-gradient(180deg, #e7eaeb 0 24%, #aab1b5 30%, #dadddf 66%, #7d858a 100%); box-shadow: 0 7px 11px rgba(29,41,48,0.22); }
.laptop-base::after { position: absolute; inset: auto 5% -3px; height: 4px; border-radius: 0 0 50% 50%; background: #71797e; content: ""; }
.laptop-base span { position: absolute; top: 0; left: 50%; width: 16%; height: 6px; border-radius: 0 0 7px 7px; background: linear-gradient(180deg, #9da5a9, #dadddf); transform: translateX(-50%); }
.screen-mobile { position: absolute; right: 0; bottom: 0; width: 238px; transform: rotate(1.5deg); }
.screen-mobile:hover { transform: translateY(-5px) rotate(0deg); }
.device-phone { position: relative; padding: 17px 9px 21px; border: 2px solid #646d73; border-radius: 35px; background: linear-gradient(145deg, #252f36, #0c1216); box-shadow: 0 34px 72px rgba(29,41,48,0.3), inset 0 0 0 1px rgba(255,255,255,0.18); }
.device-phone::before, .device-phone::after { position: absolute; left: -5px; width: 3px; border-radius: 3px 0 0 3px; background: #4d565c; content: ""; }
.device-phone::before { top: 92px; height: 40px; }
.device-phone::after { top: 144px; height: 62px; }
.device-phone img { border-radius: 20px; }
.phone-island { position: absolute; top: 23px; left: 50%; z-index: 2; width: 35%; height: 18px; border-radius: 999px; background: #090d10; transform: translateX(-50%); }
.phone-island span { position: absolute; top: 6px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: #172d3d; box-shadow: inset 0 0 0 1px rgba(91,143,174,0.25); }
.phone-home { position: absolute; bottom: 8px; left: 50%; width: 34%; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.78); transform: translateX(-50%); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.next-section { padding-top: 18px; }
.next-card { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: clamp(30px, 5vw, 54px); background: linear-gradient(125deg, rgba(223,111,69,0.13), rgba(255,255,255,0.5) 42%, rgba(101,143,128,0.16), rgba(82,111,157,0.12)); }
.next-card h2 { max-width: 760px; margin-bottom: 0; }
footer { padding: 38px 0 90px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; padding-top: 28px; border-top: 1px solid var(--line); }
.footer-inner div { display: flex; flex-wrap: wrap; gap: 18px; }
.version-pill { position: fixed; right: 18px; bottom: 18px; z-index: 35; padding: 7px 10px; border: 1px solid rgba(29,41,48,0.18); border-radius: 999px; color: #111a20; background: rgba(255,255,255,0.94); box-shadow: 0 10px 26px rgba(29,41,48,0.18); font-size: 0.76rem; font-weight: 800; backdrop-filter: blur(18px); }
.mobile-cta { display: none; }

[data-theme="night"] { --ink: #f2f6f4; --muted: #b8c5c3; --paper: #111a20; --soft: #17242a; --line: rgba(255,255,255,0.12); --panel: rgba(24,35,41,0.64); --glass-line: rgba(255,255,255,0.15); --glass-shine: rgba(255,255,255,0.16); }
[data-theme="night"] body { background: linear-gradient(115deg, rgba(21,36,39,0.96), rgba(32,28,26,0.62) 52%, rgba(24,34,48,0.94)), linear-gradient(245deg, rgba(82,111,157,0.24), transparent 42%, rgba(223,111,69,0.16)), var(--paper); }
[data-theme="night"] .topbar { background: rgba(17,26,32,var(--surface-alpha)); }
[data-theme="night"] .settings-panel, [data-theme="night"] .settings-button, [data-theme="night"] .settings-close, [data-theme="night"] .hero-facts { background: linear-gradient(145deg, rgba(35,48,54,var(--glass-alpha)), rgba(24,35,41,0.72)); }
[data-theme="night"] .browser-frame, [data-theme="night"] .work-card, [data-theme="night"] .next-card { background: linear-gradient(145deg, rgba(42,55,61,0.74), rgba(20,31,37,0.54)), var(--panel); }
[data-theme="night"] .browser-bar { background: rgba(24,35,41,0.84); }
[data-theme="night"] .hero-facts strong, [data-theme="night"] .settings-about, [data-theme="night"] .settings-segmented { background: rgba(255,255,255,0.08); }
[data-theme="night"] .settings-panel select { background: rgba(17,26,32,0.88); }
[data-theme="night"] .button, [data-theme="night"] .settings-segmented button[aria-pressed="true"] { color: #111a20; background: #f2f6f4; }

.reveal-ready .reveal { opacity: 0; transform: translateY(22px); transition: opacity 620ms var(--ease), transform 620ms var(--ease); transition-delay: var(--delay, 0ms); }
.reveal-ready .reveal.is-visible { opacity: 1; transform: none; }
.work-card:nth-child(2) { --delay: 70ms; }
.work-card:nth-child(3) { --delay: 140ms; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { max-width: 720px; }
  .hero-visual { width: min(100%, 760px); justify-self: center; }
  .work-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .screens-grid { min-height: 520px; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1120px); }
  .topbar-inner { padding-block: 12px; }
  nav { gap: 12px; font-size: 0.84rem; }
  .hero { gap: 34px; padding: 54px 0 64px; }
  .back-link { margin-bottom: 28px; }
  h1 { font-size: clamp(3.05rem, 16vw, 4.45rem); }
  .hero-visual { padding: 0; }
  .hero-visual::before { inset: 6% 0 22%; }
  .hero-facts { position: relative; right: auto; bottom: auto; left: auto; margin: -10px 10px 0; }
  .browser-bar small { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .section { padding: 64px 0; }
  .section-intro { grid-template-columns: 1fr; gap: 10px; }
  .screens-grid { display: grid; min-height: 0; gap: 16px; }
  .screen-desktop { width: 100%; }
  .screen-mobile { position: relative; right: auto; bottom: auto; width: min(72%, 290px); justify-self: center; transform: none; }
  .next-card { align-items: flex-start; flex-direction: column; }
  .footer-inner { flex-direction: column; }
  .mobile-cta { position: fixed; right: 12px; bottom: 12px; left: 12px; z-index: 1000; isolation: isolate; display: flex; min-height: 50px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.24); border-radius: 999px; color: #fff; background: linear-gradient(135deg, #1d2930, #2a4449); box-shadow: 0 18px 44px rgba(29,41,48,0.28); font-weight: 900; text-decoration: none; opacity: 0; transform: translateY(80px); transition: opacity 200ms ease, transform 260ms var(--ease); }
  .mobile-cta.is-visible { opacity: 1; transform: translate3d(0,0,0); }
  .version-pill { right: 18px; bottom: 74px; }
  footer { padding-bottom: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
