/* Six Impossible Things — site styles
   Built from Brand Guidelines (Fraunces + Figtree, earth palette, Oat/Bark).
   Calm by design: no autoplay, no motion beyond a gentle hover, reduced-motion respected. */

@font-face{font-family:"Fraunces";src:url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"Fraunces";src:url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2");font-weight:100 900;font-style:italic;font-display:swap}
@font-face{font-family:"Figtree";src:url("../fonts/figtree-latin-wght-normal.woff2") format("woff2");font-weight:300 900;font-style:normal;font-display:swap}
@font-face{font-family:"DM Mono";src:url("../fonts/dm-mono-latin-400-normal.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}

:root{
  /* Brand palette */
  --oat:#efe9dd; --off-white:#f7f9f9; --mist:#eff1ed; --panel:#e7e0c9; --river:#a59f8d;
  --bark:#2f2a22; --umber:#473f33;
  --deep-teal:#2b4747; --teal:#437c89; --stormy:#037171; --navy:#1b365c;
  --clay-red:#c85c41; --clay:#a4593a; --peach:#e6b89c;
  --yellow:#ffc55f; --gold:#d9a441; --green:#4f6f52;

  /* Light theme (default) */
  --bg:var(--oat);
  --surface:var(--off-white);
  --surface-2:#e7e0c9;
  --text:var(--bark);
  --muted:#5f574a;
  --line:#d5ccb8;
  --link:var(--deep-teal);
  --accent:#8f4a2e;
  --btn-bg:var(--deep-teal); --btn-fg:var(--off-white);
  --band-bg:var(--deep-teal); --band-fg:var(--oat); --band-accent:var(--yellow);
  --focus:#1b365c;
  --shadow:0 1px 2px rgba(47,42,34,.06),0 8px 24px rgba(47,42,34,.06);

  --radius:14px;
  --measure:62ch;
  --wrap:72rem;
  --font-head:"Fraunces",Georgia,serif;
  --font-body:"Figtree",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:"DM Mono",ui-monospace,Menlo,Consolas,monospace;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#2f2a22; --surface:#3a342a; --surface-2:#473f33; --text:var(--oat); --muted:#b8ae97;
    --line:#4f4636; --link:#e9c26f; --accent:var(--gold);
    --btn-bg:var(--yellow); --btn-fg:var(--bark);
    --band-bg:#2b4747; --band-fg:var(--oat); --band-accent:var(--yellow);
    --focus:#ffc55f; --shadow:none;
  }
}
:root[data-theme="dark"]{
  --bg:#2f2a22; --surface:#3a342a; --surface-2:#473f33; --text:var(--oat); --muted:#b8ae97;
  --line:#4f4636; --link:#e9c26f; --accent:var(--gold);
  --btn-bg:var(--yellow); --btn-fg:var(--bark);
  --band-bg:#2b4747; --band-fg:var(--oat); --band-accent:var(--yellow);
  --focus:#ffc55f; --shadow:none;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important;animation:none!important}}
body{margin:0;background:var(--bg);color:var(--text);font:400 1.0625rem/1.6 var(--font-body);min-height:100vh;display:flex;flex-direction:column}
main{flex:1}
img,svg{max-width:100%;display:block}
h1,h2,h3,h4{font-family:var(--font-head);font-weight:600;line-height:1.15;margin:0;letter-spacing:-.01em}
h1{font-size:clamp(2.4rem,6.2vw,3.75rem);letter-spacing:-.02em}
h2{font-size:clamp(1.75rem,3.6vw,2.4rem)}
h3{font-size:1.3rem}
p{margin:0 0 1rem;max-width:var(--measure)}
h1+p,h2+p,h3+p{margin-top:.75rem}
ul,ol{margin:0 0 1rem;padding-left:1.2rem;max-width:var(--measure)}
li{margin:.3rem 0}
a{color:var(--link);text-underline-offset:.2em;text-decoration-thickness:1px}
a:hover{text-decoration-thickness:2px}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:4px}
strong,b{font-weight:600}
.muted{color:var(--muted)}
.lead{font-size:clamp(1.15rem,2vw,1.35rem);line-height:1.5;max-width:52ch}
.eyebrow{font:400 .8125rem/1.3 var(--font-mono);color:var(--muted);letter-spacing:.02em;margin:0 0 .9rem;display:block}
.band .eyebrow{color:var(--band-fg);opacity:.85}
.wrap{width:100%;max-width:var(--wrap);margin:0 auto;padding:0 1.25rem}
@media(min-width:48rem){.wrap{padding:0 2rem}}
.section{padding:clamp(3rem,7vw,5.5rem) 0}
.section.alt{background:var(--surface)}
.section-head{margin-bottom:2rem;max-width:44rem}
.section-head p{color:var(--muted)}
.stack>*+*{margin-top:1rem}

.skip{position:absolute;left:-999px;top:0;background:var(--btn-bg);color:var(--btn-fg);padding:.75rem 1rem;z-index:100;border-radius:0 0 8px 0}
.skip:focus{left:0}

/* Marks and tiles */
.tile{background:none;border-radius:12px;display:grid;place-items:center;flex:none}
.tile svg{width:100%;height:100%}
.tile.sm{width:2.5rem;height:2.5rem;border-radius:10px}
.tile.md{width:4.25rem;height:4.25rem;}
.tile.lg{width:6.5rem;height:6.5rem;border-radius:16px}
.tile.xl{width:min(100%,9rem);aspect-ratio:1;border-radius:20px}

/* Header */
.site-header{border-bottom:1px solid var(--line);background:var(--bg)}
.header-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 0}
.brand{display:flex;align-items:center;gap:.75rem;text-decoration:none;color:var(--text)}
.brand-name{font:600 1.15rem/1.1 var(--font-head);display:block}
.brand-line{font-size:.8125rem;color:var(--muted);display:block;margin-top:.15rem}
.site-nav ul{display:flex;align-items:center;gap:.4rem 1.4rem;list-style:none;margin:0;padding:0;flex-wrap:wrap;max-width:none}
.site-nav li{margin:0}
.site-nav a{color:var(--text);text-decoration:none;padding:.5rem .1rem;display:inline-block;border-bottom:2px solid transparent;font-size:1rem}
.site-nav a:hover{border-bottom-color:var(--line)}
.site-nav a[aria-current="page"]{border-bottom-color:var(--accent);font-weight:600}
.site-nav a.btn{border:2px solid var(--btn-bg);padding:.6rem 1.1rem;color:var(--btn-fg)}
.site-nav a.btn:hover{border-color:var(--btn-bg)}
.header-tools{display:flex;align-items:center;gap:.6rem}
.nav-toggle,.theme-toggle{font:inherit;color:var(--text);background:transparent;border:1px solid var(--line);border-radius:999px;padding:.45rem .9rem;cursor:pointer;min-height:2.5rem}
.nav-toggle:hover,.theme-toggle:hover{border-color:var(--text)}
.theme-toggle{display:none}
.js .theme-toggle{display:inline-block}
.nav-toggle{display:none}
@media(max-width:55rem){
  .js .nav-toggle{display:inline-block}
  .header-row{flex-wrap:wrap}
  .js .site-nav{width:100%;order:3;display:none}
  .js .site-nav.open{display:block}
  .js .site-nav ul{flex-direction:column;align-items:flex-start;padding:.5rem 0 1rem}
  .site-nav{width:100%;order:3}
  .brand-line{display:none}
}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:.5rem;background:var(--btn-bg);color:var(--btn-fg);font:600 1rem/1 var(--font-body);padding:.95rem 1.4rem;border-radius:999px;border:2px solid var(--btn-bg);text-decoration:none;cursor:pointer;min-height:2.75rem}
.btn:hover{filter:brightness(1.08);text-decoration:none}
.btn.ghost{background:transparent;color:var(--text);border-color:var(--text)}
.btn.ghost:hover{background:var(--surface-2);filter:none}
.band .btn{background:var(--yellow);border-color:var(--yellow);color:var(--bark)}
.band .btn.ghost{background:transparent;color:var(--band-fg);border-color:var(--band-fg)}
.btn-row{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.5rem}
.text-link{font-weight:600}
.text-link::after{content:" \2192"}

