/* Callaghan Design: shared stylesheet.
   Palette is drawn from the drafting office: white hull paper, ink, cyanotype blue,
   a pale waterline blue and one yellow for the things you should click. */

:root {
  --hull: #f4f7f9;
  --paper: #ffffff;
  --page: #e9eff4;
  --ink: #0c2238;
  --ink-soft: #3a5670;
  --cyan: #1d5c9e;
  --line: #b9ccdb;
  --spark: #f0b400;
  --serif: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--serif);
}

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

a {
  color: var(--cyan);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--ink); }

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

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--hull);
  font: 600 1rem var(--sans);
}
.skip:focus { top: 1rem; }

/* Headings */

h1, h2, h3 { font-family: var(--sans); color: var(--ink); }

h1 {
  margin: 0 0 1.25rem;
  max-width: 18ch;
  font-size: clamp(2.2rem, 5.4vw, 3.75rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.intro { max-width: 60ch; margin: 0; color: var(--ink-soft); }

/* Header */

.top { border-bottom: 1px solid #000; background: #000; color: #fff; }
.top a:focus-visible { outline-color: #fff; }

.top-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font: 700 1.3rem/1 var(--sans);
  text-decoration: none;
}
.brand:hover { color: var(--spark); }
.brand img { width: 56px; height: 56px; }

.top ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.top ul a { color: #fff; font: 500 0.98rem var(--sans); }
.top ul a:hover { color: var(--spark); }

/* Buttons */

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block: 1.5rem; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.15rem;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 700 1rem/1.2 var(--sans);
  text-decoration: none;
}
.btn:hover { background: var(--ink); color: var(--hull); }

.btn-main { border-color: var(--spark); background: var(--spark); }
.btn-main:hover { border-color: var(--ink); background: var(--ink); color: var(--hull); }

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(5.5rem, 13vw, 9.5rem);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 47px,
    rgba(29, 92, 158, 0.14) 47px,
    rgba(29, 92, 158, 0.14) 48px
  );
}

.hero-inner { position: relative; z-index: 1; display: grid; gap: 2rem; }

@media (min-width: 56rem) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) 340px; align-items: center; gap: 3rem; }
}

.lede { max-width: 60ch; margin: 0 0 0.9rem; font-size: 1.15rem; }

.facts {
  display: grid;
  gap: 0.4rem;
  margin: 1.75rem 0 0;
  padding: 0 0 0 1rem;
  border-left: 3px solid var(--spark);
  list-style: none;
}
.facts strong { font-family: var(--sans); }

/* The one drawn moment: a sheer line, traced once on page load. */

.sheer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: clamp(60px, 11vw, 140px);
  pointer-events: none;
}
.sheer path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: trace 1.9s 0.3s ease-out backwards;
}
@keyframes trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Slideshow */

.hero-show { width: min(100%, 340px); justify-self: center; }

.slides {
  position: relative;
  aspect-ratio: 310 / 418;
  border: 1px solid var(--ink);
  background: var(--ink);
}
.slides img { width: 100%; height: 100%; object-fit: contain; }
.slides img:not(:first-child) { display: none; }

.js .slides img { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity 0.5s; }
.js .slides img.is-active { opacity: 1; }

.show-controls { display: none; align-items: center; gap: 0.5rem; padding-top: 0.6rem; }
.js .show-controls { display: flex; }

.show-controls button {
  padding: 0.4rem 0.75rem;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 600 0.9rem var(--sans);
  cursor: pointer;
}
.show-controls button:hover { background: var(--ink); color: var(--hull); }

.show-count { margin-left: auto; color: var(--ink-soft); font: 0.9rem var(--sans); }

/* Bands */

.band { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.band-alt { background: var(--paper); }
.band-dark { background: var(--ink); color: var(--hull); }
.band-dark h2 { color: var(--hull); }

/* Featured cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.card {
  display: block;
  height: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.card:hover { border-color: var(--ink); color: var(--ink); }
.card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 40%; }
.card-body { padding: 0.9rem 1rem 1.1rem; }
.card h3 {
  margin: 0 0 0.3rem;
  color: var(--cyan);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.2;
}
.card:hover h3 { text-decoration: underline; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5; }

/* Design index tables */

.group { margin-top: 2.25rem; }
.group h3 { margin: 0 0 0.5rem; font-size: 1.25rem; font-weight: 700; line-height: 1.2; }

.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td {
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.spec thead th { color: var(--ink-soft); font: 600 0.9rem var(--sans); }
.spec tbody th { font: italic 700 1rem/1.4 var(--sans); }
.spec tbody th a { text-decoration-thickness: 0.06em; }
.spec td { font-size: 1rem; }

@media (max-width: 39.99rem) {
  .spec thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .spec tr { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .spec th, .spec td { display: block; padding: 0.05rem 0; border: 0; }
  .spec td::before { content: attr(data-label) ": "; color: var(--ink-soft); font: 600 0.92rem var(--sans); }
}

.also { margin: 2rem 0 0; }

/* About the boats */

.about { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .about { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.about p { max-width: 60ch; }

.ticks { margin: 1rem 0 1.25rem; padding-left: 1.2rem; }
.ticks li { margin-bottom: 0.3rem; padding-left: 0.2rem; }
.ticks li::marker { color: var(--cyan); }

.tow { margin-top: 1.5rem; border: 1px solid var(--line); background: var(--paper); }

/* Plans and contact (dark band) */

.plans { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .plans { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.plans p { max-width: 60ch; }

.band-dark a:not(.btn) { color: var(--spark); }
.band-dark a:not(.btn):hover { color: #ffffff; }
.band-dark :focus-visible { outline-color: var(--spark); }

.on-dark .btn { border-color: var(--hull); color: var(--hull); }
.on-dark .btn:hover { background: var(--hull); color: var(--ink); }
.on-dark .btn-main { border-color: var(--spark); background: var(--spark); color: var(--ink); }
.on-dark .btn-main:hover { border-color: var(--hull); background: var(--hull); color: var(--ink); }

address { font-style: normal; line-height: 1.7; }

/* Footer */

.foot { padding-block: 2rem; font: 0.95rem/1.5 var(--sans); }
.foot ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.foot p { margin: 0 0 0.6rem; color: var(--ink-soft); }
.ring a { margin-right: 0.9rem; }

/* Motion preferences */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheer path { animation: none; }
  .js .slides img { transition: none; }
}
