/* Titus Original — homepage stylesheet.
   Source of truth: the approved revised prototype (Next.js). Fonts are self-hosted (SIL OFL) so the site's CSP
   (font-src 'self'; style-src 'self') stays untouched: Playfair Display (display) + DM Sans (body). */

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/playfair-display.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/dm-sans.woff2") format("woff2");
}

:root {
  --ink: #151515;
  --muted: #696761;
  --line: rgba(30, 30, 30, .12);
  --ivory: #f7f5f0;
  --white: #fffdf9;
  --gold: #b78b43;
  --gold-text: #8a6428;   /* small gold text: >= 4.9:1 on the lightest/darkest cream surfaces (--gold itself is 2.8-3.1:1, so only for large type and decoration) */
  --gold-light: #e2c58e;
  --silver: #c8cbd0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
a { color: inherit; text-decoration: none; }
.site { overflow: clip; }

.nav {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  padding: 22px 5vw;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  letter-spacing: .28em;
  font-size: 11px;
  font-weight: 600;
}
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; gap: 30px; font-size: 12px; }
.nav-links a { opacity: .75; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-cta { justify-self: end; }
.menu-toggle { display: none; }   /* created by js/menu.js and only shown at mobile widths (see the max-width: 900px block) */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}
.button:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .button:hover { transform: none; } }
.button-dark { background: var(--ink); color: white; }
.button-gold {
  background: linear-gradient(135deg, #f0d59f, #bd8f48);
  color: #17130d;
  box-shadow: 0 10px 30px rgba(159, 112, 42, .18);
}
.button-outline {
  border: 1px solid rgba(20,20,20,.2);
  background: rgba(255,255,255,.35);
}

.hero {
  min-height: 720px;
  position: relative;
  display: grid;
  grid-template-columns: 47% 53%;
  align-items: center;
  padding: 110px 5vw 70px;
  background:
    radial-gradient(circle at 78% 38%, rgba(255,255,255,.98), transparent 28%),
    linear-gradient(135deg, #f8f6f1 0%, #efede7 52%, #faf9f5 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -25% 20%;
  height: 260px;
  background: radial-gradient(ellipse, rgba(184, 140, 74, .13), transparent 65%);
  filter: blur(25px);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 3; max-width: 620px; }
.eyebrow {
  margin: 0 0 22px;
  font-size: 9px;
  letter-spacing: .38em;
  font-weight: 600;
  color: #6c685f;
}
.hero h1, h2 {
  font-family: "Playfair Display", serif;
  font-weight: 400;
  letter-spacing: -.055em;
}
.hero h1 {
  margin: 0;
  font-size: clamp(68px, 7.2vw, 112px);
  line-height: .83;
  max-width: 680px;
}
.hero h1 span { display: block; color: var(--gold); }
.hero-lead {
  max-width: 450px;
  margin: 30px 0 26px;
  font-size: 16px;
  line-height: 1.6;
  color: #57544e;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof {
  display: flex;
  gap: 0;
  margin-top: 45px;
}
.hero-proof div {
  min-width: 150px;
  padding-right: 24px;
  margin-right: 24px;
  border-right: 1px solid var(--line);
}
.hero-proof div:last-child { border: 0; }
.hero-proof strong, .hero-proof span { display: block; }
.hero-proof strong { font-family: "Playfair Display", serif; font-size: 20px; }
.hero-proof span { margin-top: 5px; color: var(--muted); font-size: 10px; }

.hero-object-wrap {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
}

/* Interactive emblem: flat SVG logo underneath, 3D canvas fades in on top once it has drawn. */
.emblem {
  position: relative;
  width: min(48vw, 640px);
  aspect-ratio: 1;
  touch-action: pan-y;          /* vertical scroll still works when a finger starts on the emblem */
}
.emblem-fallback,
.emblem-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.emblem-fallback { object-fit: contain; padding: 9%; transition: opacity .6s ease; }
.emblem-canvas { opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.emblem[data-status="ready"] .emblem-canvas { opacity: 1; }
.emblem[data-status="ready"] .emblem-fallback { opacity: 0; }

.hero-side-label {
  position: absolute;
  right: 1%;
  top: 38%;
  display: grid;
  gap: 12px;
  color: #6c685f;
  font-size: 10px;
  letter-spacing: .16em;
}
.hero-side-label span { color: var(--gold-text); margin-top: 5px; }

.trust-strip {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 55px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.5);
  color: #77736a;
  font-size: 9px;
  letter-spacing: .3em;
}

.section { padding: 110px 6vw; }
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
  align-items: end;
}
h2 { margin: 0; font-size: clamp(52px, 6vw, 84px); line-height: .9; }
.intro-copy { max-width: 480px; }
.intro-copy p, .section-heading > p, .process-heading > p, .pricing-callout p, .about p, .cta p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}
.text-link {
  display: inline-flex;
  gap: 14px;
  margin-top: 16px;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
}

