@charset "UTF-8";
/* Web fonts */
@import url('https://fonts.googleapis.com/css2?family=Kodchasan:wght@400;600;700&family=Nunito+Sans:opsz,wght@6..12,400;6..12,600;6..12,700&display=swap');

/* =========================================================
   Design tokens
   ========================================================= */
:root{
  --bg:#ffffff;
  --fg:#0f0f10;
  --muted:#5c5f66;
  --rule:#e9ecef;
  --accent:#17c964;
  --max:1100px;      /* page max width */
  --content:880px;   /* text column max width */

  /* Type scales (override at breakpoints) */
  --h1: clamp(28px, 5.2vw, 54px);
  --body: clamp(15px, 1.9vw, 18px);
  --sub: clamp(14px, 2vw, 18px);
  --nav: 14px;

  /* Spacing */
  --page-x: 22px;
  --page-y: 28px;
  --gap: 24px;
}

*{ box-sizing:border-box }
html, body{ height:100%; background:var(--bg); color:var(--fg); }
body{
  margin:0;
  font-family:"Nunito Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* =========================================================
   Page frame
   ========================================================= */
.page{
  max-width:var(--max);
  margin:0 auto;
  padding:var(--page-y) var(--page-x) 80px;
}

/* =========================================================
   Header / Brand / Nav
   ========================================================= */
.site-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:4px 0 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
}
.brand-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
}
.brand-img{
  display:block;
  width:170px; /* scales at breakpoints */
  height:auto;
}

