/* Brown Hat Consulting — site styles. Colours are the brand hexes from the logo files and the brand guide. */

@font-face { font-family: 'Didact Gothic'; src: url('/assets/fonts/DidactGothic-Regular-latin.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Didact Gothic'; src: url('/assets/fonts/DidactGothic-Regular-latin-ext.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --cream: #efebc8;
  --surface: #f7f4e2;
  --paper: #fffdf3;
  --brown: #513d2d;
  --brown-deep: #3f2f23;
  --red: #d54125;
  --red-deep: #b8351c;
  --gold: #e3a72e;
  --teal: #2f888c;
  --olive: #aca986;

  --display: 'Futura', 'Avenir Next', 'Century Gothic', sans-serif; /* fallback only: Marvin Visions headings are outlined SVG, see tools/build.py */
  --body: 'Didact Gothic', 'Futura', 'Avenir Next', 'Century Gothic', sans-serif;

  --pad: 20px;
  --header-h: 64px;
  --gutter: max(var(--pad), calc((100vw - 1200px) / 2));
}

@media (min-width: 700px) { :root { --pad: 40px; --header-h: 84px; } }

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
main > section[id] { scroll-margin-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--brown);
  background: var(--cream) url('/assets/img/denim.webp') repeat;
  background-size: 240px 240px;
  -webkit-font-smoothing: antialiased;
  font-kerning: none; /* Didact Gothic's kerning pairs pad the space around capital letters */
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--red); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 20; padding: 10px 16px; background: var(--brown); color: var(--cream); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.display { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.95; margin: 0; }

/* Marvin Visions headings: outlined SVG from tools/build.py. --fs-d / --fs-m come from the build (unitless px).
   The size scales with the viewport between the mobile and desktop values; each SVG line is width:Nem so it follows font-size. */
.marvin { margin: 0; line-height: 1; font-size: clamp(calc(var(--fs-m) * 1px), calc(var(--fs-d) * 100vw / 1440), calc(var(--fs-d) * 1px)); }
.hl { display: flex; flex-direction: column; align-items: flex-start; gap: 0.08em; }
.hl svg { display: block; height: auto; max-width: 100%; fill: currentColor; }
.hl-d { display: none; }
@media (min-width: 700px) { .hl-d { display: flex; } .hl-m { display: none; } }
.marvin.center .hl { align-items: center; }
.h2-light { color: var(--cream); }
.h2-red { color: var(--red); }
.h2-brown { color: var(--brown); }

/* Buttons */
.btn, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  min-height: 48px; padding: 0 28px; border-radius: 999px; border: 3px solid var(--red);
  font-family: inherit; font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer;
}
.btn { background: var(--red); color: var(--cream); }
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); color: var(--cream); }
.btn-outline { background: transparent; color: var(--brown); border-color: var(--brown); }
.btn-outline:hover { background: var(--brown); color: var(--cream); }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--cream); border-bottom: 3px solid var(--brown); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.logo { flex: none; }
.logo img { height: 40px; width: auto; max-width: none; }
@media (min-width: 700px) { .logo img { height: 50px; } }
.site-nav { display: none; align-items: center; gap: 22px; }
.site-nav > a:not(.btn) { font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brown); white-space: nowrap; }
.site-nav > a:not(.btn):hover { color: var(--red); }
.lang { display: flex; align-items: center; gap: 6px; font-size: 14px; letter-spacing: 0.08em; }
.lang[hidden] { display: none; }
.lang a { color: var(--brown); padding: 3px 8px; border-radius: 999px; }
.lang a.on { background: var(--brown); color: var(--cream); }
.menu-button { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-right: -9px; padding: 0; background: none; border: 0; color: var(--brown); cursor: pointer; }
@media (min-width: 1240px) {
  .site-nav { display: flex; }
  .menu-button { display: none; }
}

/* Mobile menu */
.menu { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: var(--brown); color: var(--cream); overflow-y: auto; }
.menu[hidden] { display: none; }
.menu-bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); border-bottom: 1px solid rgba(239, 235, 200, 0.25); }
.menu-bar > img { width: 64px; height: auto; max-width: none; }
.menu-close { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-right: -9px; padding: 0; background: none; border: 0; color: var(--cream); cursor: pointer; }
.menu-list { display: flex; flex-direction: column; padding-top: 16px; padding-bottom: 16px; }
.menu-list a { color: var(--cream); padding: 18px 0; border-bottom: 1px solid rgba(239, 235, 200, 0.25); }
.menu-list a:hover { color: var(--gold); }
.menu-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding-top: 16px; padding-bottom: 40px; }
.menu-foot .lang a { color: var(--cream); }
.menu-foot .lang a.on { background: var(--cream); color: var(--brown); }
body.menu-open { overflow: hidden; }

