/* ==========================================================================
   The Hartford Yacht Club — hartfordyachtclub.com
   Hand-written stylesheet for the approved design (docs/mockup.html).

   The mockup was exported from a design tool with inline styles on every
   element; this file is the same design expressed as tokens and classes.
   Values are the mockup's own, except where noted (cqi → vw, phone
   adjustments from the brief, and a few accessibility additions).
   ========================================================================== */

/* ── Fonts ─────────────────────────────────────────────────────────────── */
/* Self-hosted latin subsets from Google Fonts (all OFL). Libre Caslon Text
   is not a variable font, so each weight is its own file; Source Sans 3 is
   variable, so one file covers every weight. */

@font-face {
  font-family: 'Libre Caslon Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/libre-caslon-text-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Libre Caslon Text';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/libre-caslon-text-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/assets/fonts/source-sans-3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Design tokens ─────────────────────────────────────────────────────── */

:root {
  /* Palette. All text pairs pass WCAG AA (4.5:1). Brass-light is for use
     on navy only — on white it fails contrast. */
  --navy:         #0E2A47;   /* primary ground, headings, primary buttons */
  --navy-deep:    #081829;   /* footer */
  --ink:          #13212F;   /* body text */
  --muted:        #4A5866;   /* secondary text on light */
  --mist:         #EEF3F6;   /* alternate section background, chips */
  --line:         #DCE3E9;   /* borders on light */
  --white:        #FFFFFF;
  --brass-light:  #E2C17F;   /* accents on navy */
  --brass-dark:   #5A4318;   /* eyebrows on light */

  /* Text on navy, from strongest to softest. */
  --on-navy-strong: #DCE5EC;
  --on-navy:        #C9D5DF;
  --on-navy-soft:   #B9C8D4;
  --on-hero:        #E8EEF3;
  --on-footer-fine: #9FB0BE;

  /* Hairlines and outlines on dark grounds. */
  --rule-on-navy:   rgba(255, 255, 255, .18);
  --rule-on-footer: rgba(255, 255, 255, .14);
  --ghost-border:   rgba(255, 255, 255, .7);
  --scrim:          8, 24, 41;   /* navy-deep as RGB, for the hero gradient */

  --font-serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --font-sans:  'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap:        1200px;   /* content width, inside the gutters */
  --gutter:      24px;
  --section-pad: 96px;
  --radius-btn:  4px;
  --radius:      6px;

  /* Contextual colours. Dark sections redefine these (see .on-dark). */
  --heading: var(--navy);
  --eyebrow: var(--brass-dark);
  --focus:   var(--navy);
}

@media (max-width: 767px) {
  :root { --section-pad: 64px; }
}

/* ── Base ──────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, p, ul, ol, address { margin: 0; }
address { font-style: normal; }

a { color: inherit; text-underline-offset: .15em; }

h1, h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--heading);
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  line-height: 1.15;
}

/* Card and column headings keep the body line-height, as in the mockup. */
h3 {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 700;
  color: var(--heading);
}

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

/* Dark grounds: navy sections, the hero photo and the footer. */
.on-dark {
  --heading: var(--white);
  --eyebrow: var(--brass-light);
  --focus:   var(--brass-light);
  color: var(--white);
}

/* ── Layout ────────────────────────────────────────────────────────────── */

/* The mockup's containers are content-box, so 1200px is the width of the
   content and the gutters sit outside it. */
.wrap {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: calc(880px + 2 * var(--gutter)); }

.section { padding-block: var(--section-pad); }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy); }

/* Vertical rhythm: children sit flush and the gap does the spacing, as in
   the mockup. Components set --stack for their own gap. */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack, 18px);
}

/* Two-column split used by About and Membership. Collapses to one column
   without a breakpoint; min() stops it overflowing screens under 368px. */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.section-head {
  --stack: 14px;
  max-width: 680px;
}

