/* ============================================================
   Moreish — morei.sh
   Palette sampled from the hand-lettered logo:
   deep coffee ink on warm cream, with a caramel accent.
   ============================================================ */

:root {
  --cream:      #FBF5EA;
  --cream-deep: #F4EAD8;
  --ink:        #3A281C;
  --ink-soft:   #6B5748;
  --ink-faint:  #9C8877;
  --caramel:    #C0662E;
  --caramel-dk: #A2521F;
  --rule:       #E3D5BF;
  --card:       #FFFDF8;
  --shadow:     rgba(58, 40, 28, 0.09);

  --bg:      var(--cream);
  --fg:      var(--ink);
  --fg-soft: var(--ink-soft);
  --fg-faint:var(--ink-faint);
  --accent:  var(--caramel);
  --accent-h:var(--caramel-dk);
  --surface: var(--card);
  --alt-bg:  var(--cream-deep);
  --border:  var(--rule);

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #241811;
    --fg:       #F6ECDD;
    --fg-soft:  #C7B3A0;
    --fg-faint: #9A8574;
    --accent:   #E08C4D;
    --accent-h: #EFA468;
    --surface:  #2E2018;
    --alt-bg:   #1D130E;
    --border:   #423025;
    --shadow:   rgba(0, 0, 0, 0.35);
  }
}

/* ── reset-ish ─────────────────────────────────────────── */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent-h); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { text-wrap: pretty; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

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

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}
.wrap.narrow { width: min(100% - 2.5rem, 720px); }

/* ── header ────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header:has(~ main .hero:not(:hover)) { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .85rem 0;
}

.logo { display: block; line-height: 0; }

/* The wordmark SVG is solid black on transparent. Rather than trying to filter
   black into a brand colour (black has no hue, so it only ever approximates),
   we use the file as a mask and paint it — exact colour in both themes, and the
   SVG stays swappable without editing its fill. */
.logo-mark {
  display: block;
  height: 38px;
  aspect-ratio: 501 / 148;   /* from the logo's own viewBox */
  background-color: var(--fg);
  -webkit-mask: url("/assets/moreish-logo.svg") no-repeat center / contain;
          mask: url("/assets/moreish-logo.svg") no-repeat center / contain;
}

/* Insurance for anything without mask support: render the name as text. */
@supports not ((-webkit-mask: url("#m")) or (mask: url("#m"))) {
  .logo-mark {
    background: none;
    aspect-ratio: auto;
    height: auto;
    font-family: var(--serif);
    font-size: 1.65rem;
    font-style: italic;
    font-weight: 600;
    color: var(--fg);
    letter-spacing: -0.02em;
    line-height: 1.2;
  }
  .logo-mark::after { content: "moreish"; }
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: .95rem;
}
.site-header nav a {
  color: var(--fg-soft);
  text-decoration: none;
  font-weight: 500;
}
.site-header nav a:hover { color: var(--fg); }

.nav-cta {
  background: var(--fg);
  color: var(--bg) !important;
  padding: .5rem 1.05rem;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent); }

@media (max-width: 620px) {
  .site-header nav { gap: 1rem; font-size: .875rem; }
  .site-header nav a:not(.nav-cta) { display: none; }
  .logo-mark { height: 30px; }
}

/* ── hero ──────────────────────────────────────────────── */

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}

.hero {
  padding: clamp(3.5rem, 11vh, 7rem) 0 clamp(3rem, 8vh, 5rem);
  position: relative;
  overflow: hidden;
}
/* soft warm bloom behind the headline */
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 45% 30% -20%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 13%, transparent), transparent);
  pointer-events: none;
  z-index: -1;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  margin-bottom: 1.6rem;
  max-width: 19ch;
}
.hero h1 span,
.hero h1 em { display: block; }
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  margin-top: .12em;
}

.lede {
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  line-height: 1.6;
  color: var(--fg-soft);
  max-width: 56ch;
  margin: 0 0 2.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-bottom: 3.2rem;
}

