/* Fortuous Ltd — corporate site
   Palette: ink navy / paper white / brass / slate
   Type: Newsreader (display) · Public Sans (body) · Spline Sans Mono (ledger detail) */

:root {
  --ink: #16243a;
  --ink-deep: #0f1a2c;
  --paper: #fbfaf7;
  --paper-raised: #ffffff;
  --slate: #465264;
  --brass: #a8895a;
  --brass-bright: #c2a678;
  --rule: #d9d6cd;
  --max: 1080px;
  --max-wide: 1360px;
  --header-h: 77px; /* fallback; site.js keeps it in sync with the real header */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  background: var(--ink-deep);
  color: var(--paper);
  padding: 10px 18px;
  text-decoration: none;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: "Public Sans", -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: var(--max-wide); }

/* ---------- scroll progress: the brass rule that fills as you read ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brass), var(--brass-bright));
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 20;
  pointer-events: none;
}

/* ---------- ledger rules: fine double lines, like account paper ---------- */
.ledger-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  position: relative;
  margin: 0;
}
.ledger-rule::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 3px;
  border-top: 1px solid var(--rule);
}

/* ---------- eyebrows: mono, like account codes ---------- */
.eyebrow {
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  display: block;
  margin-bottom: 1rem;
}

/* ---------- header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
header.scrolled {
  background: rgba(251, 250, 247, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px -22px rgba(22, 36, 58, 0.4);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header.scrolled { background: rgba(251, 250, 247, 0.96); }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  max-width: var(--max);
  margin: 0 auto;
}
.brand {
  font-family: "Newsreader", serif;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.brand small {
  display: block;
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 2px;
}
nav.site { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
nav.site a {
  position: relative;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate);
  padding: 4px 0;
  transition: color 0.2s ease;
}
nav.site a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
nav.site a:hover { color: var(--ink); }
nav.site a:hover::after,
nav.site a[aria-current="page"]::after { transform: scaleX(1); }
nav.site a[aria-current="page"] { color: var(--ink); }
nav.site a.dental {
  color: var(--brass);
  font-weight: 600;
}
nav.site a.dental:hover { color: var(--brass-bright); }

/* hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
header.nav-open .nav-toggle span:first-child { transform: translateY(4.5px) rotate(45deg); }
header.nav-open .nav-toggle span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- hero: fills the viewport below the header ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-content: center;
  padding: 48px 0 108px;
}

/* full-bleed photograph behind the hero, under an ink wash that keeps text readable */
.hero {
  background-image:
    linear-gradient(102deg, rgba(15, 26, 44, 0.94) 0%, rgba(15, 26, 44, 0.82) 48%, rgba(15, 26, 44, 0.45) 100%),
    url("/photo-hero.jpg");
  background-size: cover;
  background-position: center;
  color: var(--paper);
}
.hero h1 { color: #fff; }
.hero h1 em { color: var(--brass-bright); }
.hero .eyebrow { color: var(--brass-bright); }
.hero .btn-ink { background: var(--paper); color: var(--ink); }
.hero .btn-ink:hover { background: #fff; }
.hero .btn-ghost { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.hero .btn-ghost:hover { border-color: var(--brass-bright); color: var(--brass-bright); }
.hero .scroll-cue { color: #93a0b5; }

/* account-paper ruling behind interior page heroes */
.page-hero {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 35px,
    rgba(70, 82, 100, 0.07) 35px,
    rgba(70, 82, 100, 0.07) 36px
  );
}
.hero .eyebrow::after {
  content: "";
  display: block;
  width: 72px;
  border-top: 1px solid var(--brass);
  opacity: 0.55;
  margin-top: 10px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (min-width: 1200px) {
  .hero-grid { grid-template-columns: 1.5fr 1fr; gap: 96px; }
}

/* scroll cue: a brass thread dropping from a mono label */
.scroll-cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--slate);
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--brass), transparent);
  animation: cue-drop 2.4s ease-in-out infinite;
}
@keyframes cue-drop {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@media (max-height: 600px) { .scroll-cue { display: none; } }

/* staggered fade-up on load */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.hero .eyebrow, .hero h1, .hero .lede, .hero .hero-actions, .hero .plaque, .hero .scroll-cue,
.page-hero .eyebrow, .page-hero h1, .page-hero .lede {
  animation: rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.hero h1, .page-hero h1 { animation-delay: 0.09s; }
.hero .lede, .page-hero .lede { animation-delay: 0.18s; }
.hero .hero-actions { animation-delay: 0.27s; }
.hero .plaque { animation-delay: 0.4s; }
.hero .scroll-cue { animation-delay: 0.8s; }
h1 {
  font-family: "Newsreader", serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 5.4vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}
h1 em {
  font-style: italic;
  color: var(--brass);
}
.hero p.lede {
  margin-top: 1.5rem;
  font-size: 1.25rem;
  color: #eef1f6;
  text-shadow: 0 1px 14px rgba(15, 26, 44, 0.6);
  max-width: 34em;
}
.hero-actions { margin-top: 2.2rem; display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- the brass plaque ---------- */
.plaque {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #c9ad7d 0%, #a8895a 42%, #8f7148 100%);
  border-radius: 6px;
  padding: 6px;
  box-shadow: 0 18px 40px -18px rgba(22, 36, 58, 0.45);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}
.plaque:hover {
  transform: perspective(900px) rotateX(2deg) rotateY(-3deg);
  box-shadow: 0 28px 52px -20px rgba(22, 36, 58, 0.55);
}
.plaque::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.35) 50%, transparent 58%);
  transform: translateX(-80%);
  transition: transform 0.9s ease;
  pointer-events: none;
}
.plaque:hover::before { transform: translateX(80%); }
.plaque-inner {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  padding: 40px 32px;
  text-align: center;
  color: #2e2410;
}
.plaque-inner .plq-firm {
  font-family: "Newsreader", serif;
  font-size: 1.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.plaque-inner .plq-line {
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-top: 14px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.plaque-inner hr {
  border: 0;
  border-top: 1px solid rgba(46, 36, 16, 0.35);
  width: 56px;
  margin: 18px auto 4px;
}

/* ---------- framed photography: mounted prints, not hero wallpaper ---------- */
.photo-frame {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  padding: 10px;
  box-shadow: 0 22px 44px -26px rgba(22, 36, 58, 0.4);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.85);
}
.photo-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 52px -28px rgba(22, 36, 58, 0.5);
}
.two-col .photo-frame {
  margin-top: 2.2rem;
  max-width: 420px;
}
.dental-panel .photo-frame {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}
.panel-cta .photo-frame {
  max-width: 300px;
  margin: 0 0 26px auto;
}

