/* Mineyard Accounting & Tax Services
   Brand: ink, gold and cream, from the Mineyard brand pack (docs/brand/BRAND-GUIDE.md).
   Fraunces for headings, Figtree for everything else, gold abacus beads as accents. */

/* Self-hosted brand fonts (SIL Open Font License, see assets/fonts) */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Brand tokens (from the brand pack's tokens.css) */
  --color-ink: #141414;
  --color-gold: #D29B1F;        /* accents only, never text on light backgrounds */
  --color-gold-text: #8A6510;   /* gold-coloured text on white / cream */
  --color-cream: #F4EFE4;
  --color-paper: #FAF8F3;
  --color-white: #FFFFFF;
  --color-muted: #5A5A55;
  --color-line: #E6E2D8;
  --color-rod: rgba(20, 20, 20, 0.3);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  --text-3xl: clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem);
  --tracking-display: -0.015em;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --space-section: clamp(4.5rem, 3rem + 5vw, 7rem);
  --container: 1200px;
  --shadow-card: 0 14px 34px rgba(20, 20, 20, 0.08);

  --error: #a8321f;
  --on-dark-soft: #c9c5bc;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-paper);
}
h1, h2, h3 { margin: 0; line-height: 1.15; color: inherit; font-family: var(--font-display); font-weight: 600; letter-spacing: var(--tracking-display); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
img { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--color-gold); }
:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: calc(var(--container) + 56px); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--color-ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }

.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border: 1px solid var(--color-ink); border-radius: var(--radius-pill);
  background: var(--color-ink); color: #fff; font: 600 var(--text-base)/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: transform .15s, background-color .15s, box-shadow .15s;
}
.btn:hover { background: #2c2c2c; box-shadow: var(--shadow-card); }
.btn:active { transform: translateY(1px); }
.btn-outline { background: var(--color-white); color: var(--color-ink); border-color: var(--color-line); }
.btn-outline:hover { background: var(--color-white); border-color: var(--color-ink); }
.btn-sm { padding: 10px 20px; font-size: var(--text-sm); }

/* Top bar: hours and contact details above the header */
.topbar { background: var(--color-ink); color: var(--on-dark-soft); font-size: var(--text-sm); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 8px 28px; min-height: 40px; flex-wrap: wrap; }
.topbar p { margin: 0; display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; }
.topbar span { display: inline-flex; align-items: center; gap: 8px; }
.topbar .icon { width: 16px; height: 16px; color: var(--color-gold); }
.topbar-hours { gap: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 243, .96); border-bottom: 1px solid var(--color-line); backdrop-filter: saturate(1.2) blur(6px); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 80px; gap: 24px; }
.brand { display: block; line-height: 0; border-radius: 6px; }
.brand img { display: block; width: 226px; height: auto; }
.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-menu a:not(.btn) { color: var(--color-ink); text-decoration: none; font-weight: 600; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav-menu a:not(.btn):hover { border-bottom-color: var(--color-gold); }
.nav-toggle { display: none; place-items: center; width: 46px; height: 46px; padding: 0; color: var(--color-ink); background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius-pill); cursor: pointer; }

/* Hero */
.hero { padding: clamp(3.5rem, 2rem + 5vw, 6.5rem) 0; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 64px; align-items: center; }
.hero h1 { font-size: var(--text-3xl); line-height: 1.05; margin-bottom: 24px; max-width: 13em; }
.lede { font-size: var(--text-lg); color: var(--color-muted); max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-card {
  position: relative; background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 14px 14px 22px;
}
.hero-mark { display: block; width: 100%; height: auto; padding: 40px 24%; margin-bottom: 14px; background: var(--color-cream); border-radius: 14px; }
.hero-list { list-style: none; margin: 0; padding: 0 12px; }
.hero-list li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; font-weight: 600; }
.hero-list li + li { border-top: 1px solid var(--color-line); }
.hero-list li::before { content: ""; width: 10px; height: 8.6px; border-radius: 50%; background: var(--color-gold); flex: none; }

