/* Tiny's Little Factory - site styles (r2, self-built static site)
   Brand palette from Branding/brand board (Emma Sue Bow-tique, 2024):
   #f2efea cream, #d7d1c7 sand, #b3a896 taupe, #877866 mocha, #594d40 brown.
   Brand type (brand board, Typography): SERMO + La Charly. Nothing else.
   Sermo = every heading, nav, button and body line (woff2 = the copy Chason uploaded to the
   Squarespace site, 11/02; preloaded in every page head). La Charly = logo only (inside the logo image).
   No Google Fonts: the old Italiana/Epilogue stand-ins were dropped 11/20 (Chason: "keep the fonts on brand").
   Georgia is the system fallback only if the woff2 fails. */
@font-face { font-family: "Sermo"; src: url(/assets/fonts/sermo.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "Sermo"; src: url(/assets/fonts/sermo-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: block; }
:root {
  --cream: #f2efea;
  --sand: #d7d1c7;
  --taupe: #b3a896;
  --mocha: #877866;
  --brown: #594d40;
  --bg: var(--cream);
  --bg-2: var(--sand);
  --ink: #2e2720; /* r6 11/23: darkest brown that still reads as the brand brown (was #3b332b); 13:1 on cream */
  --brown-2: #453c32;
  --muted: #453c32; /* r6 11/23: captions/hints now the dark brown (7.1:1 on sand, 9.4:1 on cream); r5 was #5a4f43 */
  --line: var(--taupe);
  --white: #fbfaf8;
  --max: 1120px;
  --serif: "Sermo", Georgia, "Times New Roman", serif;
  --sans: var(--serif); /* the brand board names no body face; body is Sermo too */
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 20px; line-height: 1.6; letter-spacing: .02em; /* r6: 18 -> 20 px */
  overflow-x: hidden;
  /* r6 11/23 (Chason: "the sermo subtext is still hard to read, did you make it bold?"; r5's 0.4 px was too
     light). Sermo ships one weight (400), so ALL body, small, caption, footer, form and button text gets a
     1.3 px stroke in its own colour, painted under the fill so the counters stay open: reads as bold.
     Set once here; everything inherits it (form controls are told to inherit below). */
  -webkit-text-stroke: 0.8px currentColor; /* r7 11/25: 1.3 read "a little chonky" (Chason); between r5 0.4 and r6 1.3 */
  paint-order: stroke fill;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brown-2); }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: .02em; margin: 0 0 .5em; color: var(--ink); }