/* Hero */
.hero{padding:clamp(2.5rem,6vw,5rem) 0}
.hero-grid{display:grid;gap:2.5rem;align-items:center}
@media(min-width:55rem){.hero-grid{grid-template-columns:1.05fr .95fr;gap:4rem}}
.hero h1{margin-bottom:1.25rem}
.photo{margin:0}
.photo img{width:100%;height:auto;border-radius:var(--radius);box-shadow:var(--shadow);aspect-ratio:4/3;object-fit:cover}
.photo.wide img{aspect-ratio:16/9}
.photo figcaption{font-size:.8125rem;color:var(--muted);margin-top:.5rem}
.tagline{font:400 clamp(1.2rem,2.4vw,1.5rem)/1.3 var(--font-head);margin:0 0 1.1rem;color:var(--text)}
.status{display:inline-block;font:400 .8125rem/1 var(--font-mono);border:1px solid var(--accent);color:var(--accent);padding:.4rem .75rem;border-radius:999px;margin-bottom:1rem}
.page-hero{padding:clamp(2rem,5vw,3.5rem) 0 clamp(2.5rem,5vw,4rem)}
.crumbs{font-size:.9rem;margin-bottom:1.5rem;color:var(--muted)}
.crumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:.25rem .6rem;padding:0;margin:0;max-width:none}
.crumbs li{margin:0}
.crumbs li+li::before{content:"/";margin-right:.6rem;color:var(--river)}
.crumbs a{color:var(--muted)}

