/* Caney Creek HOA. Mobile-first; one breakpoint at 1200px. See docs/SPEC.md §4–7. */

@font-face { font-family: "Cormorant Garamond"; src: url(/assets/fonts/cormorant-garamond-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(/assets/fonts/cormorant-garamond-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/assets/fonts/inter-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/assets/fonts/inter-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/assets/fonts/inter-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --forest: #1f4d3a;
  --ink: #18342a;
  --cream: #fcfbf7;
  --sand: #f3f0e9;
  --sage: #b9c8b6;
  --white: #ffffff;

  --ink-70: rgba(24, 52, 42, 0.7);
  --ink-65: rgba(24, 52, 42, 0.65);
  --card-border: inset 0 0 0 1px #1f4d3a1a;
  --lift-shadow: 0 14px 28px rgba(24, 52, 42, 0.12);

  --serif: "Cormorant Garamond", serif;
  --sans: "Inter", sans-serif;

  color-scheme: light;
}

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

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

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

h1, h2, h3, h4, p { margin: 0; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Nav ---------- */

.nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  background: var(--cream);
  border-bottom: 1px solid #1f4d3a1f;
}

.nav__title {
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
  color: var(--forest);
}

.nav__links { display: flex; gap: 18px; }

.nav__links a {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--forest); }

/* ---------- Layout blocks ---------- */

main, .footer { margin: 0 auto; max-width: 1200px; }

.section {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 52px 28px;
  scroll-margin-top: 0;
}

.section--sand { background: var(--sand); }

h2 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.intro {
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.grid { display: grid; grid-template-columns: 1fr; }
.grid--quick { gap: 16px; }
.grid--events { gap: 20px; }
.grid--resources { gap: 14px; }
.grid--board, .grid--contacts { gap: 12px; }

/* ---------- Hero ---------- */
/* Below 1200: text-free crop of the photo, with the headline under it.
   Desktop: full photo with the headline baked in; HTML text is visually hidden. */

.hero {
  width: 92%;
  margin: 0 auto;
}

.hero__media {
  position: relative;
  height: 300px;
  overflow: hidden;
}

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

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 28px;
  /* Hero is 92vw wide; line the text up with the sections' 28px gutter. */
  margin-inline: calc(28px - 4vw);
}

.hero h1 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.hero p {
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ---------- Cards ---------- */

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  box-shadow: var(--card-border);
}

.card__body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-70);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--forest);
}

.card--update {
  gap: 14px;
  padding: 24px;
  border-radius: 20px;
  transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.35s ease;
}

.card--update h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.05;
}

.card--update:hover {
  position: relative;
  z-index: 1;
  transform: translateY(-4px) scale(1.1);
  box-shadow: var(--card-border), var(--lift-shadow);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card--update { transition: none; }
  .card--update:hover { transform: none; }
}

/* Events */

.card--event {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: 20px;
}

.badge {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 70px;
  height: 70px;
  padding: 10px;
  border-radius: 14px;
  background: var(--forest);
  color: var(--white);
}

.badge__month {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
}

.badge__day {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 0.9;
}

.event__text { display: flex; flex-direction: column; gap: 6px; }

.card--event h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.event__meta {
  font-size: 14px;
  line-height: 1.2;
  color: var(--ink-70);
}

.event__meta a { color: var(--ink); transition: color 0.2s; }
.event__meta a:hover { color: var(--forest); }

/* Resources */

.card--resource {
  gap: 16px;
  padding: 24px;
  border-radius: 20px;
  cursor: pointer;
}

.card--resource h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.card__arrow { width: 22px; height: 22px; }

/* Board */

.card--board {
  gap: 8px;
  padding: 22px;
  border-radius: 18px;
}

.card--board h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.card--board p {
  font-size: 14px;
  line-height: 1.2;
  color: var(--ink-65);
}

/* Contacts */

.contacts {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border-radius: 20px;
  background: var(--sand);
}

.contacts h3 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.card--contact {
  gap: 8px;
  padding: 20px;
  border-radius: 18px;
}

.card--contact h4 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.card--contact p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-70);
  white-space: pre-wrap;
}

.card--contact a { color: var(--ink); transition: color 0.2s; }
.card--contact a:hover { color: var(--forest); }