h1, h2 { -webkit-text-stroke-width: .7px; }
h3 { -webkit-text-stroke-width: 1px; }
input, select, textarea, button { -webkit-text-stroke: inherit; paint-order: inherit; }
h1 { font-size: clamp(2.4rem, 5.6vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brown); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* Header */
.site-header { background: var(--bg-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 88px; }
.brand { display: inline-block; font-family: var(--serif); font-size: 1.35rem; text-decoration: none; color: var(--ink); white-space: nowrap; line-height: 0; }
.site-header .brand img { height: 70px; width: auto; }
.nav-toggle { display: none; background: none; border: 1px solid var(--brown); border-radius: 6px; padding: 6px 10px; font: inherit; color: var(--ink); cursor: pointer; }
.nav { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; }
.nav a { text-decoration: none; color: var(--ink); font-size: 1.05rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.btn { display: inline-block; background: var(--brown); color: var(--cream) !important; text-decoration: none; padding: 11px 22px; border-radius: 999px; font-weight: 500; border: 2px solid var(--brown); line-height: 1.2; cursor: pointer; font: inherit; }
.btn:hover { background: var(--brown-2); border-color: var(--brown-2); }
.btn.ghost { background: transparent; color: var(--brown-2) !important; }
.btn.ghost:hover { background: var(--brown); color: #fff !important; }
.btn.small { padding: 8px 16px; font-size: 1.02rem; }
.nav .btn { padding: 9px 18px; }

/* Hero */
.hero { position: relative; color: #fff; min-height: clamp(380px, 55vh, 620px); display: grid; place-items: center; text-align: center; padding: 72px 0; background: var(--brown) center/cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(89, 77, 64, .72); } /* r5: was .66; white text >= 4.5:1 on 95% of each hero photo */
.hero > .wrap { position: relative; max-width: 760px; }
.hero h1, .hero p { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.hero .lead { font-size: 1.3rem; }
.hero .promise { font-size: 1.08rem; }
.hero.short { min-height: clamp(300px, 34vh, 440px); padding: 48px 0; }

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: var(--bg-2); }
.section h2 { text-align: center; }
.intro { max-width: 720px; margin: 0 auto 28px; text-align: center; }
.center { text-align: center; }
.grid { display: grid; gap: 24px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card h2, .card h3 { text-align: left; }
.card .btn { margin-top: 8px; }
/* Home "three doors" (r5 11/23, Chason: "Two boxes, 3 buttons. the asymmetry bothers me."): three matching
   cards, one button each. Subgrid lines the headings, text and buttons up across all three; the flex
   fallback still pins every button to the bottom. Side by side down to 641 px, one column on phones (r6), never a 2 + 1 row. */
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card.door { display: flex; flex-direction: column; align-items: flex-start; }
.card.door h2 { font-size: clamp(1.5rem, 2.4vw, 1.85rem); margin-bottom: .45em; }
.card.door p { flex: 1 0 auto; }
.card.door .btn { margin-top: 8px; white-space: nowrap; } /* r6: one-line buttons so all three line up */
@supports (grid-template-rows: subgrid) {
  .doors { row-gap: 0; }
  .card.door { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; justify-items: start; }
  .card.door .btn { align-self: end; }
}
.card.photo { padding: 0; overflow: hidden; }
.card.photo img { aspect-ratio: 4/3; width: 100%; object-fit: cover; }
.card.photo .body { padding: 20px 22px 24px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.split img { border-radius: 12px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.split h2 { text-align: left; }
.split.flip img { order: 2; }
.wrap.narrow { width: min(760px, 100% - 32px); }
figure { margin: 0; }
figure img { border-radius: 10px; aspect-ratio: 3/4; object-fit: cover; width: 100%; background: var(--bg-2); }
figure.landscape img { aspect-ratio: 4/3; }
figcaption { font-size: 1.02rem; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery a { display: block; }
.notice { background: var(--bg-2); border-left: 4px solid var(--mocha); padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 20px auto; max-width: 760px; }
.notice p:last-child { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }
ul.plain { padding-left: 1.2em; }
ol.steps { padding-left: 1.3em; }
ol.steps li { margin-bottom: .4em; }
.lane { padding: 40px 0; border-top: 1px solid var(--line); }
.lane:first-of-type { border-top: 0; }

/* Forms */
.form { max-width: 640px; margin: 0 auto; }
.form label { display: block; font-weight: 500; margin: 14px 0 6px; }
.form input, .form select, .form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--mocha); border-radius: 8px; background: var(--white); font: inherit; color: var(--ink); }
.form textarea { min-height: 130px; resize: vertical; }
.form .hint { font-size: 1rem; color: var(--muted); margin: 6px 0 0; }
.form .btn { margin-top: 18px; }
.form .honey { position: absolute; left: -9999px; }
.form-done { display: none; }
.form-done.show { display: block; }
.form[data-state="done"] .fields { display: none; }

/* Footer */
.site-footer { background: var(--brown); color: #fff; padding: 40px 0 28px; font-size: 1.08rem; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.site-footer p { margin: 0 0 .5em; }
.site-footer .nudge { border-top: 1px solid rgba(255,255,255,.25); margin-top: 24px; padding-top: 18px; }
.site-footer .brand { color: #fff; }
.site-footer .brand img { width: 150px; height: auto; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35em; }

/* Products (11/16) */
.crumbs { font-size: 1.02rem; color: var(--muted); margin-bottom: 18px; }
.split.product { align-items: start; }
.split.product img { aspect-ratio: auto; object-fit: contain; background: var(--white); }
.split.product h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
.card h2.h3 { font-size: 1.55rem; }
.card h2.h3 a { color: var(--ink); text-decoration: none; }
.card.photo > a { display: block; }
.card.photo.square img { aspect-ratio: 1 / 1; object-fit: contain; background: var(--white); }

/* Engineering page + left-aligned button pairs (11/21) */
.actions.left { justify-content: flex-start; }
.card.door .actions { margin-top: 0; }
.btn.ghost.on-dark { color: #fff !important; border-color: #fff; }
.btn.ghost.on-dark:hover { background: #fff; color: var(--ink) !important; }
/* hinge row: one 3:4 photo + two 4:3 frames; 9fr/16fr keeps all three the same height */
.photo-row { display: grid; grid-template-columns: 9fr 16fr 16fr; gap: 20px; align-items: start; }
.faq h3 { font-size: 1.3rem; margin-top: 1.4em; }
.faq h3:first-child { margin-top: 0; }
/* staging placeholder: fill or delete before go-live (DEPLOY.md: grep -r data-slot must return nothing) */
.slot { display: grid; place-items: center; aspect-ratio: 4/3; border: 2px dashed var(--mocha); border-radius: 10px; background: var(--white); color: var(--muted); text-align: center; padding: 16px; }
.slot p { margin: 0; }

@media (max-width: 860px) {
  .grid.three, .grid.four, .site-footer .cols { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  /* 7 menu items since 11/21: tighter gap so "Get a Quote" stays on one line above the phone menu */
  .nav { gap: 14px; }
  .nav .btn { white-space: nowrap; padding: 8px 14px; }
}
/* r5: a three-photo row stays three across down to the phone breakpoint (no 2 + 1 orphan) */
@media (min-width: 641px) and (max-width: 860px) {
  .card.door { padding: 18px; }
  .card.door .btn { padding: 10px 15px; font-size: .95rem; }
  .grid.three.keep3 { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
/* the Menu button takes over at 760 px (was 640) now the menu has 7 items */
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg-2); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 18px; gap: 4px; }
  .nav.open { display: flex; }
  .nav li a { display: block; padding: 10px 4px; }
  .nav .btn { margin-top: 8px; text-align: center; }
}
@media (max-width: 640px) {
  body { font-size: 19px; } /* r6: 17 -> 19 px */
  .doors { grid-template-columns: 1fr; gap: 16px; } /* r6: side by side at every laptop/desktop width, stacked on phones only */
  .card.door { display: flex; grid-row: auto; }
  .card.door .btn { align-self: flex-start; }
  .site-header .brand img { height: 54px; }
  .grid.two, .grid.three, .grid.four, .split, .site-footer .cols, .photo-row { grid-template-columns: 1fr; }
  .split.flip img { order: 0; }
  .section { padding: 40px 0; }
  .hero { min-height: clamp(340px, 52vh, 520px); padding: 56px 0; }
}
.form ::placeholder { color: var(--muted); opacity: .85; } /* r6 */
