/* RP Boatworks — site styles
   Type: Barlow Condensed (display) + Barlow (text)
   Palette: hull black, charcoal, slate, fog, brand red (from the logo) */

/* Self-hosted fonts (latin subsets from Google Fonts, OFL licence) */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/BarlowCondensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/BarlowCondensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/Barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/Barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/Barlow-600.woff2") format("woff2"); }

:root {
  --ink: #15191d;
  --char: #262c33;
  --slate: #5b6570;
  --mist: #c9cfd5;
  --fog: #edeff1;
  --white: #fafbfb;
  --red: #a4303d;
  --red-deep: #86262f;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-text: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --measure: 62ch;
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4rem, 9vw, 7.5rem);
  --header-h: 72px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--char);
  background: var(--white);
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(3rem, 8vw, 6.25rem); }
h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); font-weight: 600; line-height: 1.1; }

p { margin: 0 0 1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--red-deep); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* Skip link: visible only on keyboard focus */
.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--red);
  color: #fff;
  padding: 0.6rem 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.section { padding-block: var(--section); }
.section--fog { background: var(--fog); }
.section--ink { background: var(--ink); color: var(--mist); }
.section--ink h2, .section--ink h3 { color: var(--white); }

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.45;
  color: var(--slate);
  max-width: 54ch;
}
.section--ink .lede { color: var(--mist); }

.section-head { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head h2 { margin-bottom: 0.75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }

.btn--ghost { background: transparent; border-color: currentColor; color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ink); }

.btn--ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--char); border-color: var(--char); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header .wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}
.brand img { height: 46px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--white);
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--mist);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--red); }
.nav .nav-call { color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--white);
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle svg { width: 28px; height: 28px; display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    left: 0; right: 0; top: var(--header-h);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem var(--gutter) 1.25rem;
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { font-size: 1.5rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .nav a:hover, .nav a[aria-current="page"] { border-bottom-color: rgba(255, 255, 255, 0.08); }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--mist);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: min(calc(100svh - var(--header-h)), 820px);
}
.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(3rem, 7vw, 6rem)
           max(var(--gutter), calc((100vw - var(--wrap)) / 2));
}
.hero__kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--mist);
  margin-bottom: 1.25rem;
}
.hero h1 {
  color: var(--white);
  max-width: 14ch;
  margin-bottom: 1.5rem;
}
.hero .lede { margin-bottom: 2.25rem; color: var(--mist); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }

.hero__photo { position: relative; overflow: hidden; }
.hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__photo { order: -1; aspect-ratio: 4 / 3; }
  .hero__photo img { position: static; aspect-ratio: 4 / 3; }
  .hero__copy { padding-inline: var(--gutter); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * {
    animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero__copy > :nth-child(2) { animation-delay: 80ms; }
  .hero__copy > :nth-child(3) { animation-delay: 160ms; }
  .hero__copy > :nth-child(4) { animation-delay: 240ms; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- Facts strip ---------- */
.facts {
  background: var(--red);
  color: #fff;
}
.facts ul {
  list-style: none;
  margin: 0;
  padding: 1.1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem clamp(1.5rem, 4vw, 3.5rem);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
}

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2rem);
}
.service {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.service__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--mist);
}
.service__img img { width: 100%; height: 100%; object-fit: cover; }
.service h3 { padding-top: 0.25rem; border-top: 3px solid var(--ink); }
.service p { color: var(--slate); }

@media (max-width: 900px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
}

/* ---------- Work / gallery tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.tile {
  margin: 0;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--char);
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1rem 0.9rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: #fff;
  background: linear-gradient(to top, rgba(21, 25, 29, 0.85), rgba(21, 25, 29, 0));
}
.tile--wide { grid-column: span 2; aspect-ratio: auto; }

/* Placeholder tiles: swap for real photos when they arrive */
.tile--placeholder {
  background: var(--fog);
  border: 2px dashed var(--mist);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}
.section--ink .tile--placeholder {
  background: var(--char);
  border-color: rgba(255, 255, 255, 0.18);
}
.tile--placeholder span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--slate);
}
.section--ink .tile--placeholder span { color: var(--mist); }
.tile--placeholder svg {
  width: 40px; height: 40px;
  margin: 0 auto 0.5rem;
  display: block;
  color: var(--mist);
}
.section--ink .tile--placeholder svg { color: var(--slate); }

@media (max-width: 720px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--wide { grid-column: span 2; }
}

.work__foot { margin-top: clamp(2rem, 4vw, 3rem); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.about__photo img { width: 100%; }
.about h2 { margin-bottom: 1.25rem; }
.about__sign {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
}
.about__sign small { display: block; font-family: var(--font-text); font-weight: 400; font-size: 0.95rem; color: var(--slate); }
@media (max-width: 800px) {
  .about { grid-template-columns: 1fr; }
}

/* ---------- Testimonial ---------- */
.quote { max-width: 56ch; margin: 0; }
.quote p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  line-height: 1.2;
  color: var(--ink);
  max-width: none;
}
.quote p::before { content: "\201C"; color: var(--red); }
.quote p::after { content: "\201D"; color: var(--red); }
.quote footer {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--slate);
}
.quote footer strong { color: var(--ink); font-weight: 600; }
.stars { color: var(--red); letter-spacing: 0.1em; font-size: 1.1rem; margin-bottom: 1rem; }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 5vw, 5rem);
}
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.95rem; color: var(--mist); }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--white);
  background: var(--char);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  padding: 0.8rem 0.9rem;
}
.field input:focus, .field textarea:focus { border-color: var(--mist); outline: none; box-shadow: 0 0 0 3px rgba(164, 48, 61, 0.45); }
.field textarea { min-height: 9rem; resize: vertical; }
.form .btn { justify-self: start; margin-top: 0.25rem; }
.form-note { font-size: 0.9rem; color: var(--mist); }
.honey { position: absolute; left: -9999px; }

.details { display: grid; gap: 1.75rem; align-content: start; }
.details h3 { color: var(--white); margin-bottom: 0.4rem; font-size: 1.25rem; }
.details a { color: var(--white); font-size: 1.35rem; font-family: var(--font-display); font-weight: 600; text-decoration: none; }
.details a:hover { color: var(--mist); }
.details address { font-style: normal; color: var(--mist); }
.map {
  aspect-ratio: 16 / 10;
  border: 0;
  width: 100%;
  filter: grayscale(1) contrast(1.05);
}
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--mist);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem 0 calc(2rem + var(--callbar-h, 0px));
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer a { color: var(--mist); text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.social { display: flex; gap: 1rem; }
.social a { display: inline-flex; padding: 0.25rem; }
.social svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Mobile call bar ---------- */
.callbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: var(--white);
  border-top: 1px solid var(--mist);
  padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom));
  gap: 0.6rem;
}
.callbar .btn { flex: 1; justify-content: center; font-size: 1.125rem; padding: 0.85rem 1rem; }
@media (max-width: 767px) {
  .callbar { display: flex; }
  body { --callbar-h: 68px; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: var(--ink);
  color: var(--mist);
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.page-hero h1 { color: var(--white); font-size: clamp(2.75rem, 6vw, 4.5rem); margin-bottom: 1rem; }

.gallery-group + .gallery-group { margin-top: clamp(3rem, 6vw, 5rem); }
.gallery-group h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 0.5rem; }
.gallery-group .lede { margin-bottom: 1.5rem; font-size: 1.0625rem; }

/* ---------- Thanks ---------- */
.thanks { min-height: calc(100svh - var(--header-h) - 90px); display: grid; align-content: center; }
.thanks h1 { margin-bottom: 1rem; }
