/* S J Blair Limited. Colours and fonts are the variables at the top. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F4F0E6;
  --paper-2: #EBE5D6;
  --ink: #15181C;
  --ink-soft: #3A3F46;
  --muted: #5B6068;
  --line: rgba(21, 24, 28, 0.16);
  --accent: #E4491F;       /* decoration only: too light for small text on paper */
  --accent-ink: #B23210;   /* accent for text on paper */
  --accent-light: #FF6B3D; /* accent for text on ink */

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --header-h: 68px;
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.section-dark :focus-visible { outline-color: var(--paper); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 240, 230, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-mark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.65rem;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}
.dot { color: var(--accent); }
.brand-sub {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 34px); }
.site-nav a:not(.btn) {
  text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 6px 0; background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 2px;
  transition: background-size 0.2s;
}
.site-nav a:not(.btn):hover { background-size: 100% 2px; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; margin-right: -10px;
  color: inherit; cursor: pointer; border-radius: 8px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0.95em 1.6em; border-radius: 999px;
  font: 600 0.98rem/1 var(--sans);
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-small { padding: 0.7em 1.2em; font-size: 0.9rem; background: var(--ink); color: var(--paper); }
.btn-small:hover { background: var(--accent-ink); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--accent-light); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */

.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); overflow-x: clip; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 1.1rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-ink);
}
.section-dark .eyebrow { color: var(--accent-light); }

h1 {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.hl {
  background: linear-gradient(transparent 64%, rgba(228, 73, 31, 0.3) 64% 90%, transparent 90%);
  padding: 0 0.08em;
  margin: 0 -0.08em;
}

.lead {
  margin: 1.6rem 0 2rem;
  max-width: 34em;
  font-size: clamp(1.08rem, 1.5vw, 1.25rem);
  color: var(--ink-soft);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art { position: relative; isolation: isolate; }
.hero-art::before {
  content: ""; position: absolute; z-index: -1;
  inset: 28px -18px -22px 26px;
  background: var(--accent);
  border-radius: var(--radius);
}
.caption {
  margin: 2.2rem 0 0;
  font-size: 0.85rem; color: var(--muted);
}

/* ---------- Browser frame ---------- */

.frame {
  margin: 0; background: #fff;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -28px rgba(21, 24, 28, 0.45);
}
.frame-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: #ECE7DB; border-bottom: 1px solid var(--line);
}
.frame-dots { display: inline-flex; gap: 6px; }
.frame-dots i { width: 10px; height: 10px; border-radius: 50%; background: #CBC4B3; }
.frame-url {
  flex: 1; max-width: 320px; margin-inline: auto;
  padding: 4px 12px; border-radius: 6px;
  background: #fff; color: var(--muted);
  font-size: 0.78rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.frame img { width: 100%; }
.frame-dark { border-color: rgba(244, 240, 230, 0.16); box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.7); }

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tint { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--paper); }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.08; }
h3 { font-size: 1.55rem; line-height: 1.2; }

/* Services */

.services {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink);
}
.services li {
  padding: clamp(24px, 3.4vw, 40px) clamp(0px, 3vw, 40px) clamp(28px, 3.6vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}
.services li:nth-child(odd) { border-right: 1px solid var(--line); }
.services li:nth-child(even) { padding-left: clamp(0px, 3vw, 40px); }
.num {
  display: block; margin-bottom: 0.9rem;
  font-family: var(--serif); font-size: 1.05rem; color: var(--accent-ink);
}
.services h3 { margin-bottom: 0.6rem; }
.services p { margin: 0; color: var(--ink-soft); max-width: 30em; }

/* Process */

.steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  counter-reset: step;
}
.steps li { position: relative; padding-top: 56px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font-family: var(--serif); font-size: 1.15rem;
}
.steps li::after {
  content: ""; position: absolute; top: 20px; left: 52px; right: -20px;
  height: 1.5px; background: var(--line);
}
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: 0.5rem; }
.steps p { margin: 0; color: var(--ink-soft); }

/* Pricing */