/* Trust strip */
.trust { background: var(--color-cream); border-block: 1px solid var(--color-line); }
.trust-grid { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-grid li { display: flex; align-items: flex-start; gap: 14px; padding: 28px 24px; }
.trust-grid li + li { border-left: 1px solid var(--color-line); }
.trust-grid li:first-child { padding-left: 0; }
.trust-grid .icon { color: var(--color-gold-text); margin-top: 3px; }
.trust-grid p { margin: 0; color: var(--color-muted); line-height: 1.45; }
.trust-grid strong { display: block; color: var(--color-ink); font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; letter-spacing: var(--tracking-display); }

/* Sections */
.section { padding: var(--space-section) 0; }
.section-head { max-width: 40rem; margin-bottom: 48px; }
.section-title { font-size: var(--text-2xl); margin-bottom: 16px; }
.section-intro { color: var(--color-muted); font-size: var(--text-lg); max-width: 36em; }

/* Service cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius-lg);
  padding: 30px 28px 32px; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.card-icon { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--radius-md); background: var(--color-cream); color: var(--color-ink); margin-bottom: 22px; }
.card-icon::after { content: ""; position: absolute; right: -3px; top: -3px; width: 11px; height: 9.5px; border-radius: 50%; background: var(--color-gold); border: 2px solid var(--color-white); }
.card h3 { font-size: var(--text-xl); margin-bottom: 10px; }
.card p { color: var(--color-muted); margin: 0; }

/* Gold-bead checklist, shared by Who we help and the set-up offer */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding: 12px 0 12px 26px; border-top: 1px solid var(--color-line); font-weight: 600; line-height: 1.45; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 10px; height: 8.6px; border-radius: 50%; background: var(--color-gold); }

/* Who we help */
.who { background: var(--color-cream); border-block: 1px solid var(--color-line); }
.who-panel { background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.who-tabs { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px; background: var(--color-paper); border-right: 1px solid var(--color-line); }
.who-tabs button {
  position: relative; text-align: left; padding: 14px 18px 14px 40px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--color-muted); font: 600 var(--text-base)/1.3 var(--font-body); cursor: pointer;
  transition: background-color .15s, color .15s;
}
.who-tabs button::before { content: ""; position: absolute; left: 18px; top: 50%; width: 10px; height: 8.6px; margin-top: -4.3px; border-radius: 50%; background: var(--color-line); transition: background-color .15s; }
.who-tabs button:hover { color: var(--color-ink); background: var(--color-white); }
.who-tabs button[aria-selected="true"] { color: var(--color-ink); background: var(--color-white); box-shadow: 0 1px 0 var(--color-line), 0 4px 12px rgba(20, 20, 20, .05); }
.who-tabs button[aria-selected="true"]::before { background: var(--color-gold); }
.who-item { padding: 36px 40px 40px; }
.who-item + .who-item { border-top: 1px solid var(--color-line); }
.who-item h3 { font-size: var(--text-xl); margin-bottom: 8px; }
.who-item > p { color: var(--color-muted); max-width: 34em; margin-bottom: 22px; }
.who-item .checks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; margin-bottom: 28px; }
.who-item .checks li:nth-last-child(-n+2) { border-bottom: 1px solid var(--color-line); }
/* With JS: tabs on the left, one panel at a time */
.who-panel.tabbed { display: grid; grid-template-columns: 240px 1fr; }
.who-panel.tabbed .who-item + .who-item { border-top: 0; }
.who-item[hidden] { display: none; }

/* New business set-up offer */
.offer { padding: var(--space-section) 0 0; }
.offer-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding: 48px 52px; border: 1px solid var(--color-line); border-radius: var(--radius-lg);
  background: var(--color-white); position: relative; overflow: hidden;
}
.offer-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--color-gold); }
.offer-copy h2 { font-size: var(--text-2xl); margin-bottom: 14px; }
.offer-copy p { color: var(--color-muted); font-size: var(--text-lg); margin-bottom: 28px; }
.offer-list li:last-child { border-bottom: 1px solid var(--color-line); }

