/* ==========================================================================
   Widdy Group — site styles
   Brand tokens live in :root. Change colours / type here, not in components.
   ========================================================================== */

:root {
  /* Colour */
  --navy: #081522;          /* primary midnight navy — dominant */
  --navy-2: #101e2d;        /* secondary navy — alternate surfaces */
  --navy-3: #16273a;        /* hover surface (derived) */
  --white: #f7f8fa;         /* warm white — type on dark */
  --orange: #f29a38;        /* signature accent — use sparingly */
  --orange-ink: #a85a0c;    /* orange for small text on light (AA contrast) */
  --slate: #8f9eae;         /* secondary copy */
  --rule: #344453;          /* hairlines, card outlines */
  --rule-light: #d9dee4;    /* hairlines on light surfaces */

  /* Type */
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fs-eyebrow: 0.75rem;
  --fs-small: 0.875rem;
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --fs-h2: clamp(2rem, 1.55rem + 2.2vw, 3.25rem);
  --fs-hero: clamp(2.6rem, 1.5rem + 4.6vw, 5.25rem);

  /* Space */
  --gutter: clamp(1.25rem, 4.5vw, 4rem);
  --max: 78rem;
  --section: clamp(5rem, 3.5rem + 8vw, 10rem);
  --header-h: 4.75rem;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.7;
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

::selection { background: var(--orange); color: var(--navy); }

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--orange);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.nowrap { white-space: nowrap; }

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

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

/* ---------- Shared type pieces ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.75rem;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
}
.eyebrow .num { color: var(--orange); font-variant-numeric: tabular-nums; }
.eyebrow .bar { width: 2.25rem; height: 1px; background: var(--rule); }

.positioning {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.8em;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate);
}
.positioning .sep { color: var(--orange); }
@media (max-width: 26rem) { .positioning { letter-spacing: 0.14em; gap: 0 0.55em; } }

.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--white); }
.muted { color: var(--slate); }
.accent { color: var(--orange); }

.section h2 { font-size: var(--fs-h2); max-width: 18ch; }
.section h2 .line { display: block; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0 1.6rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font: 700 0.9375rem/1 var(--font);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary { background: var(--orange); color: var(--navy); }
.btn-primary:hover { background: #f6ad5c; }

.btn-ghost { border-color: var(--rule); color: var(--white); }
.btn-ghost:hover { border-color: var(--slate); background: var(--navy-2); }

.text-link {
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.25s var(--ease), color 0.25s var(--ease);
}
.text-link:hover { text-decoration-color: var(--orange); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-open,
.site-header--solid {
  background: rgba(8, 21, 34, 0.94);
  border-bottom-color: var(--rule);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header.is-scrolled { background: rgba(8, 21, 34, 0.86); backdrop-filter: saturate(1.2) blur(10px); }
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand-link { display: block; flex-shrink: 0; }
.brand-logo { display: block; width: auto; height: 2.15rem; aspect-ratio: 6.36; }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.6vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list a {
  position: relative;
  display: block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--slate);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.1rem;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-list a:hover,
.nav-list a[aria-current] { color: var(--white); }
.nav-list a[aria-current]::after { transform: scaleX(1); }
.nav-list .nav-cta a[aria-current] { border-color: var(--orange); }
.nav-list .nav-cta a {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--white);
}
.nav-list .nav-cta a::after { display: none; }
.nav-list .nav-cta a:hover { border-color: var(--orange); }

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.6rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 1.4rem;
  height: 1.5px;
  margin: 0.32rem auto;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(0.41rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-0.41rem) rotate(-45deg); }

@media (max-width: 52rem) {
  .brand-logo { height: 1.85rem; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    padding: 2.5rem var(--gutter);
    background: var(--navy);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transition: opacity 0.3s var(--ease); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list li { border-bottom: 1px solid var(--rule); }
  .nav-list a { padding: 1.15rem 0; font-size: 1.5rem; font-weight: 600; color: var(--white); letter-spacing: -0.01em; }
  .nav-list a::after { display: none; }
  .nav-list .nav-cta { border: 0; margin-top: 2rem; }
  .nav-list .nav-cta a { display: inline-block; padding: 0.9rem 1.5rem; font-size: 1rem; border-color: var(--orange); }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: min(100svh, 64rem);
  padding-top: calc(var(--header-h) + clamp(2.5rem, 7vh, 5rem));
  overflow: hidden;
  isolation: isolate;
}

/* Brand device: the Facade W, oversized and cropped, as a background texture */
.hero-w {
  position: absolute;
  z-index: -1;
  top: -6%;
  right: -16%;
  height: 112%;
  width: auto;
  aspect-ratio: 1.5;
  color: #1c2c3e;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
  pointer-events: none;
}
.interests { position: relative; overflow: hidden; isolation: isolate; }
.section-w {
  position: absolute;
  z-index: -1;
  top: -4rem;
  right: -10rem;
  height: 34rem;
  width: auto;
  aspect-ratio: 1.5;
  color: #15253a;
  pointer-events: none;
}

.hero-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.hero .positioning-block { margin-bottom: clamp(2rem, 5vh, 3.25rem); }
.hero .positioning-block .name {
  display: block;
  margin-bottom: 0.6rem;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--white);
}

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.hero h1 .line { display: block; }