/* ---------- Subpages (color schemes) ---------- */

a.nav__title { transition: opacity 0.2s; }
a.nav__title:hover { opacity: 0.8; }

.page-intro { gap: 20px; }

.back-link {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--forest);
  transition: color 0.2s;
}

.back-link:hover { color: var(--ink); }

.page-title {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.callout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
  padding: 24px;
  border-radius: 20px;
  background: var(--sand);
}

.callout p:not(.eyebrow) {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--card-border);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--forest);
  transition: box-shadow 0.2s;
}

.button:hover { box-shadow: inset 0 0 0 1px var(--forest); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chips a {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--card-border);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  transition: color 0.2s, box-shadow 0.2s;
}

.chips a:hover { color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }

.subpage [id] { scroll-margin-top: 16px; }

/* Trim */

.trim-card {
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
  border-radius: 20px;
}

.trim-card__text { display: flex; flex-direction: column; gap: 12px; flex: 1; }

.trim-card__text p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-70);
}

.trim-card__swatch {
  flex: none;
  width: 56px;
  height: auto;
  border-radius: 6px;
}

/* Scheme cards */

.scheme {
  gap: 20px;
  padding: 24px;
  border-radius: 20px;
}

.scheme h3 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.palette { margin: 0; display: flex; flex-direction: column; }

.palette__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid #1f4d3a1a;
}

.palette__row:first-child { border-top: 0; padding-top: 0; }

.palette dt {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--forest);
}

.palette dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paint {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  line-height: 1.3;
}

.paint a { color: var(--ink); transition: color 0.2s; }
.paint a:hover { color: var(--forest); }

.paint__code { font-weight: 600; }

.paint__chip {
  flex: none;
  width: 44px;
  height: 32px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(24, 52, 42, 0.15);
}

.paint__chip--none {
  background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(24, 52, 42, 0.08) 6px 7px);
}

.palette__note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-70);
}

.palette--plain dd {
  display: block;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
}

.scheme figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }

.scheme figure img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: var(--sand);
}

.scheme figcaption {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-70);
}

.scheme__photos { display: grid; gap: 16px; }

.grid--links, .grid--schemes { gap: 16px; }

.signoff { gap: 10px; }

.signoff__name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--forest);
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px 24px;
  background: var(--forest);
  color: var(--white);
}

.footer__title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.footer__meta {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.76);
  white-space: pre-wrap;
}

.footer__social { display: flex; align-items: center; gap: 14px; }

.footer__social a {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
  transition: color 0.2s;
}

.footer__social a:hover { color: rgba(255, 255, 255, 0.72); }

.footer__copyright {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.58);
}

/* ---------- Desktop ---------- */

@media (min-width: 1200px) {
  .nav {
    flex-direction: row;
    justify-content: space-between;
    padding: 20px 56px;
  }

  .nav__links { gap: 24px; }

  .section { padding: 50px; }

  h2 { font-size: 42px; }

  .hero { width: 1200px; }
  .hero__media { height: 560px; }
  .hero__text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .grid--quick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .grid--events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--resources { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .grid--board { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
  .grid--contacts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

  .contacts { padding: 28px; }

  .footer { padding: 48px 56px; }

  .page-title { font-size: 56px; }
  .page-intro .intro { max-width: 820px; }
  .callout { flex-direction: row; align-items: center; gap: 24px; padding: 24px 28px; }
  .callout .eyebrow { flex: none; }
  .callout .button { flex: none; margin-left: auto; }
  .trim-card { gap: 40px; padding: 28px; }
  .trim-card__swatch { width: 64px; }
  .scheme { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; padding: 28px; }
  .scheme h3 { grid-column: 1 / -1; }
  .palette__row { grid-template-columns: 140px 1fr; align-items: start; }
  .palette dt { padding-top: 9px; }
  .palette--plain dt { padding-top: 2px; }
  .scheme__photos { align-content: start; }
  .scheme--original, .scheme--no-photos { display: flex; }
  .scheme--no-photos .palette { max-width: 640px; }
  .grid--links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--schemes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .grid--schemes .palette__row { grid-template-columns: 130px 1fr; }
}