/* How we work (ink band) */
.how { background: var(--color-ink); color: #fff; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps li { position: relative; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .2); }
.steps li::before { content: ""; position: absolute; top: -5px; left: 0; width: 11px; height: 9.5px; border-radius: 50%; background: var(--color-gold); }
.step-num { display: block; font: 500 3.25rem/1 var(--font-display); color: var(--color-gold); letter-spacing: -0.02em; margin-bottom: 18px; }
.steps h3 { font-size: var(--text-xl); margin-bottom: 10px; }
.steps p { color: var(--on-dark-soft); margin: 0; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 72px; align-items: start; }
.about-copy p { font-size: var(--text-lg); color: var(--color-muted); }
.values { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.values li { display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px 10px 16px; background: var(--color-cream); border-radius: var(--radius-pill); font-weight: 600; }
.values li::before { content: ""; width: 10px; height: 8.6px; border-radius: 50%; background: var(--color-gold); }

/* Contact */
.contact { background: var(--color-cream); border-top: 1px solid var(--color-line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; align-items: start; }
.contact-details { list-style: none; margin: 32px 0 0; padding: 0; }
.contact-details li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid rgba(20, 20, 20, .12); font-weight: 600; }
.contact-details li:last-child { border-bottom: 1px solid rgba(20, 20, 20, .12); }
.contact-details .icon { color: var(--color-gold-text); margin-top: 2px; }
.contact-details .label { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
.contact-details .sub { display: block; font-weight: 400; font-size: var(--text-sm); color: var(--color-muted); margin-top: 2px; }

.hours { margin-top: 28px; padding: 22px 24px; background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius-md); }
.hours h3 { display: flex; align-items: center; gap: 10px; font-size: var(--text-lg); margin-bottom: 10px; }
.hours h3 .icon { color: var(--color-gold-text); }
.hours table { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: 9px 0; border-top: 1px solid var(--color-line); vertical-align: top; }
.hours th { text-align: left; font-weight: 400; color: var(--color-muted); padding-right: 16px; }
.hours td { text-align: right; font-weight: 600; }

.form-card { background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-card); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--color-muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--color-ink);
  padding: 12px 14px; border: 1px solid #c9c4b8; border-radius: var(--radius-sm); background: var(--color-paper);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 44px; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(210, 155, 31, .4); outline-offset: 0; border-color: var(--color-ink); background: #fff; }
.field.invalid input, .field.invalid textarea { border-color: var(--error); }
.field-error { margin: 6px 0 0; font-size: var(--text-sm); color: var(--error); }
.field-error:empty { display: none; }
.form-status { margin: 14px 0 0; font-size: var(--text-sm); }
.form-status:empty { display: none; }
.form-status.error { color: var(--error); }
.btn[disabled] { opacity: .6; cursor: progress; }

.form-success { text-align: center; padding: 32px 8px; }
.form-success:focus { outline: none; }
.form-success .icon { width: 52px; height: 52px; color: var(--color-gold-text); stroke-width: 1.5; margin-bottom: 18px; }
.form-success h3 { font-size: var(--text-xl); margin-bottom: 10px; }
.form-success p { color: var(--color-muted); margin-bottom: 24px; }

/* Footer */
.site-footer { background: var(--color-ink); color: var(--on-dark-soft); padding: 48px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.footer-logo { display: inline-block; line-height: 0; margin-bottom: 18px; }
.footer-logo img { display: block; width: 226px; height: auto; }
.footer-brand p { max-width: 22em; margin: 0; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h2 { font-size: var(--text-lg); color: #fff; margin-bottom: 6px; }
.footer-col p { margin: 0; }
.footer-col a { color: #fff; text-decoration: none; font-weight: 600; }
.footer-col a:hover { text-decoration: underline; }
.footer-small { padding-top: 22px; font-size: var(--text-sm); color: #a8a49b; }

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Responsive */
@media (max-width: 1040px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid li { padding: 24px 24px 24px 0; }
  .trust-grid li + li { border-left: 0; }
  .trust-grid li:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--color-line); }
  .trust-grid li:nth-child(n+3) { border-top: 1px solid var(--color-line); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero-grid, .contact-grid, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .offer-card { grid-template-columns: 1fr; gap: 32px; padding: 40px 36px; }
  .who-panel.tabbed { grid-template-columns: 1fr; }
  .who-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--color-line); padding: 12px; scrollbar-width: none; }
  .who-tabs button { flex: none; padding: 10px 16px 10px 34px; }
  .who-tabs button::before { left: 14px; }
  .hero-card { max-width: 440px; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color-paper); border-bottom: 1px solid var(--color-line); padding: 4px 20px 20px;
    box-shadow: var(--shadow-card);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--color-line); }
  .nav-menu a:not(.btn):hover { border-bottom-color: var(--color-line); }
  .nav-menu .nav-cta { margin-top: 16px; padding: 14px; font-size: var(--text-base); }
}

@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .nav { min-height: 68px; }
  .brand img { width: 180px; }
  .hero-actions .btn { width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-grid li, .trust-grid li:nth-child(even) { padding: 20px 0; border-left: 0; }
  .trust-grid li + li { border-top: 1px solid var(--color-line); }
  .field-row { grid-template-columns: 1fr; }
  .form-card { padding: 26px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .topbar-hours { display: none !important; }
  .topbar-inner { justify-content: center; }
  .who-item { padding: 28px 22px 30px; }
  .who-item .checks { grid-template-columns: 1fr; }
  .who-item .checks li:nth-last-child(2) { border-bottom: 0; }
  .who-item .btn { width: 100%; }
  .offer-card { padding: 32px 22px; }
  .offer-card .btn { width: 100%; }
  .hours { padding: 18px; }
}
