/* Base styles, used by every page. Breakpoints at 480, 768 and 1024px. */

/* === Fonts (self-hosted, license in fonts/OFL.txt) === */
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-serif-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/noto-serif-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/noto-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/noto-sans-latin-700-normal.woff2") format("woff2");
}

/* === Variables === */
:root {
  --navy-950: #071228;
  --navy-900: #0b1a39;
  --navy-800: #142543;
  --navy-footer: #09182f;
  --gold: #d9b253;
  --gold-ink: #d9b253; /* gold text on light backgrounds, polish.css darkens it */
  --cream: #f7f7f5;
  --card: #f2f3f5;
  --card-border: #e3e5ea;
  --input-border: #d5d9e0;
  --ink: #0b1a39;
  --text: #3a4252;
  --label: #4a5263;
  --text-on-dark: #d3d9e4;
  --muted-on-dark: #aeb7c7;
  --white: #ffffff;
  --error: #b42318;

  --font-serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(1.25rem, 6vw, 4rem);
  --radius: 4px;
}

/* === Reset === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--navy-footer);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: var(--navy-950);
  text-decoration: none;
  background: var(--gold);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: calc(1rem + env(safe-area-inset-top));
}

/* === Layout === */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

@media (min-width: 768px) {
  /* extra indent for the "who we work with" band and the footer */
  .container--indent {
    padding-left: calc(max(var(--gutter), env(safe-area-inset-left)) + 2.5rem);
  }
}

/* === Buttons, eyebrow === */
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.9rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn--gold {
  color: var(--navy-950);
  background: var(--gold);
}

.btn--lg {
  width: 100%;
  padding: 1.1rem 1.25rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  cursor: progress;
  opacity: 0.85;
}

@media (min-width: 480px) {
  .btn--lg {
    width: auto;
    padding: 1.3rem 2.25rem;
  }
}

/* === Header === */
.site-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: clamp(1.25rem, 3.5vw, 2.25rem);
  padding-bottom: 0.75rem;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

/* polish.css shows this once the page is scrolled */
.site-header__cta {
  display: none;
}

/* === Hero === */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
  background: var(--navy-950);
}

/* Headline on the left, logo behind it on the right. Both trucks need to stay in frame. */
.hero__content {
  position: relative;
  padding-top: clamp(6rem, 12vw, 6.75rem);
  padding-bottom: clamp(3.5rem, 7vw, 3.75rem);
  text-shadow: 0 2px 12px rgba(7, 18, 40, 0.85);
}

.hero__content .btn,
.hero__line--gold {
  text-shadow: none;
}

/* text-shadow would show through the gradient text fill from polish.css,
   so the gold line uses a drop-shadow filter instead */
.hero__line--gold {
  filter: drop-shadow(0 2px 8px rgba(7, 18, 40, 0.9));
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--navy-950); /* what the logo blends against */
}

/* 20% opacity matches the mockup. The lighten blend makes the logo's near-black
   background disappear into the navy, so the square edge doesn't show. */
.hero__logo {
  position: absolute;
  top: 50%;
  right: 0;
  width: 64%;
  max-width: none;
  opacity: 0.2;
  transform: translateY(-50%);
  mix-blend-mode: lighten;
}

.pill {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  font-size: clamp(0.62rem, 0.55rem + 0.35vw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(7, 18, 40, 0.35);
  border: 1.5px solid var(--gold);
  border-radius: 999px;
}

.hero__title {
  margin-top: clamp(1.75rem, 4vw, 2.6rem);
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 1rem + 5.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
}

.hero__line {
  display: block;
}

.hero__line--gold {
  color: var(--gold);
}

.hero__content .eyebrow {
  margin-top: 1.5rem;
}

.hero__mission {
  max-width: 38rem;
  margin-top: 0.85rem;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  line-height: 1.4;
  color: var(--text-on-dark);
}

.hero__cta {
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .pill {
    min-width: 21.25rem;
    padding-inline: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .hero__logo {
    width: min(68%, 820px);
  }
}

/* landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .hero__content {
    padding-top: 5rem;
    padding-bottom: 2.5rem;
  }
}

/* === Know your numbers + form === */
.numbers {
  padding-top: clamp(3.5rem, 8vw, 4.5rem);
  padding-bottom: clamp(3.5rem, 9vw, 5.25rem);
  color: var(--text);
  background: var(--cream);
}

.numbers__grid {
  display: grid;
  gap: 2.5rem;
}

.numbers__title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ink);
}