.services { background: #faf9f6; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 50px;
  margin-bottom: 55px;
}
.section-heading > p { max-width: 390px; margin: 0; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card {
  position: relative;
  min-height: 300px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 18px 60px rgba(80,70,50,.05);
}
.service-number { color: var(--gold-text); font-size: 10px; letter-spacing: .2em; }
.service-icon { margin: 38px 0 20px; color: var(--gold); font-size: 30px; }
.service-card h3 { margin: 0 0 10px; font: 400 28px "Playfair Display", serif; }
.service-card p { max-width: 290px; min-height: 55px; color: var(--muted); line-height: 1.55; font-size: 13px; }
.service-card strong { display: block; margin-top: 28px; color: var(--gold-text); font-size: 13px; }
.service-card > a {
  position: absolute; right: 25px; bottom: 24px;
  display: grid; place-items: center;
  width: 34px; height: 34px; border: 1px solid var(--gold); border-radius: 50%;
  color: var(--gold);
}

.process {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 8vw;
  background: linear-gradient(135deg, #f4f1e9, #fffdf9);
}
.process-heading { max-width: 440px; }
.process-list { display: grid; grid-template-columns: repeat(5, 1fr); align-self: center; }
.process-item { min-height: 170px; padding: 0 20px; border-left: 1px solid var(--line); }
.process-item span { color: var(--gold-text); font-size: 10px; }
.process-item h3 { margin: 30px 0 8px; font: 400 22px "Playfair Display", serif; }
.process-item p { color: var(--muted); font-size: 11px; line-height: 1.5; }

.pricing-callout {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 9vw;
  align-items: center;
  background: #f9f7f2;
}
.pricing-plaque {
  width: min(100%, 360px);
  aspect-ratio: 1.25;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 55px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #d5d7d8 50%, #f8f8f6);
  border: 1px solid #c4c5c5;
  box-shadow: 20px 25px 70px rgba(60,60,60,.12);
  transform: rotate(-3deg);
  font-size: 12px;
  letter-spacing: .2em;
}
.pricing-plaque .plaque-mark { width: 56px; height: 56px; margin-top: 25px; }
.price-row { display: flex; flex-wrap: wrap; gap: 30px; margin: 32px 0; }
.price-row strong, .price-row span { display: block; }
.price-row strong { font: 400 32px "Playfair Display", serif; }
.price-row span { margin-top: 4px; color: var(--muted); font-size: 10px; }

.work { background: #fffdf9; }
.work-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 18px; }
.work-card { min-width: 0; }
.work-image {
  aspect-ratio: 1.25;
  display: flex; align-items: end; padding: 22px;
  border-radius: 15px;
  overflow: hidden;
  color: white;
  font-size: 10px;
  letter-spacing: .2em;
}
.work-large .work-image { aspect-ratio: 1.55; }
.work-restaurant { background: linear-gradient(135deg, #b18d63, #30281e 60%, #e6d0aa); }
.work-barber { background: linear-gradient(135deg, #4c443b, #b89b74); }
.work-space { background: linear-gradient(135deg, #d2d6c9, #4f574d); }
.work-card h3 { margin: 17px 0 5px; font: 400 23px "Playfair Display", serif; }
.work-card p { margin: 0; color: var(--muted); font-size: 11px; }
.work-note { margin: 30px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.about {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 7vw;
  align-items: center;
  background: #f5f2eb;
}
.about-symbol {
  min-height: 350px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, white, transparent 65%);
}
.about-mark { width: min(70vw, 300px); height: auto; filter: drop-shadow(0 25px 40px rgba(60, 45, 20, .12)); }

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 120px 6vw;
  background: linear-gradient(135deg, #eee9df, #fffdf9);
}
.cta h2 { position: relative; z-index: 2; }
.cta p { position: relative; z-index: 2; max-width: 520px; margin: 22px auto; }
.cta .button { position: relative; z-index: 2; }
.cta-object {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  opacity: .16; pointer-events: none;
}
.cta-mark { width: min(90vw, 520px); height: auto; transform: rotate(-12deg); }

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  padding: 30px 5vw;
  border-top: 1px solid var(--line);
  font-size: 10px;
}
.footer-links { display: flex; gap: 22px; color: var(--muted); }
/* Tap area: 13px-tall text links grow to a 37px-tall hit area; the negative margin cancels the padding so the footer looks identical. */
.footer-links a { padding: 12px 4px; margin: -12px -4px; }
.footer > span { justify-self: end; color: var(--muted); }

@media (max-width: 900px) {
  .nav { grid-template-columns: 1fr auto auto; gap: 14px; }
  .brand { grid-column: 1; grid-row: 1; }
  .nav-cta { grid-column: 2; grid-row: 1; }
  .nav-links { display: none; }

  /* Mobile menu: a disclosure button (js/menu.js) that opens the same five links as a panel under the header. */
  .menu-toggle {
    grid-column: 3; grid-row: 1;
    display: inline-grid; place-items: center;
    width: 44px; height: 44px; padding: 0;
    border: 1px solid rgba(20,20,20,.2); border-radius: 50%;
    background: rgba(255,255,255,.35);
    color: var(--ink);
    cursor: pointer;
  }
  .menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after {
    display: block; width: 18px; height: 1.5px; border-radius: 1px; background: currentColor;
  }
  .menu-toggle-bars { position: relative; }
  .menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle-bars::before { top: -6px; }
  .menu-toggle-bars::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { top: 0; transform: rotate(-45deg); }
  @media (prefers-reduced-motion: no-preference) {
    .menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after { transition: top .2s, transform .2s, background-color .2s; }
  }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    padding: 4px 5vw 18px;
    background: #fffdf9;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(60,50,30,.08);
    font-size: 15px;
  }
  .nav.is-open .nav-links a { opacity: 1; display: flex; align-items: center; min-height: 52px; border-top: 1px solid var(--line); }
  .nav.is-open .nav-links a:first-child { border-top: 0; }

  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 130px; }   /* minmax(0,…): the 96vw emblem must not widen the text column past the padded viewport */
  .hero-object-wrap { min-height: 500px; }
  .emblem { width: min(88vw, 540px); }
  .hero-side-label { display: none; }
  .service-grid, .work-grid { grid-template-columns: 1fr 1fr; }
  .service-card:first-child, .work-large { grid-column: span 2; }
  .process, .pricing-callout, .about, .intro { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: repeat(5, minmax(130px, 1fr)); overflow-x: auto; }
}

@media (max-width: 620px) {
  .nav { padding: 18px 20px; }
  .nav.is-open .nav-links { padding-left: 20px; padding-right: 20px; }
  .brand { letter-spacing: .18em; font-size: 9px; }
  .nav-cta { display: none; }
  .hero { min-height: auto; padding: 120px 22px 55px; }
  .hero h1 { font-size: clamp(58px, 17vw, 86px); }
  .hero-lead { font-size: 14px; }
  .hero-proof { flex-direction: column; gap: 15px; margin-top: 32px; }
  .hero-proof div { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
  .hero-object-wrap { min-height: 380px; }
  .emblem { width: 96vw; }
  .trust-strip { gap: 20px; justify-content: flex-start; overflow-x: auto; padding: 0 22px; white-space: nowrap; scrollbar-width: none; }
  .trust-strip::-webkit-scrollbar { display: none; }
  .section { padding: 78px 22px; }
  h2 { font-size: 52px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 25px; }
  .service-grid, .work-grid { grid-template-columns: 1fr; }
  .service-card:first-child, .work-large { grid-column: auto; }
  .process-list { grid-template-columns: repeat(5, 155px); scrollbar-width: none; }
  .process-list::-webkit-scrollbar { display: none; }
  .pricing-callout { gap: 50px; }
  .pricing-plaque { width: 100%; }
  .footer { grid-template-columns: 1fr; }
  .footer > span { justify-self: start; }
}

/* ---------- Contact form (below the final CTA) ----------
   Same surface language as the service cards: ivory, hairline border, soft shadow. Behaviour: js/contact.js. */
.talk {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 6vw;
  align-items: start;
  background: linear-gradient(180deg, #fffdf9, var(--ivory));   /* starts exactly where the CTA above ends */
}
.talk-intro { min-width: 0; }
.talk-intro h2 { margin-bottom: 26px; }
.talk-intro p { max-width: 440px; margin: 0 0 14px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.talk-intro .talk-alt { margin-top: 26px; }

.talk-form {
  display: grid;
  gap: 22px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 18px 60px rgba(80,70,50,.05);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ink); }
.field .optional { font-weight: 400; color: var(--muted); }
.form-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.form-note a { border-bottom: 1px solid var(--gold); }

.input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(30,30,30,.2);
  border-radius: 12px;
  background: rgba(255,255,255,.85);
  color: var(--ink);
  font: 400 16px/1.4 "DM Sans", sans-serif;    /* 16px keeps iOS from zooming the page on focus */
  transition: border-color .2s, box-shadow .2s;
}
textarea.input { min-height: 150px; padding: 14px 16px; line-height: 1.6; resize: vertical; }
.input:hover { border-color: rgba(30,30,30,.38); }
.input:focus-visible { outline: 2px solid #8a6428; outline-offset: 2px; border-color: #8a6428; }
.input:user-invalid { border-color: #8a2e1f; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23b78b43' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 12px 8px;
  cursor: pointer;
}
.select:invalid { color: var(--muted); }   /* the "Choose one" placeholder state */
.select option { color: var(--ink); }

.talk-submit { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }
.talk-submit[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.form-status { min-height: 1.6em; margin: 0; font-size: 13px; line-height: 1.6; color: #57544e; }
.form-status[data-state="ok"] { color: #4f614f; }
.form-status[data-state="error"] { color: #8a2e1f; }

@media (max-width: 900px) {
  .talk { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 620px) {
  .talk-form { padding: 24px 20px; gap: 20px; }
  .form-row { grid-template-columns: 1fr; gap: 20px; }
  .talk-submit { justify-self: stretch; width: 100%; }
}
