/* HALSHWORTH — site styles · v1.1 */

@font-face {
  font-family: "Castoro Titling";
  src: url("../fonts/CastoroTitling-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Castoro";
  src: url("../fonts/Castoro-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Castoro";
  src: url("../fonts/Castoro-Italic-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* Layout: full-bleed bands alternating ink / parchment / vellum, one centred 1200px column. */
:root {
  --ink: #18261F;
  --green: #2F4A3D;
  --bronze: #9C7A47;
  --bronze-dark: #7A5C30;   /* text on light grounds, 5.2:1 */
  --bronze-light: #B8955E;  /* text on ink, 5.6:1 */
  --parchment: #F2EBDD;
  --vellum: #E3D8C3;
  --body-ink: #2B302B;
  --muted: #5E5B4F;         /* 5.7:1 on parchment */
  --muted-on-ink: #A9B3A8;  /* 7.3:1 on ink */
  --soft-on-ink: #D9D3C4;
  --line: #CFC2A8;
  --line-on-ink: rgba(242, 235, 221, 0.18);

  --display: "Castoro Titling", "Castoro", Georgia, "Times New Roman", serif;
  --text: "Castoro", Georgia, "Times New Roman", serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(88px, 11vw, 156px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--parchment);
  color: var(--ink);
  font-size: 0.95rem;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bronze-dark);
}
.on-ink .label { color: var(--bronze-light); }

.display {
  font-family: var(--display);
  letter-spacing: 0.03em;
  line-height: 1.08;
}

.rule {
  width: 64px;
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--bronze);
}

/* ---------- Top bar ---------- */
.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
}
.topbar .home { display: inline-flex; padding: 6px 0; }
.topbar .home img { width: 34px; }
.topbar nav ul {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.topbar nav a {
  display: inline-block;
  padding: 10px 0;
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--soft-on-ink);
  transition: color 0.25s var(--ease);
}
.topbar nav a:hover { color: var(--bronze-light); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding-block: 120px 96px;
  background: var(--ink);
  color: var(--parchment);
  text-align: center;
  overflow: hidden;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(22px, 3.2vh, 34px);
}
.hero .symbol { width: clamp(150px, 24vw, 290px); margin-bottom: clamp(6px, 1.4vh, 14px); }
.hero h1 { line-height: 0; }
.hero h1 img { width: clamp(250px, 40vw, 520px); }
.hero .tagline {
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  color: var(--soft-on-ink);
}
.hero .sub {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bronze-light);
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 1px;
  height: 56px;
  background: linear-gradient(var(--bronze), transparent);
  transform: translateX(-50%);
}

/* ---------- Sections ---------- */
section { padding-block: var(--section); }
.bg-parchment { background: var(--parchment); }
.bg-vellum { background: var(--vellum); }
.bg-ink { background: var(--ink); color: var(--parchment); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: start;
}
.section-head { display: flex; flex-direction: column; gap: 22px; }
.section-head h2 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); max-width: 18ch; }
.prose { display: flex; flex-direction: column; gap: 1.1em; max-width: 60ch; min-width: 0; }
.prose .lead {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.4;
  font-style: italic;
  color: var(--green);
}
.prose p:not(.lead) { color: var(--body-ink); }

/* Cards: approach, focus, principles. Hairline top rule, no boxes. */
.cards {
  display: grid;
  gap: clamp(28px, 3.4vw, 48px) clamp(24px, 3vw, 44px);
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
  list-style: none;
}
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards li {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.cards h3 { font-family: var(--display); font-size: 1.32rem; letter-spacing: 0.05em; line-height: 1.25; }
.cards p { color: var(--body-ink); font-size: 1.05rem; }
.bg-vellum .cards li { border-top-color: var(--bronze); }
.on-ink .cards li { border-top-color: var(--line-on-ink); }
.on-ink .cards p { color: var(--muted-on-ink); }

/* Contact: one short, quiet line */
.contact { text-align: center; padding-block: clamp(80px, 9vw, 128px); }
.contact-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.contact h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.contact .note { color: var(--muted); max-width: 52ch; font-size: 1.05rem; }
.contact .note a { color: var(--ink); white-space: nowrap; }
.contact .note a:hover { color: var(--green); }

/* Buttons (used on the 404 page) */
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 10px; }
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--parchment); }
.btn.solid { background: var(--ink); color: var(--parchment); }
.btn.solid:hover { background: var(--green); border-color: var(--green); }
.on-ink .btn { border-color: var(--parchment); color: var(--parchment); }
.on-ink .btn.solid { background: var(--parchment); color: var(--ink); }
.on-ink .btn.solid:hover { background: var(--bronze-light); border-color: var(--bronze-light); color: var(--ink); }

/* Footer */
.footer { background: var(--ink); color: var(--muted-on-ink); padding-block: 64px 48px; }
.footer .wrap { display: flex; flex-direction: column; gap: 36px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 18px; }
.footer-brand img.sym { width: 30px; }
.footer-brand img.wm { width: 190px; }
.footer .motto { font-family: var(--display); letter-spacing: 0.3em; font-size: 0.82rem; color: var(--bronze-light); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--line-on-ink);
  font-size: 0.9rem;
}
.footer a { color: var(--soft-on-ink); text-decoration: none; }
.footer a:hover { color: var(--bronze-light); }

/* ---------- Motion (JS on, motion allowed). Content stays readable at rest. ---------- */
.js [data-reveal] {
  opacity: 0.35;
  transform: translateY(16px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="2"] { transition-delay: 0.12s; }
.js [data-reveal="3"] { transition-delay: 0.24s; }
.js [data-reveal="4"] { transition-delay: 0.36s; }

.js .hero .symbol { animation: rise 1.6s var(--ease) 0.1s both; }
.js .hero h1, .js .hero .tagline, .js .hero .sub { animation: fade 1.2s var(--ease) both; }
.js .hero .rule { transform-origin: center; animation: draw 1.2s var(--ease) 0.8s both; }
.js .hero h1 { animation-delay: 0.5s; }
.js .hero .tagline { animation-delay: 0.9s; }
.js .hero .sub { animation-delay: 1.1s; }
@keyframes rise { from { opacity: 0.35; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0.35; } to { opacity: 1; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal], .js .hero .symbol, .js .hero h1, .js .hero .tagline, .js .hero .rule, .js .hero .sub {
    opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 1.0625rem; }
  .topbar .nav-extra { display: none; }
  .hero .sub { letter-spacing: 0.22em; }
}
@media (max-width: 560px) {
  .cards-4, .cards-3 { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; }
}

@media print {
  .topbar, .scroll-cue, .actions { display: none; }
  .hero { min-height: auto; }
}
