:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: rgba(20, 20, 20, 0.94);
  --surface-soft: rgba(29, 25, 23, 0.9);
  --line: rgba(255, 107, 0, 0.3);
  --line-strong: rgba(255, 107, 0, 0.62);
  --text: #fff2e8;
  --muted: #c99e80;
  --orange: #ff6b00;
  --orange-soft: #ffb076;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
html[data-loading="true"] body { visibility: hidden; }
body { min-height: 100%; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, select, input[type="range"] { cursor: pointer; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

#shapes { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; }
.page-shell { position: relative; z-index: 1; min-height: 100vh; background: rgba(0, 0, 0, 0.46); }
.page-shell::before { position: fixed; inset: 0; z-index: -1; content: ""; pointer-events: none; opacity: 0.22; background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.9)), url("../assets/hangrylabs_badge.webp") center top / min(900px, 100vw) auto no-repeat; }
.page-content { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 42px; }

.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr); align-items: start; gap: 32px; padding-bottom: 32px; }
.hero-copy { min-width: 0; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 22px; padding: 13px; border: 1px solid rgba(255, 107, 0, 0.27); border-radius: 12px; background: rgba(10, 10, 10, 0.86); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28); backdrop-filter: blur(10px); }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 2px; color: inherit; text-decoration: none; }
.brand-logo { width: 44px; height: 44px; border: 1px solid rgba(255, 107, 0, 0.42); border-radius: 9px; object-fit: contain; box-shadow: 0 0 20px rgba(255, 107, 0, 0.22); }
.brand-lockup span { display: grid; gap: 2px; }
.brand-lockup strong { color: var(--orange-soft); font-size: 1rem; line-height: 1.1; }
.brand-lockup small { color: #ff8a33; font-size: 0.74rem; font-weight: 650; }
.top-actions, .top-links { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.volume-control { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 10px; border: 1px solid rgba(255, 107, 0, 0.34); border-radius: 999px; background: rgba(255, 107, 0, 0.1); }
.volume-button { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: var(--orange-soft); }
.volume-button:hover, .volume-button:focus-visible { color: var(--orange); outline: none; }
.volume-button svg { width: 23px; height: 23px; }
.volume-button path { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.volume-slider { width: 72px; accent-color: var(--orange); }
.pill { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 12px; border: 1px solid rgba(255, 107, 0, 0.42); border-radius: 999px; background: rgba(255, 107, 0, 0.12); color: var(--orange-soft); font-size: 0.78rem; font-weight: 750; }
.action-link { min-height: 38px; color: var(--orange-soft); text-decoration: none; }
.action-link:hover, .action-link:focus-visible { border-color: var(--orange); background: rgba(255, 107, 0, 0.22); color: #ffd0ad; outline: none; box-shadow: 0 0 16px rgba(255, 107, 0, 0.18); }

h1 { max-width: 760px; margin: 0; color: var(--orange); font-size: clamp(2.5rem, 6vw, 4.8rem); line-height: 0.96; letter-spacing: -0.045em; text-shadow: 0 0 20px rgba(255, 107, 0, 0.62), 0 0 48px rgba(255, 60, 0, 0.28); }
.intro { max-width: 760px; margin: 24px 0 0; color: var(--orange-soft); font-size: clamp(1rem, 1.6vw, 1.12rem); line-height: 1.7; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hero-logo-panel { display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; }
.hero-logo-link { display: grid; place-items: center; width: 100%; max-width: 360px; aspect-ratio: 4 / 3; text-decoration: none; }
.hero-logo-link:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.hero-logo { display: block; width: 100%; height: auto; object-fit: contain; }
.hero-site-link { width: min(360px, 100%); margin-top: 6px; color: #ff9b45; font-size: 0.78rem; font-weight: 750; text-align: center; text-decoration: none; text-shadow: 0 0 10px rgba(255, 107, 0, 0.5); animation: site-link-pulse 2.4s ease-in-out infinite; }

.examples-section { padding-top: 4px; }
.language-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter-button { min-height: 38px; padding: 7px 13px; border: 1px solid rgba(255, 107, 0, 0.4); border-radius: 999px; background: rgba(20, 20, 20, 0.86); color: var(--orange-soft); font-size: 0.78rem; font-weight: 750; transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease; }
.filter-button:hover, .filter-button:focus-visible, .filter-button.is-active { border-color: var(--orange); outline: none; background: rgba(255, 107, 0, 0.22); color: #ffd0ad; box-shadow: 0 0 16px rgba(255, 107, 0, 0.18); }
.loading-state { padding: 30px; border: 1px dashed var(--line); border-radius: 12px; background: rgba(10, 10, 10, 0.68); color: var(--muted); text-align: center; }
.loading-state[data-state="error"] { border-color: rgba(239, 107, 115, 0.55); color: #ffc2c6; }
.example-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.example-card { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; padding: 18px; border: 2px solid rgba(255, 107, 0, 0.28); border-radius: 12px; background: var(--surface); box-shadow: 0 0 28px rgba(255, 107, 0, 0.08); transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.example-card:hover { border-color: rgba(255, 107, 0, 0.72); box-shadow: 0 0 26px rgba(255, 107, 0, 0.24); transform: translateY(-2px); }
.example-card.is-playing { border-color: var(--orange); animation: card-pulse 1.4s ease-in-out infinite; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 107, 0, 0.2); }
.card-title { min-width: 0; }
.card-title h3 { margin: 0; color: #ff974d; font-size: 1.08rem; overflow-wrap: anywhere; }
.card-title p { margin: 4px 0 0; color: var(--muted); font-size: 0.72rem; }
.sample-badge { flex: 0 0 auto; padding: 4px 8px; border: 1px solid rgba(255, 107, 0, 0.3); border-radius: 999px; background: rgba(255, 107, 0, 0.1); color: #d8c2b3; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.64rem; }
.reference { padding: 16px 0 12px; }
.reference-label { display: block; margin-bottom: 7px; color: #ff8a33; font-size: 0.68rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.reference p { margin: 0; color: #f5dfcf; font-size: 0.86rem; line-height: 1.6; overflow-wrap: anywhere; }
.player { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(255, 107, 0, 0.2); }
.play-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #ff9b55; border-radius: 50%; background: linear-gradient(145deg, #ff8430, #ff6500); color: #210d02; box-shadow: 0 7px 18px rgba(255, 87, 0, 0.25); }
.play-button:hover, .play-button:focus-visible { outline: none; background: linear-gradient(145deg, #ff9a55, #ff7921); box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18), 0 9px 22px rgba(255, 87, 0, 0.32); }
.play-button svg { width: 19px; height: 19px; fill: currentColor; }
.player-track { min-width: 0; }
.progress-button { display: block; width: 100%; min-width: 0; padding: 10px 0; border: 0; background: transparent; touch-action: none; user-select: none; }
.progress-button:focus-visible { border-radius: 5px; outline: 2px solid rgba(255, 107, 0, 0.8); outline-offset: 2px; }
.progress-track { position: relative; display: flex; align-items: center; width: 100%; height: 9px; overflow: visible; border: 1px solid rgba(255, 107, 0, 0.3); border-radius: 999px; background: rgba(255, 107, 0, 0.16); box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); }
.progress-fill { position: absolute; top: 0; left: 0; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff6b00, #ff9b45); box-shadow: 0 0 14px rgba(255, 107, 0, 0.55); }
.progress-knob { position: absolute; top: 50%; left: 0; z-index: 2; width: 15px; height: 15px; border: 2px solid #ffc08a; border-radius: 50%; background: #ff6b00; box-shadow: 0 0 8px rgba(255, 107, 0, 0.7); transform: translate(-50%, -50%); }
.duration { display: block; color: var(--orange-soft); direction: ltr; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.68rem; text-align: right; unicode-bidi: isolate; }
audio { display: none; }

@keyframes card-pulse { 0%, 100% { box-shadow: 0 0 18px rgba(255, 107, 0, 0.25), 0 0 42px rgba(255, 107, 0, 0.1); } 50% { box-shadow: 0 0 28px rgba(255, 107, 0, 0.48), 0 0 68px rgba(255, 107, 0, 0.18); } }
@keyframes site-link-pulse { 0%, 100% { opacity: 0.72; } 50% { opacity: 1; } }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-logo-panel { align-items: flex-start; padding-top: 0; }
  .hero-logo-link { max-width: 300px; }
  .hero-site-link { width: min(300px, 100%); }
  .example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .page-content { width: min(100% - 24px, 1180px); padding-top: 12px; }
  .topbar { align-items: stretch; flex-direction: column; }
  .top-actions, .top-links { justify-content: flex-start; }
  .top-actions { width: 100%; }
  .volume-control { flex: 1 1 auto; }
  .volume-slider { flex: 1; min-width: 70px; }
  .hero { gap: 24px; padding-bottom: 34px; }
  .hero-logo-link { max-width: 220px; }
  .example-grid { grid-template-columns: 1fr; }
  .language-filter { flex-wrap: nowrap; margin-right: -12px; padding-right: 12px; overflow-x: auto; scrollbar-width: thin; }
  .filter-button { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  #shapes { display: none; }
}