.nav{
  display:flex;
  gap:16px;
  align-items:center;
  flex-wrap:wrap;        /* allows wrap on medium screens */
}
.nav a{
  color:var(--fg);
  text-decoration:none;
  font-weight:600;
  font-size:var(--nav);
  padding:10px 12px;     /* comfy touch targets */
  border-radius:999px;
  line-height:1;
}
.nav a:hover{ background:#f4f6f8 }

/* =========================================================
   Hero section (video + title)
   ========================================================= */
.hero{
  display:grid;
  gap:20px;
  margin-top:10px;
}
.hero-media{
  position:relative;
  border:1px solid var(--rule);
  border-radius:14px;
  overflow:hidden;
  background:linear-gradient(180deg,#f8fafc,#f1f5f9);
}
.hero-media::before{ content:""; display:block; padding-top:56.25%; } /* 16:9 */
.hero-media iframe{
  position:absolute; inset:0; width:100%; height:100%; border:0;
}

.title-wrap{
  text-align:center;
  margin:20px auto 8px;
  max-width:var(--content);
}
h1{
  font-family:"Kodchasan", ui-sans-serif, system-ui;
  font-weight:700;
  font-size:var(--h1);
  letter-spacing:0.2px;
  margin:0 0 8px;
  line-height:1.06;
}
.subhead{
  color:var(--muted);
  font-size:var(--sub);
  margin-top:12px;
}

/* =========================================================
   Main content
   ========================================================= */
main{
  max-width:var(--content);
  margin:26px auto 0;
  display:grid;
  gap:var(--gap);
}
p{
  font-size:var(--body);
  line-height:1.62;
  margin:0;
}

/* Buttons / CTAs */
.cta{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:center;
  margin-top:26px;
}
.btn{
  appearance:none;
  border:1px solid var(--rule);
  background:#fff;
  color:#111;
  padding:12px 16px;
  border-radius:999px;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
  line-height:1;
}
.btn.primary{ background:var(--fg); color:#fff; border-color:var(--fg) }

/* =========================================================
   Specs table (desktop/tablet)
   ========================================================= */
.specs{
  max-width:var(--content);
  margin:8px auto 0;
  border:1px solid var(--rule);
  border-radius:12px;
  overflow:hidden;
}
.specs table{
  width:100%;
  border-collapse:collapse;
  font-size:15px;
}
.specs thead th{
  background:#0f0f10;
  color:#fff;
  text-align:left;
  padding:10px 14px;
  font-weight:700;
}
.specs td{
  padding:10px 14px;
  border-top:1px solid var(--rule);
  vertical-align:top;
}
.specs tbody tr:nth-child(odd){ background:#fafbfc }

/* =========================================================
   Footer
   ========================================================= */
.site-footer{
  max-width:var(--content);
  margin:40px auto 0;
  padding-top:16px;
  border-top:1px solid var(--rule);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.motto{ font-size:12px; color:var(--muted) }

/* =========================================================
   Motion preferences
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  *{
    animation-duration:0.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.01ms !important;
    scroll-behavior:auto !important;
  }
}

/* =========================================================
   Breakpoints
   ========================================================= */

/* --- Large tablets & small laptops --- */
@media (max-width: 900px){
  :root{
    --content: 760px;
    --h1: clamp(26px, 5.4vw, 44px);
    --body: clamp(15px, 2.2vw, 17px);
    --sub: clamp(14px, 2.2vw, 17px);
  }
  .brand-img{ width:150px; }
  .page{ padding-left:18px; padding-right:18px; }
  .nav{ gap:12px; }
}

/* --- Phones in landscape / small tablets in portrait --- */
@media (max-width: 680px){
  :root{
    --content: 92vw;   /* allow more width, keep margins */
    --h1: clamp(24px, 6.4vw, 38px);
    --body: 16px;
    --sub: 15px;
  }

  .site-header{
    gap:10px;
    padding-bottom:10px;
  }
  .brand-img{ width:138px; }

  /* Stack CTAs */
  .cta{ justify-content:stretch; }
  .btn{ flex:1 1 auto; text-align:center; }

  /* Tighter hero spacing */
  .title-wrap{ margin:12px auto 0; }
}

/* --- Small phones (375–480) --- */
@media (max-width: 480px){
  :root{
    --page-x: 16px;
    --h1: clamp(22px, 7vw, 34px);
    --body: 15.5px;
    --sub: 14.5px;
  }

  .brand-img{ width:126px; }
  .nav{
    gap:8px;
    overflow-x:auto;       /* prevent wrap explosion; allow swipe */
    -webkit-overflow-scrolling:touch;
    padding-bottom:4px;
  }
  .nav a{
    font-size:13px;
    padding:9px 12px;
    white-space:nowrap;
  }

  .cta{
    gap:10px;
    flex-direction:column; /* full-width stacked buttons */
  }
  .btn{ width:100%; padding:13px 14px; }

  .site-footer{
    gap:8px;
    row-gap:6px;
  }
  .motto{ font-size:11.5px; }
}

/* --- Ultra-narrow (<=360) --- */
@media (max-width: 360px){
  :root{
    --page-x: 14px;
    --h1: 22px;
    --body: 15px;
    --sub: 14px;
  }
  .brand-img{ width:118px; }
  .nav a{ font-size:12.5px; padding:8px 10px; }
  .btn{ padding:12px 12px; }
}

/* =========================================================
   Mobile Card Table Layout for Specs
   (requires data-label="Function" / "Description" on <td>)
   ========================================================= */
@media (max-width: 680px){
  .specs table,
  .specs thead,
  .specs tbody,
  .specs th,
  .specs td,
  .specs tr {
    display:block;
    width:100%;
  }

  .specs thead { display:none; } /* hide header on mobile */

  .specs tr {
    border:1px solid var(--rule);
    border-radius:10px;
    margin-bottom:14px;
    background:#fafbfc;
    padding:10px 12px;
  }

  .specs td {
    border:none;
    position:relative;
    padding:8px 0 8px 45%;
    font-size:15px;
    line-height:1.4;
  }

  .specs td::before {
    content: attr(data-label);
    position:absolute;
    left:0;
    top:8px;
    width:40%;
    padding-right:10px;
    font-weight:600;
    color:var(--muted);
    text-align:right;
    font-size:13px;
  }

  .specs td:first-child {
    font-weight:700;
    color:var(--fg);
  }
}
/* ===== Horizontal overflow guardrails ===== */
html, body { overflow-x: hidden; }

/* Never let media exceed the viewport */
img, iframe, video { max-width: 100%; height: auto; display: block; }

/* Make sure the main wrapper itself can't leak */
.page { overflow-x: clip; }

/* Navigation: allow its own internal scroll instead of pushing the page */
.site-header, .brand, .nav { min-width: 0; }
.nav { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nav a { white-space: nowrap; }

/* Hero video container: protect against sub-pixel rounding + borders */
.hero-media { margin-left: auto; margin-right: auto; width: 100%; }

/* Bandcamp block: prevent any built-in min-width from causing overflow */
#hear iframe { width: 100% !important; max-width: 100% !important; }

/* Specs: no horizontal scroll in any mode */
.specs { overflow-x: hidden; }

/* ===== Fix uneven side margins (mobile centering) ===== */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Center the page consistently */
.page {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-x);
  padding-right: var(--page-x);
  box-sizing: border-box;
}

/* Prevent subpixel shifts caused by flex gaps */
.site-header,
main,
.site-footer {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--content);
  box-sizing: border-box;
}

/* === iOS-safe centering and overflow guards === */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* Ensure the main wrapper is perfectly centered with safe-area padding */
.page {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--max);
  padding-left: calc(var(--page-x) + env(safe-area-inset-left));
  padding-right: calc(var(--page-x) + env(safe-area-inset-right));
  box-sizing: border-box;
  width: min(100%, var(--max));
}

/* Inner sections respect the text column and stay centered */
.site-header,
main,
.site-footer {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--content);
  box-sizing: border-box;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Media must never overflow */
img, iframe, video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Prevent fractional/border overflow */
.hero-media,
.specs {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

/* Bandcamp iframe sometimes ships a conservative min-width */
#hear iframe { width: 100% !important; max-width: 100% !important; }

/* Optional: avoid nav causing page-wide overflow */
@media (max-width: 480px){
  .nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav a { white-space: nowrap; }
}