/* Gold arcs, denim texture */
/* Brown arcs (Option B on the canvas): cream and gold type on the logo brown, arcs drawn in browns. */
.arcs { position: relative; overflow: hidden; background-color: var(--brown); color: var(--cream);
  background-image: radial-gradient(circle at 50% 108%, #5e4836 0 17%, #58422f 17% 33%, #513d2d 33% 50%, #4a3729 50% 68%, #433024 68% 88%, #3c2a1f 88%); }
.texture { position: absolute; inset: 0; background: url('/assets/img/denim.webp') repeat; background-size: 240px 240px; mix-blend-mode: multiply; opacity: 0.18; pointer-events: none; }
.arcs .btn-outline { color: var(--cream); border-color: var(--cream); }
.arcs .btn-outline:hover { background: var(--cream); color: var(--brown); }
.arcs > .wrap { position: relative; }

/* Hero */
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; padding-top: 64px; padding-bottom: 80px; }
.hero-badge { width: 100px; }
.hero-h1 { color: var(--gold); }
.hero-sub { max-width: 760px; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35; color: var(--cream); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
@media (min-width: 700px) { .hero-inner { gap: 28px; padding-top: 88px; padding-bottom: 104px; } .hero-badge { width: 128px; } }
@media (max-width: 480px) { .hero-inner .cta-row { flex-direction: column; align-items: stretch; } }

/* Services */
.services { display: flex; flex-direction: column; gap: 40px; padding-top: 64px; padding-bottom: 64px; }
@media (min-width: 700px) { .services { padding-top: 96px; padding-bottom: 96px; } }
.services-grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 24px; }
@media (min-width: 700px) { .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .services-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; gap: 14px; padding: 28px 26px 30px; background: var(--surface); border: 3px solid var(--brown); border-radius: 18px; }
.card-icon { align-self: center; height: 104px; width: auto; }
.card-h2 { color: var(--red); }
.card-lead { font-size: 19px; line-height: 1.4; text-wrap: pretty; }
.card ul { margin: 6px 0 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 10px; font-size: 17px; line-height: 1.4; }
.card li::marker { color: var(--gold); }
.services-cta { text-align: center; gap: 28px; }
.services-cta p { font-size: 24px; line-height: 1.4; }

/* Testimonials */
.testimonials { background: var(--brown); padding: 72px 0 60px; }
@media (min-width: 700px) { .testimonials { padding: 88px 0 72px; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.arrows { display: flex; gap: 12px; flex-shrink: 0; }
.arrow { width: 52px; height: 52px; border-radius: 999px; border: 3px solid var(--cream); background: transparent; color: var(--cream); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.arrow:hover { background: var(--cream); color: var(--brown); }
.carousel { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 28px; scroll-padding-left: var(--gutter); scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.tcard { flex: 0 0 min(560px, 84vw); scroll-snap-align: start; margin: 0; padding: 28px 24px 26px; background: var(--cream); border-radius: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
@media (min-width: 700px) { .tcard { padding: 36px 40px 32px; } }
.tcard blockquote { margin: 0; font-size: 18px; line-height: 1.55; color: var(--brown); }
.tcard strong { font-weight: 700; color: var(--brown-deep); }
.tcard figcaption { font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brown-deep); }

/* Who We Are */
.who { background: var(--surface); border-top: 3px solid var(--brown); border-bottom: 3px solid var(--brown); }
.who-grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 32px; align-items: start; padding-top: 64px; padding-bottom: 64px; }
@media (min-width: 900px) { .who-grid { grid-template-columns: 420px minmax(0, 1fr); gap: 64px; align-items: center; padding-top: 96px; padding-bottom: 96px; } }
.portrait { width: 100%; border-radius: 18px; border: 4px solid var(--brown); }
.prose { display: flex; flex-direction: column; gap: 18px; font-size: 19px; line-height: 1.6; }
.prose .display { margin-bottom: 8px; }
.prose .lead { font-size: 24px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 32px; align-items: start; padding-top: 64px; padding-bottom: 72px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr) 520px; gap: 64px; padding-top: 96px; padding-bottom: 104px; } }
.contact .h2-brown { color: var(--gold); }
.contact .prose { color: var(--cream); }
.contact-form { display: flex; flex-direction: column; gap: 18px; padding: 24px; background: var(--surface); border: 3px solid var(--brown); border-radius: 18px; color: var(--brown); }
@media (min-width: 700px) { .contact-form { padding: 32px; } }
.field-row { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 18px; }
@media (min-width: 480px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.field input, .field textarea { font: 16px var(--body); padding: 12px 14px; border: 2px solid var(--brown); border-radius: 10px; background: var(--paper); color: var(--brown); width: 100%; }
.field textarea { resize: vertical; min-height: 140px; }
.form-status { min-height: 1.5em; font-size: 15px; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--teal); }
.form-status.error { color: var(--red); }

/* Footer */
.site-footer { background: var(--brown-deep); color: var(--cream); padding: 40px 0; border-top: 1px solid rgba(239, 235, 200, 0.25); }
.footer-row { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 24px; align-items: center; }
@media (min-width: 900px) { .footer-row { grid-template-columns: auto 1fr auto auto; gap: 40px; } .site-footer { padding: 44px 0; } }
.footer-row > img { width: 98px; height: auto; max-width: none; flex: none; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.footer-links a { color: var(--cream); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-links a:hover { color: var(--gold); }
.footer-links .lang a { text-transform: none; letter-spacing: 0.08em; }
.footer-links .lang a.on { background: var(--cream); color: var(--brown); }
.footer-address { font-style: normal; font-size: 14px; line-height: 1.5; color: var(--olive); }
.footer-copy { font-size: 14px; letter-spacing: 0.06em; }

/* Documents (privacy policy) */
.doc { max-width: 760px; margin: 0 auto; padding: 48px var(--pad) 96px; font-size: 16px; line-height: 1.6; }
.doc h1 { margin: 0 0 8px; color: var(--red); }
.doc .updated { margin: 0 0 40px; }
.doc h2 { font-size: 18px; line-height: 1.3; margin: 40px 0 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.doc h3 { font-size: 16px; margin: 28px 0 8px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 0 0 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14px; }
.doc td { border: 1px solid var(--brown); padding: 8px 10px; vertical-align: top; }
.doc a { overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; }
.doc .summary { margin: 0 0 32px; padding: 20px 22px; background: var(--surface); border: 3px solid var(--brown); border-radius: 18px; }
.doc .summary p { margin: 0; }
.doc code { background: var(--surface); padding: 1px 5px; border-radius: 4px; }
.placeholder { border: 2px dashed #b9b394; border-radius: 8px; padding: 14px 16px; color: #8a8265; background: rgba(227, 167, 46, 0.08); }
