/* Cygnet's Swan Ridge — Main stylesheet
   Fonts load via HTML preconnect + stylesheet links (not @import). */
@import "variables.css";
@import "reset.css";
@import "layout.css";
@import "components.css";

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--color-text);
  background: var(--color-paper);
}

body.nav-open {
  overflow: hidden;
}

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

a:not(.btn):not(.image-card):not(.contact-card):not(.site-brand):not(.nav-cta) {
  color: var(--color-berry-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:not(.btn):not(.image-card):not(.contact-card):not(.site-brand):not(.nav-cta):hover {
  color: var(--color-berry);
}

/* ——— Header ——— */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-height);
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.site-header--transparent {
  background: transparent;
  color: var(--color-paper);
}

.site-header--solid,
.site-header.is-scrolled,
.site-header.nav-open {
  background: rgba(32, 35, 31, 0.96);
  color: var(--color-paper);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--header-height);
  min-width: 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: 0 1 auto;
  max-width: calc(100% - 3.5rem);
}

.site-brand img {
  width: 2.75rem;
  height: 2.05rem;
  object-fit: contain;
}

.site-brand__text {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-nav {
  margin-left: auto;
  min-width: 0;
}

.main-nav ul {
  display: none;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  font-size: 0.875rem;
  font-weight: 550;
  opacity: 0.9;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  opacity: 1;
  background: rgba(255, 253, 248, 0.1);
}

.nav-cta {
  display: none;
  margin-left: 0.35rem;
  min-height: 2.6rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--color-berry);
  color: var(--color-white) !important;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--color-berry-dark);
}

.nav-toggle {
  margin-left: auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.7rem;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 253, 248, 0.08);
  border: 1px solid rgba(255, 253, 248, 0.18);
}

.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 23, 20, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 90;
}

.nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile / tablet off-canvas through 1179px */
@media (max-width: 1179px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(22rem, 88vw);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    background: var(--color-surface-dark);
    color: var(--color-paper);
    padding: calc(var(--header-height) + 1rem) 1.25rem 2rem;
    transform: translateX(105%);
    transition: transform var(--transition);
    z-index: 95;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  /* Closed panel: remove from interaction even before inert polyfills */
  .main-nav:not(.is-open) {
    visibility: hidden;
    pointer-events: none;
  }

  .main-nav.is-open {
    visibility: visible;
    pointer-events: auto;
  }

  .main-nav ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .main-nav a {
    min-height: 2.85rem;
    padding: 0.65rem 0.85rem;
    font-size: 1.05rem;
    border-radius: var(--radius);
    white-space: normal;
  }

  .main-nav .nav-cta-mobile {
    display: inline-flex;
    margin-top: 1rem;
    justify-content: center;
    background: var(--color-berry);
    color: var(--color-white);
  }
}

/* Complete desktop navigation from 1180px */
@media (min-width: 1180px) {
  .nav-toggle,
  .nav-overlay,
  .nav-cta-mobile {
    display: none !important;
  }

  .site-brand {
    max-width: none;
    flex-shrink: 0;
  }

  .main-nav {
    margin-left: auto;
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
  }

  .main-nav ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .nav-cta {
    display: inline-flex;
    flex-shrink: 0;
  }
}

/* ——— Homepage bento hero ——— */
.home-hero {
  position: relative;
  padding: calc(var(--header-height) + clamp(1.25rem, 3vw, 2rem)) 0 clamp(2rem, 4vw, 3rem);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(120, 150, 79, 0.18), transparent 45%),
    radial-gradient(ellipse at 90% 10%, rgba(183, 47, 98, 0.16), transparent 40%),
    var(--color-ink);
  color: var(--color-cream);
}

.bento-hero {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(90px, auto);
}

.bento-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(244, 240, 231, 0.12);
  background: var(--color-surface-dark);
  min-width: 0;
  min-height: 0;
  /* Default: full grid span so cards never collapse to 1/12 on narrow screens */
  grid-column: 1 / -1;
}

.bento-card--copy {
  grid-column: 1 / -1;
  padding: clamp(1.35rem, 3.5vw, 2.35rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(160deg, rgba(32, 35, 31, 0.96), rgba(21, 23, 20, 0.98));
}

.bento-card--media {
  grid-column: 1 / -1;
  min-height: 220px;
}

.bento-card--media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.bento-card--media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 23, 20, 0.15), rgba(21, 23, 20, 0.45));
  pointer-events: none;
}

.bento-card--badge {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  min-height: 110px;
}

.bento-card--badge strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-paper);
  overflow-wrap: anywhere;
}