.prices {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.price-card {
  display: flex; flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  background: #FAF7F0; border: 1px solid var(--line); border-top: 3px solid var(--ink);
  border-radius: var(--radius);
}
.price-card h3 { font-size: 1.4rem; }
.price { margin: 0.9rem 0 0.3rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.amt { font-family: var(--serif); font-size: clamp(2.4rem, 3.6vw, 3.2rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.gst, .from { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.price-for { margin: 0 0 1.2rem; color: var(--ink-soft); }
.price-list { border-top: 1px solid var(--line); padding-top: 1rem; }
.price-list li { position: relative; padding: 0.3rem 0 0.3rem 1.5rem; color: var(--ink-soft); }
.price-list li::before {
  content: ""; position: absolute; left: 0; top: 0.95em;
  width: 0.7rem; height: 2px; background: var(--accent);
}
.price-custom {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: clamp(16px, 2vw, 28px); padding: clamp(24px, 3vw, 36px);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
}
.price-custom h3 { margin-bottom: 0.3rem; }
.price-custom p { margin: 0; color: var(--ink-soft); max-width: 36em; }
.price-note { margin: 1.4rem 0 0; font-size: 0.9rem; color: var(--muted); }

/* Work */

.case {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.case-copy h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.case-meta { margin: 0.4rem 0 1.2rem; font-size: 0.92rem; color: rgba(244, 240, 230, 0.7); }
.case-copy p { color: rgba(244, 240, 230, 0.88); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.4rem 0 1.8rem; }
.tags li {
  padding: 5px 14px; border: 1px solid rgba(244, 240, 230, 0.28); border-radius: 999px;
  font-size: 0.82rem; color: rgba(244, 240, 230, 0.9);
}

/* About */

.about {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 96px); align-items: start;
}
.about h2, .contact-copy h2 { margin-bottom: 1.1rem; }
.about-body { font-size: 1.15rem; color: var(--ink-soft); }
.about-body p:last-child { margin-bottom: 0; }

/* Contact */

.contact {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 96px); align-items: start;
}
.contact-copy p:not(.eyebrow) { color: var(--ink-soft); }
.contact-list { margin-top: 1.6rem; border-top: 1.5px solid var(--ink); }
.contact-list li {
  display: flex; gap: 24px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.contact-list span {
  flex: 0 0 4.5rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.contact-list a { font-family: var(--serif); font-size: 1.3rem; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.form {
  background: var(--paper); border-radius: 18px; padding: clamp(22px, 3.4vw, 40px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -30px rgba(21, 24, 28, 0.35);
}
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.88rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  font: 400 1rem/1.4 var(--sans); color: var(--ink);
  background: #fff; border: 1.5px solid rgba(21, 24, 28, 0.28); border-radius: 10px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--ink);
}
.form-note { margin: 14px 0 0; font-size: 0.85rem; color: var(--muted); }
.hp { display: none !important; } /* spam trap: real visitors never see or tick it */
.form-status { margin: 0; }
.form-status.is-success,
.form-status.is-error { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 0.95rem; }
.form-status.is-success { background: #E3EFE5; color: #1E4A30; }
.form-status.is-error { background: #FBE9E5; color: #8A2A12; }

/* ---------- Footer ---------- */

.site-footer { padding: 36px 0 44px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; justify-content: space-between; }
.footer-inner p { margin: 0; }
.footer-brand { color: var(--ink); display: inline-flex; gap: 8px; align-items: baseline; }
.footer-brand .brand-mark { font-size: 1.25rem; }
.footer-brand span:last-child { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Simple text pages (privacy, 404) ---------- */

.page { padding: clamp(48px, 8vw, 104px) 0 clamp(64px, 9vw, 120px); }
.prose { max-width: 40rem; }
.prose h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: 0.4em; }
.prose h2 { font-size: 1.5rem; margin: 2em 0 0.5em; }
.prose p:not(.eyebrow), .prose li { color: var(--ink-soft); }
.prose ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }
.prose a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose .meta { font-size: 0.9rem; color: var(--muted); }

/* ---------- Scroll reveal (only ever applied by main.js) ---------- */

.reveal-pre { opacity: 0; transform: translateY(18px); }
.reveal-in { transition: opacity 0.6s ease, transform 0.6s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-pre { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}

/* ---------- Smaller screens ---------- */

@media (max-width: 900px) {
  .hero-grid, .case, .about, .contact { grid-template-columns: minmax(0, 1fr); }
  .prices { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { margin-right: 18px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .steps li:nth-child(2)::after { display: none; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px clamp(20px, 4vw, 40px) 20px;
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); background: none; font-size: 1.05rem; }
  .site-nav .btn { margin-top: 16px; padding: 1em; font-size: 1rem; }

  .services { grid-template-columns: minmax(0, 1fr); }
  .services li, .services li:nth-child(even) { padding-left: 0; padding-right: 0; border-right: 0; }
  .services li:nth-child(odd) { border-right: 0; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li::after { display: none; }
  .actions .btn { flex: 1 1 100%; }
  .contact-list li { gap: 14px; }
  .contact-list a { font-size: 1.15rem; }
}