/* ── Shared components ─────────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-btn);
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
}
.skip-link:focus { top: 16px; }

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--eyebrow);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  text-decoration: none;
}

.btn--brass {
  background: var(--brass-light);
  color: var(--navy);
}
.btn--brass:hover { background: #EBCF96; }

.btn--navy {
  background: var(--navy);
  color: var(--white);
}
.btn--navy:hover { background: #17395C; }

.btn--ghost {
  border: 1.5px solid var(--ghost-border);
  color: var(--white);
  font-weight: 600;
}
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }

.icon { flex: none; }

/* "More photos…" and the footer contact links. */
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
}
.icon-link:hover { text-decoration: none; }

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--navy);
  text-decoration: none;
}

.brand__logo { width: 48px; height: 48px; }

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .01em;
}

.brand__tag {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass-dark);
}

/* Wraps onto a second line on phones — no hamburger, no script. */
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 26px;
  font-size: 16px;
  font-weight: 600;
}

.nav__link {
  position: relative;
  padding: 10px 0;
  color: var(--ink);
  text-decoration: none;
}
.nav__link:hover { text-decoration: underline; }

/* Widen each link's hit area to 44px+ without changing the spacing: "FAQ"
   on its own is only ~30px wide. The 26px gap leaves room for both sides. */
.nav__link::after {
  content: "";
  position: absolute;
  inset: 0 -9px;
}

.nav__cta {
  padding: 11px 20px;
  border-radius: var(--radius-btn);
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}
.nav__cta:hover { background: #17395C; }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 660px;
  overflow: hidden;
  background: var(--navy);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

/* Bottom-up scrim so the text stays legible over the photo. This is the
   mockup's; narrower screens get stronger ones below. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,
    rgba(var(--scrim), .88) 0%,
    rgba(var(--scrim), .55) 38%,
    rgba(var(--scrim), 0) 70%);
}

/* A soft halo keeps glyphs clear of bright patches (white boats, the houses
   on the left bank) without darkening the whole photo. The small eyebrow
   needs a tighter, stronger one. */
.hero__body > :not(.actions) {
  text-shadow: 0 0 16px rgba(var(--scrim), .55), 0 1px 2px rgba(var(--scrim), .5);
}

.hero .eyebrow {
  text-shadow: 0 0 3px rgba(var(--scrim), .9), 0 0 10px rgba(var(--scrim), .8),
               0 0 20px rgba(var(--scrim), .6);
}

/* As in the approved mockup, the hero's text column is 1200px including its
   gutters, so on wide screens it sits 24px in from the sections below. */
.hero__body {
  --stack: 18px;
  max-width: var(--wrap);
  position: relative;
  z-index: 1;
  height: 100%;
  justify-content: flex-end;
  padding-bottom: 64px;
}

.hero h1 { max-width: 760px; }

.hero__lede {
  max-width: 600px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--on-hero);
}

.hero .actions { margin-top: 10px; }

/* Below ~1366px the eyebrow and heading land on the white houses on the
   left bank, so the scrim has to reach higher. Measured against the photo's
   actual pixels: every hero text element stays at 4.5:1 or better (the
   heading, as large text, at 3:1 or better above 1366px). */
@media (max-width: 1365px) {
  .hero::after {
    background: linear-gradient(0deg,
      rgba(var(--scrim), .9) 0%,
      rgba(var(--scrim), .72) 40%,
      rgba(var(--scrim), .62) 62%,
      rgba(var(--scrim), .25) 85%,
      rgba(var(--scrim), .05) 100%);
  }
}

@media (max-width: 767px) {
  .hero { height: 560px; }

  /* On a phone the text block fills most of the hero, reaching nearly to
     the top of the photo. */
  .hero::after {
    background: linear-gradient(0deg,
      rgba(var(--scrim), .9) 0%,
      rgba(var(--scrim), .72) 45%,
      rgba(var(--scrim), .45) 80%,
      rgba(var(--scrim), .3) 100%);
  }
}

/* ── Facts band ────────────────────────────────────────────────────────── */