.bento-card--badge span {
  color: rgba(244, 240, 231, 0.72);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.bento-variety-names {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bento-variety-names li {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.25;
  color: var(--color-paper);
  overflow-wrap: break-word;
}

.bento-card--leaf {
  background: linear-gradient(145deg, #3f5631, #2c3d24);
}

.bento-card--berry {
  background: linear-gradient(145deg, #842044, #5e1632);
}

.bento-card--ink {
  background: linear-gradient(145deg, #262a24, #151714);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c7d4a8;
  margin-bottom: 0.85rem;
}

.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 14ch;
  margin-bottom: 1rem;
  color: var(--color-paper);
  overflow-wrap: break-word;
}

.home-hero .hero-lede {
  max-width: 38rem;
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  color: rgba(244, 240, 231, 0.84);
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Narrow phones: stack CTAs full width */
@media (max-width: 519px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    white-space: normal;
  }
}

/* 520–779px: information cards in two columns; final card full row */
@media (min-width: 520px) and (max-width: 779px) {
  .bento-card--copy,
  .bento-card--media {
    grid-column: 1 / -1;
  }

  .bento-card--badge:nth-of-type(3),
  .bento-card--badge:nth-of-type(4),
  .bento-card--badge:nth-of-type(5),
  .bento-card--badge:nth-of-type(6) {
    grid-column: span 6;
  }

  .bento-card--badge:nth-of-type(7) {
    grid-column: 1 / -1;
  }

  .bento-card--media {
    min-height: 260px;
  }
}

@media (min-width: 780px) {
  .bento-card--copy {
    grid-column: 1 / span 7;
    grid-row: 1 / span 3;
    min-height: 420px;
  }

  .bento-card--media {
    grid-column: 8 / span 5;
    grid-row: 1 / span 2;
    min-height: 280px;
  }

  .bento-card--badge:nth-of-type(3) {
    grid-column: 8 / span 2;
    grid-row: 3;
  }

  .bento-card--badge:nth-of-type(4) {
    grid-column: 10 / span 3;
    grid-row: 3;
  }

  .bento-card--badge:nth-of-type(5) {
    grid-column: 1 / span 4;
    grid-row: 4;
  }

  .bento-card--badge:nth-of-type(6) {
    grid-column: 5 / span 4;
    grid-row: 4;
  }

  .bento-card--badge:nth-of-type(7) {
    grid-column: 9 / span 4;
    grid-row: 4;
  }
}

@media (min-width: 1100px) {
  .bento-hero {
    grid-auto-rows: minmax(100px, auto);
  }

  .bento-card--copy {
    grid-column: 1 / span 6;
    grid-row: 1 / span 4;
  }

  .bento-card--media {
    grid-column: 7 / span 6;
    grid-row: 1 / span 3;
    min-height: 360px;
  }

  .bento-card--badge:nth-of-type(3) {
    grid-column: 7 / span 3;
    grid-row: 4;
  }

  .bento-card--badge:nth-of-type(4) {
    grid-column: 10 / span 3;
    grid-row: 4;
  }

  .bento-card--badge:nth-of-type(5),
  .bento-card--badge:nth-of-type(6),
  .bento-card--badge:nth-of-type(7) {
    grid-row: 5;
  }

  .bento-card--badge:nth-of-type(5) {
    grid-column: 1 / span 4;
  }

  .bento-card--badge:nth-of-type(6) {
    grid-column: 5 / span 4;
  }

  .bento-card--badge:nth-of-type(7) {
    grid-column: 9 / span 4;
  }
}

/* Availability strip */
.availability-strip {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--radius-xl);
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  min-width: 0;
}

.availability-strip > * {
  min-width: 0;
}

@media (min-width: 900px) {
  .availability-strip {
    grid-template-columns: minmax(0, 1.4fr) auto;
  }
}

.availability-strip h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  color: var(--color-ink);
  margin-bottom: 0.35rem;
}

.availability-strip p {
  color: var(--color-muted);
}

/* Product feature */
.product-feature {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

.product-feature > * {
  min-width: 0;
}

@media (min-width: 900px) {
  .product-feature {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
  }
}

.product-feature__media {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-cream);
}

.product-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CTA band */
.cta-band {
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background:
    linear-gradient(135deg, rgba(183, 47, 98, 0.95), rgba(73, 99, 54, 0.92)),
    var(--color-berry-dark);
  color: var(--color-paper);
  min-width: 0;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
  overflow-wrap: break-word;
}

.cta-band p {
  max-width: 40rem;
  color: rgba(255, 253, 248, 0.9);
  margin-bottom: 1.25rem;
  overflow-wrap: anywhere;
}

.cta-band .cluster {
  min-width: 0;
}

/* ——— Footer ——— */
.site-footer {
  background: var(--color-ink);
  color: rgba(244, 240, 231, 0.86);
  padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  min-width: 0;
}

.footer-grid > * {
  min-width: 0;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-brand img {
  width: 4.5rem;
  height: auto;
}

.footer-brand p {
  max-width: 28rem;
  color: rgba(244, 240, 231, 0.72);
  font-size: 0.975rem;
}

.site-footer h2,
.site-footer h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-paper);
  margin-bottom: 0.85rem;
}

.footer-links {
  display: grid;
  gap: 0.45rem;
}

.footer-links a,
.site-footer a {
  color: rgba(244, 240, 231, 0.86);
  text-decoration: none;
}

.footer-links a:hover,
.site-footer a:hover,
.footer-links a:focus-visible,
.site-footer a:focus-visible {
  color: var(--color-paper);
  text-decoration: underline;
}

.footer-contact {
  display: grid;
  gap: 0.45rem;
  font-size: 0.975rem;
}

.footer-contact a,
.contact-card strong,
a[href^="mailto:"],
a[href^="tel:"] {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(244, 240, 231, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.9rem;
  color: rgba(244, 240, 231, 0.65);
  min-width: 0;
}

/* Utilities */
.mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.list-check {
  display: grid;
  gap: 0.55rem;
}

.list-check li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--color-text);
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--color-leaf);
}

.zone-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .zone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.zone-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
  color: var(--color-ink);
}

.zone-card p {
  color: var(--color-muted);
}

.inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.about-portrait {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  border-radius: var(--radius-xl);
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
}

.page-hero--image .page-hero__content {
  width: min(100% - (var(--gutter) * 2), var(--max-width));
  margin-inline: auto;
  padding-bottom: 0.5rem;
}
