/* Guitalele Tuner & Chords — "luthier's catalogue" look.
   Paper + ink for reading, tonewood for the instrument. Palette echoes the app (lib/theme/app_theme.dart). System fonts only. */
:root {
  --paper: #f3ebdc; --paper-2: #eadfca; --ink: #2a1e14; --ink-2: #5b4a39;
  --wood: #2a1d14; --wood-2: #3b2a1c; --cream: #f3ebdd; --cream-2: #c4b6a0;
  --brass: #8a5a0b; --amber: #ffa62b; --rule: rgba(42, 30, 20, .22); --rule-d: rgba(243, 235, 221, .2);
  --red: #b3261e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1100px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--brass); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid #c46a00; outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.9rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 500; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
em { font-style: italic; }
.mono { font-family: var(--mono); font-size: .86em; letter-spacing: .02em; }
.dark { background: var(--wood); color: var(--cream); }
.dark a { color: var(--amber); }
.dark .muted, .muted { color: var(--ink-2); }
.dark .muted { color: var(--cream-2); }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--rule); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.brand b { font-weight: 600; font-style: italic; color: var(--brass); }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--ink); color: var(--ink); padding: 7px 12px; font: inherit; cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 4px 20px 16px; }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
}

/* buttons: plain rectangles, like a stamped label */
.btn { display: inline-block; padding: 12px 22px; border: 1.5px solid var(--ink); background: none; color: var(--ink); font: 600 .98rem var(--sans); text-decoration: none; cursor: pointer; border-radius: 3px; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--brass); border-color: var(--brass); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.dark .btn { border-color: var(--cream); color: var(--cream); }
.dark .btn:hover { background: var(--cream); color: var(--wood); }
.dark .btn-primary { background: var(--amber); border-color: var(--amber); color: #2a1a05; }
.dark .btn-primary:hover { background: #ffc15e; border-color: #ffc15e; color: #2a1a05; }
.nav-links .btn-primary { color: var(--paper); text-decoration: none; }
.nav-links .btn-primary:hover { text-decoration: none; }

section { padding: clamp(64px, 10vw, 120px) 0; }
.mark { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); margin: 0 0 1rem; }
.dark .mark { color: var(--amber); }

/* hero: dark tonewood with faint grain */
.hero { background:
    repeating-linear-gradient(92deg, rgba(255, 200, 140, .035) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(88deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 23px),
    var(--wood);
  color: var(--cream); padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 110px); overflow: hidden; }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1.05fr .95fr; align-items: center; }