.numbers__lead {
  max-width: 21rem;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  font-size: 0.95rem;
  line-height: 1.55;
}

.numbers__question {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}

.numbers__note {
  max-width: 26rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.numbers__note + .numbers__note {
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .numbers__grid {
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 2rem;
    align-items: start;
  }

  .numbers__copy {
    padding-top: 1rem;
  }

  /* smaller on tablets so "Before you book it," fits on one line */
  .numbers__title {
    font-size: 1.65rem;
  }
}

@media (min-width: 1024px) {
  .numbers__grid {
    grid-template-columns: minmax(0, 1fr) 23.25rem;
    gap: clamp(2rem, 5vw, 4rem);
  }

  .numbers__title {
    font-size: 2.1rem;
  }
}

.card {
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2.25rem) 1rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
}

.card__title {
  margin-bottom: clamp(2rem, 6vw, 3.25rem);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.field + .field {
  margin-top: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--label);
}

/* font-size has to stay at 16px or iOS Safari zooms in on focus */
.field input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  -webkit-appearance: none;
  appearance: none;
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
}

.field__error {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--error);
}

/* honeypot field, parked off-screen */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead-form .btn {
  margin-top: 1.3rem;
}

.form-status {
  margin-top: 0.9rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.88rem;
  color: #7a1a12;
  background: #fdecea;
  border-radius: var(--radius);
}

/* success dialog, opened with showModal() in form.js */
.form-success {
  width: 25rem;
  max-width: calc(100% - 2rem);
  max-height: calc(100% - 2rem);
  padding: 0;
  overflow-y: auto;
  text-align: center;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
}

.form-success::backdrop {
  background: rgba(7, 18, 40, 0.72);
}

/* No page scroll while the dialog is open. The gutter stops the layout shifting
   when the scrollbar goes. */
html:has(.form-success[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.form-success__body {
  padding: clamp(1.75rem, 6vw, 2.5rem) clamp(1.25rem, 5vw, 2.25rem);
}

.form-success__icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-success__icon circle {
  fill: var(--gold);
  stroke: none;
}

.form-success__icon path {
  stroke: var(--navy-950);
}

.form-success h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--ink);
}

.form-success p {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.form-success__close {
  min-width: 9rem;
  margin-top: 1.5rem;
}

/* short screens: tighten things up so the close button stays visible */
@media (max-height: 500px) {
  .form-success__body {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .form-success__icon {
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 0.6rem;
  }

  .form-success__close {
    margin-top: 1rem;
  }
}

/* === Who we work with === */
.work {
  padding-top: clamp(2.75rem, 6vw, 3.9rem);
  background: var(--navy-900);
}

.work__label {
  margin-bottom: 1rem;
}

.band {
  padding-top: 1.9rem;
  padding-bottom: 2.4rem;
  background: var(--navy-800);
}

.band__title,
.contact__title {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}

.band__types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0;
  margin-top: 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
}

.band__types li + li::before {
  content: "•";
  margin-inline: 0.75em;
}

.band__desc {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-on-dark);
}

/* === Contact / footer === */
.contact {
  padding-top: 2.1rem;
  padding-bottom: calc(4rem + env(safe-area-inset-bottom));
  color: var(--white);
  background: var(--navy-footer);
}

