/* ==========================================================================
   OPTIONS MALL — The Architecture of a Well-Dressed Man
   Base system: tokens, typography, masthead, index overlay, footer, utilities
   ========================================================================== */

:root {
  --petrol: #123C43;
  --petrol-deep: #0C2B30;
  --chalk: #F1EEE6;
  --chalk-warm: #E9E4D8;
  --copper: #B66F4E;
  --copper-ink: #8F4F33;      /* copper for small text on light grounds */
  --copper-light: #E0A688;    /* copper for text on petrol / ink */
  --mist: #D8DEDC;
  --ink: #252D30;
  --ink-soft: #4A5457;
  --sage: #AAB9AE;
  --paper: #FAF8F3;

  --f-display: "Playfair Display", "Didot", Georgia, serif;
  --f-sans: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4.2vw, 72px);
  --max: 1480px;
  --head-h: 76px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.72;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1.1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.05; }
strong { font-weight: 500; }
ul, ol { padding: 0; margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--petrol); color: var(--chalk); padding: 10px 16px;
  font-family: var(--f-mono); font-size: .8rem; text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Typographic utilities ---------- */
.mono {
  font-family: var(--f-mono); font-weight: 400; font-size: .72rem;
  letter-spacing: .16em; text-transform: uppercase; line-height: 1.5;
}
.mono--copper { color: var(--copper-ink); }
.serif { font-family: var(--f-display); }
.italic { font-style: italic; }
.vlabel {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
}
.lede { font-size: clamp(1.1rem, 1rem + .45vw, 1.35rem); line-height: 1.6; font-weight: 300; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Ruler — the signature measurement motif */
.ruler {
  height: 14px;
  background:
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 50px) bottom left / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 10px) bottom left / 100% 6px no-repeat;
  opacity: .55;
}
.hairline { height: 1px; background: currentColor; opacity: .25; border: 0; margin: 0; }

/* Links with drawn underline */
.link-line {
  display: inline-flex; align-items: center; gap: .9em;
  text-decoration: none; font-family: var(--f-mono); font-size: .74rem;
  letter-spacing: .18em; text-transform: uppercase; padding: .6em 0;
  border-bottom: 1px solid currentColor;
}
.link-line .arrow { transition: transform .4s var(--ease); }
.link-line:hover .arrow, .link-line:focus-visible .arrow { transform: translateX(6px); }

.btn-frame {
  display: inline-flex; align-items: center; gap: 1rem; min-height: 52px;
  padding: 0 1.6rem; text-decoration: none; border: 1px solid currentColor;
  font-family: var(--f-mono); font-size: .76rem; letter-spacing: .18em; text-transform: uppercase;
  position: relative; transition: background .35s var(--ease), color .35s var(--ease);
}
.btn-frame::before, .btn-frame::after {
  content: ""; position: absolute; width: 9px; height: 9px; border: 1px solid var(--copper);
}
.btn-frame::before { top: -5px; left: -5px; border-right: 0; border-bottom: 0; }
.btn-frame::after { bottom: -5px; right: -5px; border-left: 0; border-top: 0; }
.btn-frame--light { color: var(--chalk); }
.btn-frame--light:hover, .btn-frame--light:focus-visible { background: var(--chalk); color: var(--petrol); }
.btn-frame--dark { color: var(--petrol); }
.btn-frame--dark:hover, .btn-frame--dark:focus-visible { background: var(--petrol); color: var(--chalk); }