/* Cards */
.cards{display:grid;gap:1.5rem}
@media(min-width:48rem){.cards.three{grid-template-columns:repeat(3,1fr)}.cards.two{grid-template-columns:repeat(2,1fr)}}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column}
.section.alt .card{background:var(--bg)}
.card img.cover{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
.card-body{padding:1.5rem;display:flex;flex-direction:column;gap:.5rem;flex:1}
.card-top{display:flex;align-items:center;gap:1rem;margin-bottom:.4rem}
.card h3{font-size:1.5rem}
.card .tagline{font-size:1.05rem;margin:0}
.card p{color:var(--muted);margin:0}
.card .text-link{margin-top:auto;padding-top:1rem}
.card.plain{padding:1.5rem;gap:.5rem}
.card.plain h3{margin-bottom:.25rem}

/* Bands */
.band{background:var(--band-bg);color:var(--band-fg)}
.band a{color:var(--band-fg)}
.band .muted,.band p{color:var(--band-fg)}
.band h2{color:var(--band-fg)}
.band .accent{color:var(--band-accent)}
.band-grid{display:grid;gap:2rem;align-items:center}
@media(min-width:48rem){.band-grid{grid-template-columns:1fr auto}}

/* Split rows */
.row{display:grid;gap:2rem;align-items:center}
@media(min-width:55rem){.row{grid-template-columns:1fr 1fr;gap:4rem}.row.flip .photo{order:2}}
.row+.row{margin-top:clamp(3rem,6vw,5rem)}
.checks{list-style:none;padding:0}
.checks li{padding-left:1.7rem;position:relative}
.checks li::before{content:"";position:absolute;left:.15rem;top:.55em;width:.6rem;height:.6rem;background:var(--accent);transform:rotate(45deg);border-radius:2px}

/* Family marks */
.family{display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));margin-top:2rem}
.family figure{margin:0;display:flex;flex-direction:column;gap:.6rem}
.family figcaption strong{display:block;font:600 1.1rem/1.2 var(--font-head)}
.family figcaption span{color:var(--muted);font-size:.95rem;display:block;margin-top:.2rem}

/* Numbered steps / principles */
.principles{display:grid;gap:1.5rem}
@media(min-width:48rem){.principles{grid-template-columns:repeat(3,1fr)}}
.principle{border-top:3px solid var(--accent);padding-top:1rem}
.principle .num{font:400 .8125rem var(--font-mono);color:var(--muted)}
.principle h3{margin:.4rem 0 .5rem}
.principle p{color:var(--muted)}

/* FAIR */
.fair{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(13rem,1fr))}
.fair .letter{display:grid;place-items:center;width:3rem;height:3rem;border-radius:12px;background:var(--deep-teal);color:var(--oat);font:600 1.5rem var(--font-head);margin-bottom:.6rem}
:root[data-theme="dark"] .fair .letter{background:var(--yellow);color:var(--bark)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .fair .letter{background:var(--yellow);color:var(--bark)}}

/* Curious Brew icons */
.icons{display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(14rem,1fr))}
.icon-item{display:flex;gap:1rem;align-items:flex-start;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1rem}
.icon-item .tile{width:4.5rem;height:4.5rem;border-radius:12px}
.icon-item h3{font-size:1.1rem;margin-bottom:.2rem}
.icon-item p{margin:0;color:var(--muted);font-size:.95rem}
.icon-item .kind{font:400 .75rem var(--font-mono);color:var(--muted);display:block;margin-bottom:.2rem}

/* Quote */
.quote{margin:0;max-width:44rem}
.quote p{font:400 clamp(1.4rem,3vw,2rem)/1.3 var(--font-head);max-width:none;margin-bottom:.75rem}
.quote cite{font-style:normal;color:var(--muted);font-size:.95rem}
.band .quote cite{color:var(--band-fg);opacity:.85}

/* Forms */
form{max-width:36rem}
.field{margin-bottom:1.25rem}
label,legend{display:block;font-weight:600;margin-bottom:.35rem}
.hint{font-size:.9rem;color:var(--muted);font-weight:400;display:block;margin-top:.15rem}
input[type=text],input[type=email],select,textarea{width:100%;font:inherit;color:var(--text);background:var(--surface);border:1.5px solid var(--river);border-radius:10px;padding:.8rem .9rem;min-height:2.9rem}
textarea{min-height:10rem;resize:vertical}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-color:var(--text)}
.check{display:flex;gap:.7rem;align-items:flex-start;margin-bottom:1.25rem}
.check input{width:1.3rem;height:1.3rem;margin-top:.2rem;accent-color:var(--deep-teal)}
.check label{font-weight:400;margin:0}
.hp{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}
.form-status{margin-top:1rem;padding:1rem 1.2rem;border-radius:10px;border:1px solid var(--line);background:var(--surface)}
.form-status[hidden]{display:none}
.form-status.ok{border-color:var(--green)}
.form-status.err{border-color:var(--clay-red)}
.inline-form{display:grid;gap:.75rem;max-width:30rem}
.note-box{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1.5rem}
.note-box h3{margin-bottom:.5rem}
.note-box p:last-child{margin-bottom:0}