.facts { background: var(--navy); }

.facts__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 24px 40px;
  padding-block: 36px;
  list-style: none;
}

.facts__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.facts__figure {
  font-family: var(--font-serif);
  font-size: 34px;
  color: var(--brass-light);
}

.facts__label {
  font-size: 16px;
  color: var(--on-navy);
}

/* ── About ─────────────────────────────────────────────────────────────── */

.about {
  gap: 48px 72px;
  align-items: center;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--navy);
  font-size: 16px;
  font-weight: 600;
}

.about__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ── Amenities ─────────────────────────────────────────────────────────── */

.amenities { --stack: 44px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 28px;
}

/* clubhouse.jpg is only 502×300; cropped to 3:2 it fills 450px at its
   native resolution. Capping the cards there means it is never upscaled.
   This only bites in one column, between ~500px and ~675px viewports. */
.card {
  display: flex;
  flex-direction: column;
  max-width: 450px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
}

.card__img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.card__body {
  --stack: 10px;
  padding: 26px 28px 30px;
  font-size: 17px;
}

.card__note {
  font-size: 15px;
  color: var(--muted);
}

/* ── Life at the club ──────────────────────────────────────────────────── */

.life { --stack: 32px; }

.life__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 32px;
}

.life__head .icon-link { color: var(--navy); }

/* Six columns on desktop. min() keeps it to two columns on the narrowest
   phones, where 160px tiles would otherwise drop to one. */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, calc(50% - 7px)), 1fr));
  gap: 12px;
}

.strip img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-btn);
}

/* ── Membership ────────────────────────────────────────────────────────── */

.membership { gap: 56px 80px; }

.membership__join { --stack: 20px; }

.steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  color: var(--on-navy-strong);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  min-width: 24px;
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--brass-light);
}

.membership__join .actions { margin-top: 8px; }

.forms {
  --stack: 16px;
  scroll-margin-top: 24px;
}

.forms__intro {
  font-size: 16px;
  color: var(--on-navy-soft);
}

.link-list {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule-on-navy);
}

.link-list li { border-bottom: 1px solid var(--rule-on-navy); }

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;   /* the mockup's 64px content-box minimum + padding */
  padding: 10px 0;
  text-decoration: none;
}

.link-list__text {
  display: flex;
  flex-direction: column;
}

.link-list__label { font-weight: 700; }
.link-list a:hover .link-list__label { text-decoration: underline; }

.link-list__desc {
  font-size: 15px;
  color: var(--on-navy-soft);
}

.link-list .icon { color: var(--brass-light); }

/* ── FAQ ───────────────────────────────────────────────────────────────── */

.faq { --stack: 32px; }

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq__item {
  padding: 0 24px;
  border-radius: var(--radius);
  background: var(--white);
}

.faq__item summary {
  padding: 20px 0;
  color: var(--navy);
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}

.faq__answer {
  --stack: 12px;
  padding-bottom: 22px;
}

.faq__answer ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 22px;
}

.faq__answer a {
  color: var(--navy);
  font-weight: 600;
}

.faq__aside {
  font-size: 16px;
  color: var(--muted);
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--navy-deep);
  color: var(--on-navy);
}

.footer {
  --stack: 40px;
  padding-block: 64px 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 36px 56px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer__brand img { width: 60px; height: 60px; }

.footer__brand-text {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.25;
}

.footer__name {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--white);
}

.footer__col { --stack: 10px; }

/* Visually an eyebrow; marked up as h2 so each column has a heading. */
.footer__heading {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brass-light);
}

.footer__col address,
.footer__col .icon-link { color: var(--white); }

.footer__legal {
  padding-top: 24px;
  border-top: 1px solid var(--rule-on-footer);
  font-size: 14px;
  color: var(--on-footer-fine);
}

/* ── 404 page ──────────────────────────────────────────────────────────── */

.not-found {
  --stack: 20px;
  max-width: 720px;
}