/* Reveal (JS enhanced only) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Masthead ---------- */
.masthead {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--head-h);
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: clamp(12px, 2.4vw, 40px);
  padding: 0 var(--gutter);
  background: rgba(241, 238, 230, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(18, 60, 67, .14);
  transition: transform .45s var(--ease), background .3s;
}
.masthead.is-scrolled { box-shadow: 0 10px 30px -18px rgba(18, 60, 67, .45); }
.masthead__logo { display: block; line-height: 0; }
.masthead__logo img { height: 46px; width: auto; aspect-ratio: 708 / 390; }
.masthead__folio {
  margin: 0; display: flex; align-items: center; gap: 14px; min-width: 0;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--petrol);
}
.masthead__folio b { font-weight: 500; color: var(--copper-ink); }
.masthead__folio span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.masthead__rule { flex: 0 0 42px; height: 1px; background: var(--copper); }
.masthead__tel {
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; color: var(--petrol); text-decoration: none;
  padding: 10px 0; border-bottom: 1px solid transparent;
}
.masthead__tel:hover { border-bottom-color: var(--copper); }
.masthead__menu {
  display: inline-flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 0 0 18px;
  background: none; border: 0; border-left: 1px solid rgba(18, 60, 67, .2); cursor: pointer;
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--petrol);
}
.burger { position: relative; width: 30px; height: 12px; display: block; }
.burger i { position: absolute; left: 0; height: 1.5px; background: var(--petrol); transition: transform .45s var(--ease), width .45s var(--ease), top .45s var(--ease); }
.burger i:first-child { top: 0; width: 30px; }
.burger i:last-child { top: 10px; width: 19px; }
.menu-open .burger i { background: var(--chalk); }
.menu-open .burger i:first-child { top: 5px; transform: rotate(45deg); }
.menu-open .burger i:last-child { top: 5px; width: 30px; transform: rotate(-45deg); }
.menu-open .masthead { background: var(--petrol); border-color: rgba(241,238,230,.15); }
.menu-open .masthead__folio, .menu-open .masthead__tel, .menu-open .masthead__menu { color: var(--chalk); }
.menu-open .masthead__menu { border-color: rgba(241,238,230,.25); }

@media (max-width: 860px) { .masthead__tel { display: none; } }
@media (max-width: 600px) {
  :root { --head-h: 64px; }
  .masthead { grid-template-columns: auto 1fr auto; gap: 12px; }
  .masthead__logo img { height: 38px; }
  .masthead__folio { display: none; }
  .masthead__menu { justify-self: end; border-left: 0; padding-left: 0; }
}

/* ---------- Index overlay (main navigation) ---------- */
.site-index {
  position: fixed; inset: 0; z-index: 90; background: var(--petrol); color: var(--chalk);
  padding: calc(var(--head-h) + clamp(20px, 4vh, 48px)) var(--gutter) 32px;
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 96px);
  overflow-y: auto; visibility: hidden; opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--ease), opacity .4s, visibility 0s .7s;
}
.menu-open .site-index { visibility: visible; opacity: 1; clip-path: inset(0 0 0 0); transition: clip-path .7s var(--ease), opacity .3s, visibility 0s; }
.menu-open body, html.menu-open { overflow: hidden; }
.site-index__grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: linear-gradient(var(--chalk) 1px, transparent 1px), linear-gradient(90deg, var(--chalk) 1px, transparent 1px);
  background-size: 80px 80px;
}
.site-index__list { list-style: none; position: relative; align-self: center; }
.site-index__list li { border-top: 1px solid rgba(241,238,230,.14); }
.site-index__list li:last-child { border-bottom: 1px solid rgba(241,238,230,.14); }
.site-index__list a {
  display: grid; grid-template-columns: 3.2rem 1fr auto; align-items: baseline; gap: 1rem;
  padding: clamp(6px, 1.2vh, 14px) 0; text-decoration: none;
}
.site-index__list .n { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; color: var(--copper-light); }
.site-index__list .t { font-family: var(--f-display); font-size: clamp(1.6rem, 1rem + 2.6vw, 3.3rem); line-height: 1.12; transition: transform .5s var(--ease), color .3s; }
.site-index__list .d { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; opacity: .6; text-align: right; }
.site-index__list a:hover .t, .site-index__list a:focus-visible .t { transform: translateX(14px); color: var(--copper-light); font-style: italic; }
.site-index__list a[aria-current="page"] .t { color: var(--copper-light); font-style: italic; }
.site-index__aside { position: relative; align-self: end; display: grid; gap: 28px; padding-bottom: 8px; }
.site-index__aside p { margin: 0; }
.site-index__aside .serif { font-size: clamp(1.3rem, 1rem + 1vw, 1.9rem); line-height: 1.25; font-style: italic; }
.site-index__aside a { color: var(--chalk); text-decoration: none; border-bottom: 1px solid rgba(224,166,136,.6); }
.site-index__aside .mono { color: var(--copper-light); margin-bottom: 6px; display: block; }
@media (max-width: 860px) {
  .site-index { grid-template-columns: 1fr; align-content: start; }
  .site-index__list .d { display: none; }
  .site-index__list a { grid-template-columns: 2.6rem 1fr; }
  .site-index__aside { align-self: start; }
}