.hero .intro {
  max-width: 36rem;
  margin: clamp(1.75rem, 4vh, 2.5rem) 0 0;
  color: var(--slate);
  font-size: var(--fs-lead);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  margin-top: clamp(2rem, 5vh, 3rem);
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(3rem, 7vh, 4.5rem);
  border-top: 1px solid var(--rule);
}
.hero-strip div {
  padding: 1.4rem 1.5rem 1.75rem 0;
}
.hero-strip div + div { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.hero-strip dt {
  margin-bottom: 0.4rem;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero-strip dd { margin: 0; color: var(--slate); font-size: var(--fs-small); line-height: 1.6; max-width: 26ch; }

@media (max-width: 52rem) {
  .hero-w { top: 6%; height: 64%; right: -42%; opacity: 0.85; }
  .section-w { height: 20rem; right: -9rem; }
  .hero-strip { grid-template-columns: 1fr; }
  .hero-strip div,
  .hero-strip div + div { padding: 1.1rem 0; border-left: 0; }
  .hero-strip div + div { border-top: 1px solid var(--rule); }
  .hero-strip dd { max-width: none; }
}
@media (max-width: 36rem) {
  .hero h1 { font-size: clamp(2.3rem, 9.6vw, 2.75rem); }
  .hero h1 .line { display: inline; }
}

/* Drawing entrance: a slow left-to-right wipe, then the accent (motion-ok only; see site.js) */
.motion-ok .hero-w { animation: rise 2.2s var(--ease) 0.1s both; }
@keyframes rise { from { opacity: 0; transform: translateX(3%); } to { opacity: 1; transform: none; } }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--rule); }
.section--alt { background: var(--navy-2); }


/* Two-column editorial grid */
.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 3vw, 3rem);
  row-gap: 2.5rem;
}
.split > .col-head { grid-column: 1 / span 5; }
.split > .col-body { grid-column: 7 / span 6; }
@media (max-width: 60rem) {
  .split > .col-head,
  .split > .col-body { grid-column: 1 / -1; }
}

/* ---------- About ---------- */
.about .col-body .lead { margin-bottom: 1.5em; }
.about .col-body p:not(.lead) { color: var(--slate); }

.profile {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(4rem, 8vw, 6rem) 0 0;
  border-top: 1px solid var(--rule);
}
.profile div { padding: 1.4rem 1.25rem 0 0; }
.profile div + div { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.profile dt {
  margin-bottom: 0.5rem;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
}
.profile dd { margin: 0; font-weight: 600; line-height: 1.45; }
@media (max-width: 52rem) {
  .profile { grid-template-columns: 1fr 1fr; }
  .profile div:nth-child(3) { padding-left: 0; border-left: 0; }
  .profile div:nth-child(n + 3) { margin-top: 1.4rem; border-top: 1px solid var(--rule); }
}

/* ---------- Interests ---------- */
.interests .section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 3vw, 3rem);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.interests .section-head > div { grid-column: 1 / span 6; }
.interests .section-head > p { grid-column: 8 / span 5; margin: 0; color: var(--slate); }
@media (max-width: 60rem) {
  .interests .section-head > div,
  .interests .section-head > p { grid-column: 1 / -1; }
  .interests .section-head > p { margin-top: 1.75rem; }
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.interest {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 4vw, 3.25rem);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.4s var(--ease);
}
.interest::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 3rem; height: 2px;
  background: var(--orange);
  transform: scaleX(0.33);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.interest:hover { background: var(--navy-3); }
.interest:hover::before { transform: scaleX(1); }

.interest .index {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.interest .index svg { width: 2.75rem; height: 2.75rem; color: var(--slate); opacity: 0.8; }
.section .interest h3 { font-size: var(--fs-h3); max-width: none; letter-spacing: -0.015em; }
.interest .strap { margin: 0.6rem 0 1.5rem; color: var(--white); font-weight: 500; }
.interest .body { color: var(--slate); font-size: 0.975rem; }
.interest .body p { margin-bottom: 0.9em; }

@media (max-width: 52rem) {
  .interest-grid { grid-template-columns: 1fr; }
  .interest .index { margin-bottom: 2rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: clamp(3.5rem, 7vw, 5rem) 0 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: var(--fs-small);
  color: var(--slate);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.footer-logo { display: block; height: 3.6rem; width: auto; aspect-ratio: 3.38; margin-bottom: 1.25rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--white); text-decoration: none; }
.footer-links a:hover { color: var(--orange); }
.footer-legal {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1.5rem 3rem;
  padding-top: 2rem;
  font-size: 0.8125rem;
  line-height: 1.65;
}
.footer-legal .copyright { text-align: right; }
@media (max-width: 52rem) {
  .footer-legal { grid-template-columns: 1fr; }
  .footer-legal .copyright { text-align: left; }
}

@media (max-width: 36rem) {
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem 1.5rem; width: 100%; }
}

/* ---------- Simple document pages (privacy, 404) ---------- */
.doc { padding: calc(var(--header-h) + clamp(3rem, 8vw, 6rem)) 0 var(--section); }
.doc .wrap > * { max-width: 44rem; }
.doc h1 { font-size: var(--fs-h2); margin-bottom: 1.5rem; }
.doc h2 { font-size: 1.25rem; margin: 2.75rem 0 0.9rem; letter-spacing: -0.01em; }
.doc p, .doc li { color: #c9d1da; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.5rem; }
.doc a { color: var(--white); }
.doc .updated { color: var(--slate); font-size: var(--fs-small); }

/* ---------- Reveal on scroll ---------- */
.motion-ok .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.motion-ok .reveal.is-in { opacity: 1; transform: none; }
.motion-ok .reveal.r2 { transition-delay: 0.1s; }
.motion-ok .reveal.r3 { transition-delay: 0.2s; }
.motion-ok .reveal.r4 { transition-delay: 0.3s; }

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

@media print {
  .site-header, .hero-w, .section-w, .nav-toggle { display: none; }
  body { background: #fff; color: #000; }
}