.hero h1 em { color: var(--amber); font-style: italic; }
.hero .lead { font-size: 1.2rem; color: var(--cream-2); max-width: 31em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 18px; }
.fineprint { font-size: .86rem; color: var(--ink-2); }
.dark .fineprint { color: var(--cream-2); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* two overlapping handsets */
.handsets { position: relative; height: clamp(440px, 62vw, 620px); }
.phone { position: absolute; background: #0c0907; border-radius: 34px; padding: 9px; box-shadow: 0 0 0 1.5px #5a4630, 0 28px 50px rgba(0, 0, 0, .55); }
.phone img { border-radius: 26px; width: 100%; height: auto; background: #14110f; }
.phone.a { width: min(270px, 52%); left: 4%; top: 0; transform: rotate(-4deg); z-index: 2; }
.phone.b { width: min(250px, 48%); right: 2%; top: 14%; transform: rotate(5deg); }
.shot-note { margin-top: 10px; }

/* editorial lists instead of cards */
.split { display: grid; gap: clamp(32px, 6vw, 80px); grid-template-columns: 5fr 7fr; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.spec { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.spec li { display: grid; grid-template-columns: 64px 1fr; gap: 8px 20px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.spec .n { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--brass); line-height: 1.2; }
.spec h3 { margin: 0 0 .3em; }
.spec p { margin: 0; color: var(--ink-2); max-width: 36em; }
.spec .tag { display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: .8rem; color: var(--ink); border-bottom: 1.5px solid var(--brass); }

/* string chart */
.chart { background: var(--wood); color: var(--cream); padding: clamp(18px, 3vw, 32px); border-radius: 4px; }
.chart svg { width: 100%; height: auto; }
.chart figcaption { margin-top: 10px; font-size: .86rem; color: var(--cream-2); }
.compare { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; margin: 24px 0 0; font-family: var(--mono); font-size: .9rem; }
.compare dt { color: var(--brass); }
.compare dd { margin: 0; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1.5px solid var(--cream); counter-reset: s; }
.steps li { counter-increment: s; padding: 22px 24px 8px 0; border-right: 1px solid var(--rule-d); margin-right: 24px; }
.steps li:last-child { border-right: 0; margin-right: 0; }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font-family: var(--serif); font-style: italic; font-size: 2.6rem; line-height: 1; color: var(--amber); margin-bottom: 14px; }
.steps h3 { font-size: 1.2rem; }
.steps p { color: var(--cream-2); font-size: .98rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } .steps li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--rule-d); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* chords preview */
.callouts { list-style: none; padding: 0; margin: 28px 0 0; }
.callouts li { padding: 14px 0; border-top: 1px solid var(--rule); }
.callouts li:last-child { border-bottom: 1px solid var(--rule); }
.callouts b { font-family: var(--serif); font-size: 1.1rem; }
.single-phone { position: relative; width: min(300px, 80%); margin-inline: auto; }
.single-phone .phone { position: relative; width: 100%; transform: rotate(2deg); }

/* benefits */
.pull { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1.5px solid var(--ink); }
.pull > div { padding: 28px 28px 8px 0; margin-right: 28px; border-right: 1px solid var(--rule); }
.pull > div:last-child { border-right: 0; margin-right: 0; }
.pull h3 { font-size: 1.5rem; font-weight: 500; }
.pull p { color: var(--ink-2); }
@media (max-width: 800px) { .pull { grid-template-columns: 1fr; } .pull > div { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--rule); } }

.note-box { border: 1.5px solid var(--ink); padding: clamp(22px, 4vw, 40px); display: grid; gap: 8px 40px; grid-template-columns: 1fr 1.4fr; align-items: center; background: var(--paper-2); }
.note-box h2 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.note-box p { margin: 0; }
@media (max-width: 760px) { .note-box { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 800px; border-top: 1.5px solid var(--ink); }
details { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; padding: 20px 0; font-family: var(--serif); font-size: 1.25rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--brass); }
details[open] summary::after { content: "−"; }
details .answer { padding: 0 0 20px; color: var(--ink-2); max-width: 40em; }
details .answer p:last-child { margin: 0; }

/* download */
.stores { display: flex; flex-wrap: wrap; gap: 16px; margin: 28px 0 14px; }
.store { min-width: 230px; border: 1.5px dashed var(--cream-2); padding: 14px 22px; color: var(--cream); display: block; text-decoration: none; }
.store small { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.store strong { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; }
a.store { border-style: solid; }
a.store:hover { background: var(--cream); color: var(--wood); }

/* prose / legal pages */
.page-head { padding: clamp(40px, 6vw, 72px) 0 28px; border-bottom: 1.5px solid var(--ink); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: .2em; }
.prose { max-width: 740px; padding: 40px 0 96px; }
.prose h2 { font-size: 1.7rem; margin-top: 2.2em; padding-top: .6em; border-top: 1px solid var(--rule); }
.prose h3 { margin-top: 1.6em; font-size: 1.2rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.toc { border: 1px solid var(--ink); padding: 18px 26px; background: var(--paper-2); }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.callout, .card { border-left: 4px solid var(--brass); background: var(--paper-2); padding: 16px 22px; margin: 24px 0; }
.callout.warn { border-left-color: var(--red); }
.card p:last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
th { font-family: var(--mono); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brass); border-bottom: 1.5px solid var(--ink); }
.table-wrap { overflow-x: auto; }
code { font-family: var(--mono); font-size: .9em; }
/* Placeholders stay loud so none ship by accident. */
.placeholder { background: #ffd9d4; outline: 1px dashed var(--red); padding: 0 .3em; font-family: var(--mono); font-size: .9em; color: #6b120c; }

/* footer */
.site-footer { background: var(--wood); color: var(--cream); padding: 56px 0 30px; }
.site-footer .brand { color: var(--cream); }
.site-footer .brand b { color: var(--amber); }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1.6fr 1fr 1fr; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-family: var(--mono); font-weight: 500; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer li a { color: var(--cream); text-decoration: none; }
.site-footer li a:hover { text-decoration: underline; }
.site-footer .muted { color: var(--cream-2); }
.legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--rule-d); font-size: .86rem; color: var(--cream-2); }
.site-footer .placeholder { color: #6b120c; }

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

/* prevent grid children from forcing horizontal overflow on narrow screens */
.hero-grid > *, .split > *, .note-box > *, .pull > * { min-width: 0; }
html, body { overflow-x: clip; }
@media (max-width: 520px) {
  h1 { font-size: 2.1rem; }
  .handsets { height: 128vw; }
  .phone.a { width: 58%; left: 0; }
  .phone.b { width: 52%; right: 0; top: 16%; }
}

/* Motion: calm and purposeful. All of it is disabled under prefers-reduced-motion (rule above). */
.handsets .phone.a { --r: -4deg; animation: float 7s ease-in-out infinite; }
.handsets .phone.b { --r: 5deg; animation: float 8s ease-in-out -3.5s infinite; }
@keyframes float { 0%, 100% { transform: rotate(var(--r)) translateY(0); } 50% { transform: rotate(var(--r)) translateY(-8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-grid > div:first-child > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-grid > div:first-child > :nth-child(2) { animation-delay: .08s; }
.hero-grid > div:first-child > :nth-child(3) { animation-delay: .16s; }
.hero-grid > div:first-child > :nth-child(4) { animation-delay: .24s; }
.hero-grid > div:first-child > :nth-child(5) { animation-delay: .32s; }
