/* Yacht Electrics — site.css
   Design tokens follow the approved Type 2 canvas: graphite ground, Archivo wide grotesk, DM Mono labels. */

:root {
  --bg: #101214;
  --bg-2: #14171b;
  --tile: #1a1d21;
  --fg: #e8e6e1;
  --mid: #b4b9be;
  --mute: #8a9096;
  --rule: #2c3034;
  --rule-2: #3a4046;
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
img, video { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* ---------- type ---------- */
.display {
  font-stretch: 125%;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.96;
  margin: 0;
}
.display--hero { font-size: clamp(36px, 6.4vw, 92px); }
.display--page { font-size: clamp(34px, 6vw, 88px); }
.display--section { font-size: clamp(32px, 3.9vw, 56px); line-height: 1; }
.display--contact { font-size: clamp(34px, 5vw, 72px); }
.display--tile { font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -0.02em; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.mono--fg { color: var(--fg); }

.lede { font-size: clamp(17px, 1.5vw, 22px); line-height: 1.5; color: var(--mid); max-width: 880px; margin: 0; }
.statement {
  font-weight: 500;
  font-size: clamp(22px, 3.2vw, 46px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  max-width: 1180px;
  margin: 0;
}
.statement--small { font-size: clamp(22px, 2.8vw, 40px); line-height: 1.25; }
.wordmark { display: inline-flex; align-items: center; }
.wordmark img { display: block; height: 16px; width: auto; }
.site-footer .wordmark img { height: 13px; }
:root { --flash: #F2C230; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-top: clamp(56px, 7vw, 112px); }
.section--flush { padding-top: 0; }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding-bottom: 24px; border-bottom: 1px solid var(--fg); margin-bottom: 40px;
}

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px 0 20px; border-bottom: 1px solid var(--rule);
}
.site-header__brand { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.site-header__right { display: flex; align-items: center; gap: clamp(16px, 3vw, 48px); }
.site-header__loc { display: none; }
@media (min-width: 900px) { .site-header__loc { display: inline; } }
.site-header__contact { display: none; }
@media (min-width: 600px) { .site-header__contact { display: inline; } }
.menu-btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px;
  background: transparent; color: var(--bg); border: 0;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
/* Light plate at 60% opacity behind the label and flash. */
.menu-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(232, 230, 225, 0.6);
  transition: background .2s ease;
}
.menu-btn:hover::before, .menu-btn:focus-visible::before { background: rgba(232, 230, 225, 0.75); }
.menu-btn svg { display: block; }
.menu-btn__flash { color: var(--bg); transition: color .2s ease; }
.menu-btn:hover .menu-btn__flash, .menu-btn:focus-visible .menu-btn__flash { color: var(--flash); }
@media (max-width: 599px) {
  .site-header__brand .mono { display: none; }
  .menu-btn { padding: 0; width: 44px; justify-content: center; }
  .menu-btn span { display: none; }
}

/* ---------- hero (home) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0; z-index: 0;
}
.hero__media img, .hero__media video {
  width: 100%; height: 100%; object-fit: cover;
}
.hero__media img, .hero__media video { object-position: 50% 50%; }
.hero__media img { transform: scale(1.12); will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  /* Fallback when the video isn't playing (reduced motion, data saver, Low Power Mode, or a load error):
     a slow sideways pan that reverses and repeats. */
  .hero__media img.is-still { animation: slowpan 22s linear infinite alternate; }
  @keyframes slowpan { from { transform: scale(1.12) translateX(-3%); } to { transform: scale(1.12) translateX(3%); } }
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(16,18,20,.92) 0%, rgba(16,18,20,.35) 45%, rgba(16,18,20,.15) 100%);
}
.hero__inner {
  position: relative; z-index: 1;
  flex: 1 1 auto; display: flex; flex-direction: column;
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 48px;
}
.hero__inner .site-header { border-bottom: 0; }
.hero__bottom {
  margin-top: auto; padding-top: 48px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 24px; align-items: end;
}
.hero__text { grid-column: span 12; display: flex; flex-direction: column; gap: 20px; }
.hero__aside { grid-column: span 12; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.hero__aside p { margin: 0; max-width: 34ch; font-family: var(--font-mono); font-size: 13px; line-height: 1.75; letter-spacing: 0.06em; text-transform: uppercase; }
@media (min-width: 900px) {
  .hero__text { grid-column: span 9; }
  .hero__aside { grid-column: span 3; padding-bottom: 8px; }
}
.hero__tags { display: flex; flex-wrap: wrap; gap: 12px 32px; }

/* Over the video, the secondary text sits halfway between the normal greys and the headline white. */
.hero .mono, .hero .site-header__loc { color: #B9BBBB; }
.hero__aside p { color: #CECFCF; }

/* Soft dark plate behind the headline block: a blurred rectangle, so it fades out at the edges. */
.hero__bottom { position: relative; }
.hero__bottom::before {
  content: ""; position: absolute; z-index: -1;
  inset: -40px -56px -56px;
  background: rgba(16,18,20,.55);
  filter: blur(36px);
  border-radius: 48px;
  pointer-events: none;
}
.hero__inner .site-header { position: relative; }
.hero__inner .site-header::before {
  content: ""; position: absolute; z-index: -1;
  inset: -40px -56px -24px;
  background: rgba(16,18,20,.45);
  filter: blur(36px);
  pointer-events: none;
}

/* ---------- page hero (sub-pages) ---------- */
.page-hero { padding-top: clamp(48px, 6vw, 88px); display: flex; flex-direction: column; gap: 28px; }
.page-hero__media { margin-top: 24px; aspect-ratio: 16 / 7; background: var(--tile); overflow: hidden; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .page-hero__media { aspect-ratio: 4 / 3; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--fg); color: var(--fg); background: transparent;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { background: #fff; color: var(--bg); }
.btn--block { width: 100%; }

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px;
  padding-top: 28px; border-top: 1px solid var(--rule); margin-top: 56px;
}
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat__n { font-stretch: 125%; font-weight: 700; letter-spacing: -0.02em; font-size: clamp(26px, 2.8vw, 40px); line-height: 1; white-space: nowrap; }

/* ---------- pillar tiles ---------- */
.pillars { display: grid; grid-template-columns: 1fr; gap: 40px 24px; }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pillar { display: flex; flex-direction: column; gap: 20px; color: var(--fg); }
.pillar__media { aspect-ratio: 4 / 5; background: var(--tile); overflow: hidden; }
.pillar__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pillar:hover .pillar__media img { transform: scale(1.03); }
.pillar__title { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; border-top: 1px solid var(--rule); }
.pillar p { margin: 0; font-size: 15px; color: var(--mid); }

/* ---------- index rows ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 8px;
  padding: 24px 0; border-bottom: 1px solid var(--rule); align-items: baseline;
}
.row__n { grid-column: span 12; }
.row__t { grid-column: span 12; font-weight: 500; font-size: 20px; }
.row__d { grid-column: span 12; color: var(--mid); font-size: 15px; }
.row__r { grid-column: span 12; color: var(--mid); font-size: 15px; }
.row__inc { grid-column: span 12; margin: 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--mid); }
.row__inc li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) {
  .row--svc .row__n { grid-column: span 1; }
  .row--svc .row__t { grid-column: span 4; font-size: 22px; }
  .row--svc .row__d { grid-column: span 7; font-size: 16px; }
  .row--svc4 .row__n { grid-column: span 1; }
  .row--svc4 .row__t { grid-column: span 3; font-stretch: 125%; font-weight: 600; font-size: 26px; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.1; }
  .row--svc4 .row__d { grid-column: span 4; font-size: 16px; }
  .row--svc4 .row__inc { grid-column: span 4; }
  .row--exp .row__n { grid-column: span 2; }
  .row--exp .row__t { grid-column: span 3; }
  .row--exp .row__r { grid-column: span 2; }
  .row--exp .row__d { grid-column: span 5; }
  .row--edu .row__n { grid-column: span 3; }
  .row--edu .row__t { grid-column: span 6; }
  .row--edu .row__r { grid-column: span 3; }
}

/* ---------- stages ---------- */
.stages { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 760px) { .stages { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); } }
.stage { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; border-top: 1px solid var(--fg); }
.stage__t { font-stretch: 125%; font-weight: 600; font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; text-transform: uppercase; }
@media (min-width: 760px) { .stage__t { min-height: 2.3em; } }
.stage p { margin: 0; font-size: 15px; color: var(--mid); }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.chip { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; padding: 10px 14px; border: 1px solid var(--rule-2); color: var(--mid); }

/* ---------- strip (yards / standards) ---------- */
.strip {
  display: flex; align-items: center; gap: 24px 48px; flex-wrap: wrap;
  margin-top: clamp(48px, 5vw, 72px); padding: 28px 0;
  border-top: 1px solid var(--fg); border-bottom: 1px solid var(--rule);
}
.strip__items { display: flex; flex: 1 1 auto; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px;
  font-stretch: 125%; font-weight: 600; font-size: clamp(16px, 1.6vw, 22px); letter-spacing: -0.01em; text-transform: uppercase; }

/* ---------- feature (two column) ---------- */
.feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 32px; align-items: start; }
.feature__text { grid-column: span 12; display: flex; flex-direction: column; gap: 24px; }
.feature__media { grid-column: span 12; background: var(--tile); overflow: hidden; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.feature__text p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--mid); }
@media (min-width: 900px) {
  .feature__text { grid-column: span 7; }
  .feature__media { grid-column: 9 / span 4; }
}

/* ---------- contact ---------- */
.contact { margin-top: clamp(64px, 7vw, 96px); padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(48px, 6vw, 88px); border-top: 1px solid var(--fg); }
.contact__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; align-items: start; }
.contact__text { grid-column: span 12; display: flex; flex-direction: column; gap: 28px; }
.contact__text p { margin: 0; color: var(--mid); max-width: 520px; }
.contact__form { grid-column: span 12; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 900px) {
  .contact__text { grid-column: span 6; }
  .contact__form { grid-column: 8 / span 5; padding-top: 36px; }
}
.details { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.details a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px;
  border-bottom: 1px solid var(--rule); font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em;
}
.details a span:first-child { color: var(--mute); text-transform: uppercase; }
.where { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 8px; }
.where div { display: flex; flex-direction: column; gap: 8px; }
.where span:last-child { font-size: 15px; color: var(--mid); }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--rule-2); color: var(--fg);
  font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 0;
}
.field input, .field select { height: 48px; padding: 0 14px; }
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--fg); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--mute); }
.form-status { display: none; padding: 14px 16px; border: 1px solid var(--rule-2); color: var(--fg); font-size: 15px; }
.form-status.is-shown { display: block; }
.form-status.is-error { border-color: #c96b5a; }

/* ---------- cta band (sub-pages) ---------- */
.cta { margin-top: clamp(64px, 7vw, 96px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--fg);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px 64px; flex-wrap: wrap; }
.cta__text { display: flex; flex-direction: column; gap: 20px; max-width: 900px; }

/* ---------- footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap;
  padding-top: clamp(48px, 6vw, 96px); padding-bottom: 40px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--mute);
}
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer nav a { color: var(--mid); }

/* ---------- menu overlay ---------- */
.menu { position: fixed; inset: 0; z-index: 50; background: var(--bg-2); display: none; overflow: auto; }
.menu[data-open="true"] { display: block; }
.menu__inner { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 48px; }
.menu__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; align-items: end; padding-top: 40px; }
.menu__nav { grid-column: span 12; display: flex; flex-direction: column; }
.menu__nav a { display: flex; align-items: baseline; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.menu__nav a .mono { width: 40px; flex: none; }
.menu__nav a .display { font-size: clamp(30px, 4.5vw, 64px); line-height: 1; }
.menu__side { grid-column: span 12; display: flex; flex-direction: column; gap: 16px; }
.menu__side .details { border-top: 0; }
@media (min-width: 900px) {
  .menu__nav { grid-column: span 7; }
  .menu__side { grid-column: 9 / span 4; }
}
/* Picture box takes the shape of the image showing (height set by the script) and cross-dissolves. */
.menu__pic { position: relative; width: 100%; height: 0; max-height: 60vh; background: var(--tile); overflow: hidden; display: none;
  transition: height .5s var(--ease); }
.menu__layer { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.menu__layer.is-active { opacity: 1; }
.menu__layer img, .menu__layer video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 900px) { .menu__pic { display: block; } }
@media (prefers-reduced-motion: reduce) { .menu__pic, .menu__layer { transition: none; } }
.close-btn {
  display: inline-flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px;
  background: transparent; border: 1px solid var(--fg); color: var(--fg);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
body.menu-open { overflow: hidden; }

/* ---------- section fades (home page) ----------
   Sections below the hero dissolve in as they scroll into view and out again as they leave,
   quickly enough that nothing is missed. Reduced motion: always visible. */
.fade { opacity: 0; transform: translateY(10px); transition: opacity 1s ease-out, transform 1s ease-out; }
.fade.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade { opacity: 1; transform: none; transition: none; } }

/* ---------- misc ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.two-col { display: grid; grid-template-columns: 1fr; gap: 56px 24px; }
@media (min-width: 900px) { .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.two-col > div { display: flex; flex-direction: column; gap: 32px; }
.frameworks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (min-width: 900px) { .frameworks { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.frameworks div { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--fg); }
.frameworks strong { font-stretch: 125%; font-weight: 600; font-size: 20px; letter-spacing: -0.01em; text-transform: uppercase; }
.frameworks p { margin: 0; font-size: 14px; color: var(--mid); }
.exp-hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; align-items: start; padding-top: clamp(48px, 6vw, 88px); }
.exp-hero__text { grid-column: span 12; display: flex; flex-direction: column; gap: 28px; }
.exp-hero__text p { margin: 0; font-size: 18px; line-height: 1.65; color: var(--mid); }
.exp-hero__media { grid-column: span 12; aspect-ratio: 4 / 5; background: var(--tile); overflow: hidden; }
.exp-hero__media img, .exp-hero__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.exp-hero__media--video { aspect-ratio: 1 / 1; }
@media (min-width: 900px) { .exp-hero__text { grid-column: span 7; } .exp-hero__media { grid-column: 9 / span 4; } }
