/* Dormouse Device — styles
   Colours and type come straight from the "Dormouse Device Logo Ideas" canvas.
   Contrast rules from the canvas: Ink text on Hazel buttons (never white);
   Hazel Deep for orange text on light backgrounds. */

/* Fonts are self-hosted so visitors aren't sent to Google (privacy + speed). */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url('/assets/fonts/nunito-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 900; font-display: swap; src: url('/assets/fonts/nunito-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/dm-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/dm-sans-latin-700-normal.woff2') format('woff2'); }

:root {
  --ink: #1E2433;
  --hazel: #D9822B;
  --hazel-deep: #B5651A;
  --hazel-tint: #F6E3CF;
  --cream: #F4F1EA;
  --paper: #FFFFFF;
  --slate: #4A5163;
  --moss: #4E7A4F;
  --line: #E3DDCF;
  --ink-soft: #C9CEDA;

  --font-head: 'Nunito', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, 'Segoe UI', Roboto, sans-serif;

  --wrap: 1180px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(30, 36, 51, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.375rem; letter-spacing: -0.005em; }

p { margin: 0 0 1em; }

a { color: var(--hazel-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--hazel-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.muted { color: var(--slate); }
.lede { font-size: 1.3rem; line-height: 1.55; color: var(--slate); max-width: 34ch; }
.measure { max-width: 64ch; }

.skip-link {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  z-index: 100; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 241, 234, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 76px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.brand svg { width: 28px; height: auto; flex: none; }
.wordmark {
  font-family: var(--font-head); font-weight: 900; font-size: 1.6rem;
  line-height: 1; letter-spacing: -0.01em; white-space: nowrap;
}
.wordmark span { color: var(--hazel-deep); }
.site-footer .wordmark span { color: var(--hazel); }

.nav-list {
  display: flex; gap: 28px; list-style: none; margin: 0; padding: 0;
  font-weight: 500;
}
.nav-list a { color: var(--ink); text-decoration: none; padding: 6px 0; }
.nav-list a:hover { color: var(--hazel-deep); }
.nav-list a[aria-current="page"] {
  color: var(--hazel-deep); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px;
}

.nav-toggle {
  display: none;
  background: none; border: 2px solid var(--ink); border-radius: var(--radius-sm);
  color: var(--ink); font: 600 1rem var(--font-body);
  padding: 8px 14px; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; gap: 0; padding: 8px 20px 20px; }
  .nav-list a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-list li:last-child a { border-bottom: 0; }
  .nav-list a[aria-current="page"] { text-decoration: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1.0625rem/1.2 var(--font-body);
  padding: 15px 28px; border-radius: var(--radius-md);
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--hazel); color: var(--ink); }
.btn-primary:hover { background: #E08F3C; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2B3346; color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.pill {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 8px;
  background: var(--hazel-tint); color: var(--ink);
  font-weight: 600; font-size: 1rem; padding: 7px 16px; border-radius: 999px;
}

/* Repair status badges (from the canvas) */
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; padding: 6px 14px; border-radius: 999px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-ready { background: #E1EBDD; color: #2F5232; }
.status-workshop { background: var(--hazel-tint); color: #8A4A10; }
.status-parts { background: #E6E8EE; color: var(--slate); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-tight { padding-block: clamp(48px, 6vw, 72px); }
.section-paper { background: var(--paper); border-block: 1px solid var(--line); }
.section-ink { background: var(--ink); color: #fff; }
.section-ink .muted { color: var(--ink-soft); }
.section-head { max-width: 640px; margin-bottom: 40px; }

.page-head { padding-block: clamp(56px, 8vw, 96px) clamp(32px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center; gap: 40px;
  min-height: min(760px, calc(100vh - 76px));
  padding-block: 56px;
}
.hero-copy { display: flex; flex-direction: column; gap: 26px; position: relative; z-index: 2; }
.hero-copy h1 { margin: 0; max-width: 11ch; }
.hero-copy .lede { margin: 0; }

.hero-art { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 560px; justify-self: end; }
.hero-art .blob {
  position: absolute; inset: 0; border-radius: 50%; background: var(--hazel-tint);
}
.hero-art .mark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%);
  width: 46%; height: auto;
}
.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 16px; box-shadow: var(--shadow);
  font-weight: 600; font-size: 1rem; white-space: nowrap;
}
.float-card svg { width: 36px; height: 36px; flex: none; }
.float-card.c1 { left: -6%; top: 14%; }
.float-card.c2 { right: -4%; bottom: 12%; }
.float-card.c3 { left: 2%; bottom: 4%; }

/* The one moment of motion: the tail curls in as the page wakes up. */
.mark .tail { stroke-dasharray: 40; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .hero .mark .tail { animation: tail-wake 1.1s cubic-bezier(.3,.7,.2,1) .25s both; }
  @keyframes tail-wake { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; padding-block: 40px 64px; }
  /* On phones the headline comes first, so it is above the fold. */
  .hero-art { max-width: 300px; justify-self: center; }
  .float-card { font-size: .9rem; padding: 10px 12px; }
  .float-card svg { width: 28px; height: 28px; }
  .float-card.c1 { left: -2%; }
  .float-card.c2 { right: -2%; }
  .float-card.c3 { display: none; }
}

/* ---------- Services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.service-tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.1rem;
}
.service-tile:hover { border-color: var(--ink); color: var(--ink); }
.service-tile svg { width: 80px; height: 80px; }
@media (max-width: 900px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.service-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px; display: flex; gap: 22px; align-items: flex-start;
  scroll-margin-top: 100px;
}
.service-card svg { width: 60px; height: 60px; flex: none; }
.service-card h3 { margin-bottom: 6px; }
.service-card p { color: var(--slate); margin-bottom: 10px; }
.price { font-weight: 600; color: var(--hazel-deep); }
@media (max-width: 760px) { .service-list { grid-template-columns: 1fr; } }

/* ---------- How it works (a real sequence, so it gets numbers) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 10px; }
.steps li::before {
  content: counter(step);
  font-family: var(--font-head); font-weight: 900; font-size: 1.25rem;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--hazel); color: var(--ink);
}
.steps h3 { margin: 6px 0 0; }
.steps p { margin: 0; }
.section-ink .steps p { color: var(--ink-soft); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.photo-slot {
  aspect-ratio: 4 / 5; border-radius: var(--radius-lg);
  background: var(--hazel-tint); border: 2px dashed #E2BE97;
  display: grid; place-items: center; text-align: center; padding: 24px;
  color: #8A4A10; font-weight: 600;
}
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.facts li { display: flex; gap: 12px; align-items: baseline; }
.facts li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--hazel); transform: translateY(-1px); }

/* ---------- Portfolio ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 860px) { .portfolio-grid { grid-template-columns: 1fr; } }
.job {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
}
.job-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); }
.job-photos figure { margin: 0; position: relative; background: var(--cream); aspect-ratio: 4 / 3; }
.job-photos img { width: 100%; height: 100%; object-fit: cover; }
.job-photos figcaption {
  position: absolute; left: 10px; top: 10px;
  background: var(--ink); color: #fff; font-size: .85rem; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
}
.job-photos figure.after figcaption { background: var(--hazel); color: var(--ink); }
.job-photos .placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--slate); font-size: .95rem; }
.job-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 8px; }
.job-body h3 { margin: 0; }
.job-meta { color: var(--slate); font-size: .95rem; margin: 0; }
.job-body dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.job-body dt { font-weight: 600; }
.job-body dd { margin: 0; color: var(--slate); }

/* ---------- Reviews ---------- */
.review-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 32px; }
.review-summary .score { font-family: var(--font-head); font-weight: 900; font-size: 3rem; line-height: 1; }
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 960px) { .review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .review-grid { grid-template-columns: 1fr; } }
.review {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; margin: 0; display: flex; flex-direction: column; gap: 12px;
}
.review blockquote { margin: 0; line-height: 1.55; }
.review footer { margin-top: auto; color: var(--slate); font-size: .95rem; }
.review footer b { color: var(--ink); }
.stars { color: var(--hazel-deep); letter-spacing: 2px; font-size: 1.05rem; }
.source-note { margin-top: 24px; font-size: .95rem; color: var(--slate); }

.empty {
  background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius-lg);
  padding: 40px; text-align: center; max-width: 620px; margin-inline: auto;
}
.empty h2 { font-size: 1.6rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
label { font-weight: 600; }
.hint { font-weight: 400; color: var(--slate); font-size: .95rem; }
input, select, textarea {
  font: inherit; color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px var(--hazel-tint); }
textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; font-weight: 600; }
.form-status.ok { color: var(--moss); }
.form-status.err { color: #A3361C; }
.small-print { font-size: .92rem; color: var(--slate); margin-top: 14px; }

.contact-aside { display: flex; flex-direction: column; gap: 20px; }
.contact-aside .card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.contact-aside h2 { font-size: 1.3rem; margin-bottom: 8px; }
.contact-aside p { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; padding-block: 56px 40px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand svg { width: 34px; }
.footer-brand p { color: var(--ink-soft); font-size: .95rem; line-height: 1.6; margin: 0; }
.footer-brand a { color: #fff; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 48px; }
.footer-cols h2 { font-family: var(--font-body); font-size: .95rem; font-weight: 700; color: var(--hazel); margin: 0 0 8px; letter-spacing: 0; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; line-height: 2; font-size: .95rem; }
.footer-cols a { color: #fff; text-decoration: none; }
.footer-cols a:hover { color: var(--hazel); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid #343B4F; color: var(--ink-soft); font-size: .9rem; }

/* ---------- Prose pages ---------- */
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }

.todo { background: #FFF6D6; color: var(--ink); border-radius: 4px; padding: 0 4px; }

[hidden] { display: none !important; }
.pricing-note { max-width: 720px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: clamp(24px, 4vw, 36px); }
.pricing-note h2 { font-size: 1.6rem; }
.pricing-note .facts { margin-bottom: 0; }