/* ---------- Breadcrumbs ---------- */
.crumbs { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5em; }
.crumbs li + li::before { content: "/"; margin-right: .5em; color: var(--copper); }
.crumbs a { text-decoration: none; border-bottom: 1px solid transparent; }
.crumbs a:hover { border-bottom-color: currentColor; }
.crumbs [aria-current] { opacity: .65; }

main { display: block; padding-top: var(--head-h); }

/* ---------- Footer ---------- */
.footer { background: var(--petrol-deep); color: var(--chalk); position: relative; overflow: hidden; }
.footer .ruler { color: var(--copper); opacity: .8; }
.footer__statement {
  padding: clamp(56px, 9vw, 120px) var(--gutter) clamp(36px, 5vw, 64px);
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
  border-bottom: 1px solid rgba(241,238,230,.12);
}
.footer__statement p {
  margin: 0; font-family: var(--f-display); font-size: clamp(2rem, 1rem + 4.4vw, 5.4rem); line-height: 1; letter-spacing: -.01em;
}
.footer__statement em { color: var(--copper-light); }
.footer__logo { background: var(--chalk); padding: 10px; line-height: 0; }
.footer__logo img { width: clamp(120px, 14vw, 170px); height: auto; }
.footer__cols {
  max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter);
  display: grid; grid-template-columns: 1.1fr 1fr 1fr .9fr; gap: clamp(28px, 4vw, 56px);
}
.footer h2 { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--copper-light); margin-bottom: 20px; font-weight: 400; }
.footer__nav ol { list-style: none; display: grid; gap: 6px; }
.footer__nav a { text-decoration: none; display: inline-flex; gap: 12px; padding: 3px 0; }
.footer__nav a span { font-family: var(--f-mono); font-size: .66rem; color: var(--sage); padding-top: .3em; }
.footer__nav a:hover { color: var(--copper-light); }
.footer address { font-style: normal; line-height: 1.75; }
.footer__contact a { display: block; text-decoration: none; padding: 4px 0; }
.footer__contact a:hover { color: var(--copper-light); }
.footer__contact .mono { color: var(--sage); display: block; margin-top: 14px; }
.footer__contact .big { font-family: var(--f-display); font-size: 1.45rem; }
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.social li > span {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid rgba(241,238,230,.28); color: var(--chalk);
}
.social svg { width: 18px; height: 18px; fill: currentColor; }
.footer__note { font-size: .86rem; color: var(--mist); opacity: .8; margin-top: 16px; }
.footer__base {
  max-width: var(--max); margin: 0 auto; padding: 22px var(--gutter) 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  border-top: 1px solid rgba(241,238,230,.12); font-size: .86rem; color: var(--mist);
}
.footer__base a { color: var(--copper-light); text-decoration: none; border-bottom: 1px solid rgba(224,166,136,.4); }
@media (max-width: 1024px) { .footer__cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .footer__statement { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr; }
}

/* ---------- Shared inner-page header bits ---------- */
.page-index-tag { display: inline-flex; gap: 12px; align-items: center; }
.page-index-tag::before { content: ""; width: 34px; height: 1px; background: var(--copper); }

/* Related links strip used on several pages */
.next-pages { background: var(--mist); }
.next-pages .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.next-pages a {
  display: block; padding: clamp(28px, 4vw, 48px) clamp(12px, 2vw, 28px); text-decoration: none;
  border-left: 1px solid rgba(18,60,67,.18); transition: background .3s;
}
.next-pages a:first-child { border-left: 0; }
.next-pages a:hover { background: var(--chalk); }
.next-pages .serif { font-size: clamp(1.4rem, 1rem + 1vw, 2rem); display: block; margin-top: 8px; color: var(--petrol); }
@media (max-width: 600px) { .next-pages a { border-left: 0; border-top: 1px solid rgba(18,60,67,.18); } }