/* founder letter beside its photograph */
.letter-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}
.letter-grid .photo-frame {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  max-width: 380px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: 3px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
              transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(22, 36, 58, 0.4);
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-deep); }
.btn-ghost {
  border: 1px solid var(--rule);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn-brass { background: var(--brass); color: #fff; }
.btn-brass:hover { background: var(--brass-bright); }

/* ---------- sections ---------- */
section.band { padding: 76px 0; }

/* scroll reveal — .reveal is only added by site.js, so no-JS visitors see everything */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}
h2 {
  font-family: "Newsreader", serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 1.2rem;
}
.band p { color: var(--slate); max-width: 44em; }
.band p + p { margin-top: 1em; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
/* right column starts level with the h2, not the eyebrow above it */
.two-col > div:last-child { padding-top: 2.1rem; }

/* text + photograph variant: photo fills the right column, centred */
.media-col { align-items: center; }
.two-col.media-col > .photo-frame {
  padding-top: 10px;
  margin: 0;
  max-width: 480px;
  justify-self: end;
}
.media-col > .photo-frame img { max-height: 420px; object-fit: cover; }

/* ---------- credibility strip ---------- */
.cred-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.cred-strip > div {
  text-align: left;
  transition: transform 0.25s ease;
}
.cred-strip > div:hover { transform: translateX(4px); }
.cred-strip > div:hover .cred-label { color: var(--brass-bright); }
.cred-strip .cred-label {
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  transition: color 0.25s ease;
}
.cred-strip .cred-value {
  font-family: "Newsreader", serif;
  font-size: 1.25rem;
  margin-top: 6px;
}

/* ---------- pull statement ---------- */
.statement {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
  max-width: 24em;
  margin: 4.5rem auto 0;
}
.statement-after {
  text-align: center;
  color: var(--slate);
  max-width: 34em;
  margin: 1.5rem auto 0;
}

/* ---------- dental funnel panel ---------- */
.dental-panel {
  background: var(--ink);
  color: var(--paper);
  padding: 72px 0;
}
.dental-panel .eyebrow { color: var(--brass-bright); }
.dental-panel h2 { color: #fff; }
.dental-panel p { color: #b8c0cf; max-width: 40em; }
.dental-panel .panel-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: center;
}
.dental-panel .panel-cta { text-align: right; }
.dental-panel .panel-note {
  margin-top: 16px;
  font-size: 0.9rem;
}
.dental-panel .panel-note a { color: #b8c0cf; }
.dental-panel .panel-note a:hover { color: #fff; }

/* ---------- founder letter ---------- */
.letter {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brass);
  border-radius: 4px;
  padding: 56px 64px;
  max-width: 46em;
  font-family: "Newsreader", serif;
  font-size: 1.15rem;
  line-height: 1.7;
}
.letter p + p { margin-top: 1.2em; }
.letter-sign { margin-top: 2.8rem; }
.letter-name {
  font-style: italic;
  font-size: 1.35rem;
}
.letter-role {
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 6px;
}

/* ---------- page hero (interior pages) ---------- */
.page-hero { padding: 72px 0 56px; }
.page-hero p.lede {
  margin-top: 1.2rem;
  font-size: 1.15rem;
  color: var(--slate);
  max-width: 38em;
}

/* ---------- legal pages ---------- */
.legal { max-width: 46em; }
.legal h2 {
  font-size: 1.4rem;
  margin: 2.6rem 0 0.8rem;
}
.legal h2:first-child { margin-top: 0; }
.legal p { color: var(--slate); }
.legal p + p { margin-top: 1em; }
.legal a { color: var(--brass); }
.legal .legal-date { margin-top: 2rem; font-size: 0.9rem; }

/* ---------- regulation block ---------- */
.cred-block {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--brass);
  border-radius: 4px;
  padding: 32px;
}
.cred-block h2 {
  font-family: "Newsreader", serif;
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.65;
  margin-bottom: 0.6rem;
}
.cred-block p { color: var(--slate); }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 2.5rem;
}
.contact-item { padding: 24px 0; border-top: 1px solid var(--rule); }
.contact-item .c-label {
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}
.contact-item .c-value {
  font-family: "Newsreader", serif;
  font-size: 1.35rem;
  margin-top: 6px;
}
.contact-item .c-value a { text-decoration: none; }
.contact-item .c-value a:hover { color: var(--brass); }

/* ---------- footer: the ledger ---------- */
footer {
  background: var(--ink-deep);
  color: #93a0b5;
  padding: 56px 0 40px;
  font-size: 0.85rem;
}
footer .foot-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1fr 1.1fr;
  gap: 40px;
}
footer .foot-brand {
  font-family: "Newsreader", serif;
  font-size: 1.3rem;
  color: var(--paper);
}
footer .foot-head {
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin-bottom: 12px;
}
footer a { color: #b8c0cf; text-decoration: none; }
footer a:hover { color: #fff; }
footer ul { list-style: none; }
footer li { margin-bottom: 8px; }
footer .ledger-lines {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 2;
  color: #6b7890;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 40px 0 96px; }
  .hero-grid, .two-col, .contact-grid, .dental-panel .panel-grid, .letter-grid { grid-template-columns: 1fr; gap: 40px; }
  .two-col > div:last-child { padding-top: 0; }
  .two-col.media-col > .photo-frame { padding-top: 10px; justify-self: start; }
  .dental-panel .panel-cta { text-align: left; }
  .panel-cta .photo-frame { margin: 0 0 26px; }
  .letter-grid .photo-frame { position: static; order: -1; }
  .cred-strip { grid-template-columns: 1fr; gap: 24px; }
  footer .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .letter { padding: 40px 32px; }
  .plaque { max-width: 420px; }

  /* header: brand + hamburger on one row; menu is an overlay panel
     animated as a single unit — nothing animates inside it, so WebKit
     can't misplace items mid-animation */
  .header-inner { gap: 0; padding: 16px 18px; }
  .nav-toggle { display: flex; }
  nav.site {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 2px 18px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 24px 32px -24px rgba(22, 36, 58, 0.3);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  }
  header.nav-open nav.site {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  nav.site a {
    font-size: 1rem;
    padding: 13px 0;
    border-top: 1px solid var(--rule);
  }
  nav.site a::after { display: none; }
  nav.site a:first-child { border-top: none; }
  nav.site a[aria-current="page"] { color: var(--brass); font-weight: 600; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 18px; }
  h1 { font-size: clamp(1.9rem, 8.5vw, 2.5rem); }
  h2 { font-size: clamp(1.55rem, 6vw, 1.9rem); }
  .hero { padding: 32px 0 88px; }
  .hero p.lede, .page-hero p.lede { font-size: 1.05rem; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }
  .page-hero { padding: 44px 0 36px; }
  section.band, .dental-panel { padding: 52px 0; }
  .svc-list li { padding: 22px 0; }
  .plaque-inner { padding: 30px 18px; }
  .plq-firm { font-size: 1.35rem; letter-spacing: 0.12em; }
  .plq-line { font-size: 0.6rem; letter-spacing: 0.16em; }
  .letter { padding: 32px 22px; font-size: 1.05rem; }
  .contact-item .c-value { font-size: 1.15rem; overflow-wrap: anywhere; }
  .btn { padding: 13px 20px; }
  footer .ledger-lines { font-size: 0.62rem; letter-spacing: 0.02em; }
}