/* Footer */
.site-footer{background:var(--deep-teal);color:var(--oat);margin-top:0}
.site-footer a{color:var(--oat)}
.footer-grid{display:grid;gap:2.5rem;padding:3.5rem 0 2.5rem}
@media(min-width:48rem){.footer-grid{grid-template-columns:1.4fr 1fr 1fr}}
.site-footer h2{font:600 .8125rem var(--font-mono);letter-spacing:.02em;color:var(--yellow);margin-bottom:.9rem}
.site-footer ul{list-style:none;padding:0;margin:0}
.site-footer li{margin:.4rem 0}
.site-footer p{color:var(--oat)}
.footer-brand{display:flex;gap:.75rem;align-items:center;margin-bottom:1rem}
.footer-brand .brand-name{color:var(--oat)}
.endorse{margin:0;font-size:.95rem}
.footer-base{border-top:1px solid rgba(239,233,221,.25);padding:1.25rem 0 2rem;font-size:.9rem;display:flex;flex-wrap:wrap;gap:.5rem 1.5rem;justify-content:space-between}

/* Prose pages */
.prose h2{font-size:1.6rem;margin:2.5rem 0 .75rem}
.prose h3{margin:1.5rem 0 .4rem}
.prose{max-width:var(--measure)}

/* 404 / thanks */
.centre{text-align:left;padding:clamp(3rem,10vw,7rem) 0}
.stack>*+*.photo{margin-top:1.25rem}
@media(min-width:48rem){.cards.four{grid-template-columns:repeat(2,1fr)}}
@media(min-width:72rem){.cards.four{grid-template-columns:repeat(4,1fr)}}
@media(max-width:47.99rem){.cards.four{grid-template-columns:1fr}}

/* Marks lift to their lighter tints on dark; no tile needed */
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--m-navy:#6f93c9;--m-teal:#2ea5a3;--m-forest:#86ad89;--m-deep:#6aa7a2;--m-ink:#efe9dd;--m-umber:#efe9dd;--m-forest-lt:#a3c4a6;--m-teal-lt:#5cc0bd;--m-w1:#6d7d4d;--m-w2:#879862;--m-w3:#a3b27d;--m-gap:#2f2a22;}}
:root[data-theme="dark"]{--m-navy:#6f93c9;--m-teal:#2ea5a3;--m-forest:#86ad89;--m-deep:#6aa7a2;--m-ink:#efe9dd;--m-umber:#efe9dd;--m-forest-lt:#a3c4a6;--m-teal-lt:#5cc0bd;--m-w1:#6d7d4d;--m-w2:#879862;--m-w3:#a3b27d;--m-gap:#2f2a22;}
.site-footer,.band{--m-navy:#6f93c9;--m-teal:#2ea5a3;--m-forest:#86ad89;--m-deep:#6aa7a2;--m-ink:#efe9dd;--m-umber:#efe9dd;--m-forest-lt:#a3c4a6;--m-teal-lt:#5cc0bd;--m-w1:#6d7d4d;--m-w2:#879862;--m-w3:#a3b27d;--m-gap:#2b4747;}

/* Avoid single words left alone on the last line */
p,li,.lead{text-wrap:pretty}
h1,h2,h3{text-wrap:balance}

/* landing: family strip and four-up principles */
.row.top{align-items:start}
.famgrid{max-width:none;width:100%;list-style:none;margin:clamp(2.5rem,5vw,4rem) 0 0;padding:0;display:grid;gap:1.75rem 1.5rem;grid-template-columns:repeat(2,1fr)}
@media(min-width:55rem){.famgrid{grid-template-columns:repeat(4,1fr)}}
.famitem{display:grid;gap:.4rem;align-content:start;border-top:3px solid var(--accent);padding-top:1.1rem}
.famitem .mark{margin-bottom:.4rem}
.famitem span{color:var(--muted);font-size:.95rem}
@media(min-width:48rem){.principles.four{grid-template-columns:repeat(2,1fr)}}
@media(min-width:70rem){.principles.four{grid-template-columns:repeat(4,1fr)}}
.section .principles+.btn-row{margin-top:2rem}