.contact__grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold);
}

.contact__value {
  margin-top: 0.35rem;
  font-size: 1rem;
}

/* bigger tap target, the negative margin cancels out the padding */
.contact__value a,
.contact__privacy a {
  display: inline-block;
  padding-block: 0.65rem;
  margin-block: -0.65rem;
  text-decoration: none;
}

.contact__area {
  margin-top: 1.75rem;
  font-size: 0.78rem;
  color: var(--text-on-dark);
}

.contact__privacy {
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: var(--muted-on-dark);
}

@media (min-width: 560px) {
  .contact__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* === Phones ===
   Below 768px the page is the client's mockup scaled to the screen width.
   The mockup is 562px wide, so --m is one mockup pixel and the numbers in
   this block are measurements taken off it. Font sizes go through max()
   so they can't get too small on narrow phones. */
@media (max-width: 767px) {
  :root {
    --m: calc(100vw / 562);
    --gutter: calc(34 * var(--m));
  }

  /* Header */
  .site-header__inner {
    padding-top: calc(22 * var(--m));
  }

  .wordmark {
    font-size: max(0.9rem, calc(15 * var(--m)));
  }

  /* Hero */
  .hero__content {
    padding-bottom: calc(34 * var(--m));
  }

  .pill {
    padding: max(0.3rem, calc(5 * var(--m))) max(0.7rem, calc(11 * var(--m)));
    font-size: max(0.56rem, calc(6.5 * var(--m)));
    border-width: 1px;
  }

  .hero__title {
    margin-top: calc(24 * var(--m));
    font-size: max(1.2rem, calc(29 * var(--m)));
  }

  .hero__content .eyebrow {
    margin-top: calc(16 * var(--m));
    font-size: max(0.6rem, calc(7 * var(--m)));
  }

  .hero__mission {
    max-width: calc(340 * var(--m));
    margin-top: calc(8 * var(--m));
    font-size: max(0.78rem, calc(10.5 * var(--m)));
  }

  .hero__cta.btn--lg {
    width: auto;
    min-height: max(2.25rem, calc(30 * var(--m)));
    margin-top: calc(26 * var(--m));
    padding: 0.5rem max(0.9rem, calc(19 * var(--m)));
    font-size: max(0.56rem, calc(6.5 * var(--m)));
  }

  /* logo position from the mockup: 406 wide, 143 from the left,
     top edge 54 above the pill so the R&J lines up with the headline */
  .hero__content {
    --hero-top: max(3.75rem, calc(61 * var(--m)));
    padding-top: var(--hero-top);
  }

  .hero__logo {
    top: calc(var(--hero-top) - 54 * var(--m));
    left: calc(143 * var(--m));
    right: auto;
    width: calc(406 * var(--m));
    transform: none;
  }

  /* Know your numbers (stays two columns on phones, same as the mockup) */
  .numbers {
    padding-top: calc(43 * var(--m));
    padding-bottom: calc(47 * var(--m));
  }

  .numbers__grid {
    grid-template-columns: minmax(0, 1fr) calc(208 * var(--m));
    gap: calc(36 * var(--m));
    align-items: start;
  }

  .numbers__copy {
    padding-top: calc(13 * var(--m));
  }

  .numbers__title {
    font-size: max(0.9rem, calc(19.5 * var(--m)));
  }

  .numbers__lead {
    margin-top: calc(20 * var(--m));
  }

  .numbers__lead,
  .numbers__note {
    font-size: max(0.7rem, calc(9 * var(--m)));
  }

  .numbers__question {
    margin-top: calc(24 * var(--m));
    font-size: max(0.72rem, calc(10 * var(--m)));
  }

  .numbers__note {
    margin-top: calc(18 * var(--m));
  }

  .numbers__note + .numbers__note {
    margin-top: calc(14 * var(--m));
  }

  .card {
    padding: calc(22 * var(--m)) calc(15 * var(--m));
    border-radius: calc(12 * var(--m));
  }

  .card__title {
    margin-bottom: calc(36 * var(--m));
    font-size: max(0.72rem, calc(12 * var(--m)));
  }

  .field + .field {
    margin-top: calc(13 * var(--m));
  }

  .field label {
    margin-bottom: calc(5 * var(--m));
    font-size: max(0.56rem, calc(6.5 * var(--m)));
  }

  /* input text stays 16px, see the iOS note further up */
  .field input {
    min-height: max(2.1rem, calc(24 * var(--m)));
    padding: 0.3rem 0.45rem;
  }

  .lead-form .btn {
    min-height: max(2.25rem, calc(26 * var(--m)));
    margin-top: calc(13 * var(--m));
    padding: 0.45rem 0.4rem;
    font-size: max(0.56rem, calc(6.5 * var(--m)));
  }

  /* Who we work with */
  .work {
    padding-top: calc(30 * var(--m));
  }

  .work__label {
    margin-bottom: calc(5 * var(--m));
  }

  .container--indent {
    padding-left: calc(max(var(--gutter), env(safe-area-inset-left)) + 22 * var(--m));
  }

  .band {
    padding-top: calc(14 * var(--m));
    padding-bottom: calc(22 * var(--m));
  }

  .work__label,
  .contact__label {
    font-size: max(0.56rem, calc(7 * var(--m)));
  }

  .band__title,
  .contact__title {
    font-size: max(0.8rem, calc(12.5 * var(--m)));
  }

  .band__types {
    margin-top: calc(9 * var(--m));
    font-size: max(0.68rem, calc(10 * var(--m)));
  }

  .band__desc {
    margin-top: calc(6 * var(--m));
    font-size: max(0.66rem, calc(8.5 * var(--m)));
  }

  /* Contact */
  .contact {
    padding-top: calc(14 * var(--m));
    padding-bottom: calc(35 * var(--m) + env(safe-area-inset-bottom));
  }

  .contact__grid {
    grid-template-columns: 1fr 1fr;
    gap: calc(20 * var(--m));
    margin-top: calc(14 * var(--m));
  }

  .contact__value {
    margin-top: calc(3 * var(--m));
    font-size: max(0.72rem, calc(10 * var(--m)));
    overflow-wrap: anywhere;
  }

  .contact__area {
    margin-top: calc(16 * var(--m));
    font-size: max(0.6rem, calc(8 * var(--m)));
  }

  .contact__privacy {
    margin-top: calc(6 * var(--m));
    font-size: max(0.56rem, calc(7 * var(--m)));
  }
}

/* === Privacy page title band === */
.page-hero {
  position: relative;
  color: var(--white);
  background: var(--navy-950);
}

.page-hero .container {
  max-width: 46rem; /* same as .prose */
  padding-top: clamp(6rem, 12vw, 7.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 3.75rem);
}

/* the homepage pill has a min-width, not wanted here */
.page-hero .pill {
  min-width: 0;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 178, 83, 0.55), transparent);
}

.page-hero__title {
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 1rem + 5.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
}

.page-hero__date {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--muted-on-dark);
}

/* === Privacy and thank-you pages === */
.page-header {
  padding-top: env(safe-area-inset-top);
  background: var(--navy-950);
}

.page-header .site-header__inner {
  padding-bottom: clamp(1.25rem, 3.5vw, 2.25rem);
}

.page {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
  background: var(--cream);
}

.prose {
  max-width: 46rem;
  font-size: 1rem;
  line-height: 1.7;
}

.prose h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.4rem);
  line-height: 1.2;
  color: var(--ink);
}

.prose h2 {
  margin-top: 2.25rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--ink);
}

.prose p,
.prose ul {
  margin-top: 0.9rem;
}

.prose ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.prose .updated {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--label);
}

.prose .btn {
  margin-top: 2rem;
}