.btn {
  display: inline-block;
  padding: .9rem 1.7rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .14s ease, background-color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #fff !important; }
.btn-primary:hover { background: var(--accent-h); color: #fff !important; }

.btn-ghost { background: transparent; color: var(--fg) !important; border-color: var(--border); }
.btn-ghost:hover { border-color: var(--fg); }

.hero-note {
  font-size: .95rem;
  color: var(--fg-faint);
  border-left: 2px solid var(--border);
  padding-left: 1.1rem;
  max-width: 48ch;
  margin: 0;
}
.hero-note strong { color: var(--fg-soft); font-family: var(--serif); font-size: 1.05rem; }
.hero-note .pron { font-family: var(--serif); font-style: italic; }
.hero-note span[aria-hidden] { color: var(--accent); }

/* ── sections ──────────────────────────────────────────── */

.section { padding: clamp(3.5rem, 9vh, 6.5rem) 0; }
.section-alt { background: var(--alt-bg); }

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  margin-bottom: 3rem;
  max-width: 20ch;
}

/* ── service cards ─────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem 1.8rem;
  box-shadow: 0 1px 2px var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px var(--shadow);
}

.card-num {
  font-family: var(--serif);
  font-size: .95rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .08em;
  margin-bottom: .9rem;
}

.card h3 {
  font-size: 1.45rem;
  margin-bottom: .85rem;
}

.card-lead {
  font-size: 1.02rem;
  color: var(--fg);
  font-weight: 500;
  margin: 0 0 .9rem;
}

.card p:not(.card-lead) {
  color: var(--fg-soft);
  font-size: .96rem;
  margin: 0;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: 0;
  margin: 1.4rem 0 0;
}
.tags li {
  font-size: .78rem;
  font-weight: 500;
  color: var(--fg-soft);
  background: var(--alt-bg);
  border: 1px solid var(--border);
  padding: .28rem .68rem;
  border-radius: 999px;
}

/* ── steps ─────────────────────────────────────────────── */

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2.5rem 2rem;
}
.steps > li { counter-increment: step; }
.steps > li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.steps h3 { font-size: 1.28rem; margin-bottom: .6rem; }
.steps p { color: var(--fg-soft); margin: 0; font-size: .97rem; }

/* ── fit list ──────────────────────────────────────────── */

.checks { list-style: none; padding: 0; margin: 0 0 2rem; }
.checks li {
  position: relative;
  padding: .9rem 0 .9rem 2.2rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.06rem;
  color: var(--fg);
}
.checks li:first-child { border-top: 1px solid var(--border); }
.checks li::before {
  content: "";
  position: absolute;
  left: .35rem;
  top: 1.42rem;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--accent);
}
.checks em { font-family: var(--serif); font-size: 1.08em; }

.fit-note {
  color: var(--fg-faint);
  font-size: .97rem;
  font-style: italic;
  margin: 0;
}

/* ── contact ───────────────────────────────────────────── */

.section-contact { background: var(--alt-bg); }

.contact-lede {
  font-size: 1.1rem;
  color: var(--fg-soft);
  margin: 0 0 2.5rem;
  max-width: 52ch;
}

.form { display: grid; gap: 1.25rem; }

.field { display: grid; gap: .4rem; }

.field label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--fg);
}
.optional { font-weight: 400; color: var(--fg-faint); }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .75rem .9rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.55; }

.field input::placeholder,
.field textarea::placeholder { color: var(--fg-faint); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #C0392B; }

.field .error {
  font-size: .85rem;
  color: #C0392B;
  margin: 0;
}
@media (prefers-color-scheme: dark) {
  .field .error { color: #F09080; }
  .field input[aria-invalid="true"],
  .field textarea[aria-invalid="true"] { border-color: #F09080; }
}

/* honeypot — off-screen but not display:none, so bots still fill it */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit { justify-self: start; margin-top: .35rem; }
.btn-submit[disabled] { opacity: .6; cursor: progress; }

.form-status {
  margin: 0;
  font-size: .97rem;
  min-height: 1.4em;
}
.form-status.ok    { color: var(--accent); font-weight: 600; }
.form-status.error { color: #C0392B; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .form-status.error { color: #F09080; }
}

.form-alt { font-size: .93rem; color: var(--fg-faint); margin: 0; }

/* ── footer ────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 3.5rem;
}
.footer-inner { display: grid; gap: .5rem; }

.footer-mark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}
.footer-tag { color: var(--fg-soft); margin: 0; }
.footer-meta {
  color: var(--fg-faint);
  font-size: .92rem;
  margin: .75rem 0 0;
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
