@layer reset, base, components, utilities;

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

  html {
    scroll-behavior: smooth;
  }

  body,
  h1,
  h2,
  h3,
  p {
    margin: 0;
  }

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

  button,
  input,
  textarea,
  select {
    font: inherit;
  }
}

@layer base {
  :root {
    color-scheme: light;
    --forest-900: #1f3426;
    --forest-800: #294634;
    --forest-700: #32543a;
    --forest-600: #3f6848;
    --forest-100: #e9f0e8;
    --cream-50: #fffdf7;
    --cream-100: #f8f2e4;
    --cream-200: #eee3cd;
    --soil-700: #654b38;
    --soil-500: #8a6a4d;
    --gold-500: #d99b35;
    --gold-300: #efc96e;
    --apple: #b9493e;
    --peach: #e79a6a;
    --cherry: #8c2435;
    --sky: #b7d5d8;
    --ink: #243029;
    --muted: #617067;
    --white: #ffffff;
    --border: rgba(31, 52, 38, 0.14);
    --shadow: 0 24px 70px rgba(31, 52, 38, 0.13);
    --radius-large: 28px;
    --radius-medium: 18px;
    --radius-small: 12px;
    --container: 1180px;
  }

  body {
    min-width: 320px;
    color: var(--ink);
    background: var(--cream-50);
    font-family:
      "Segoe UI",
      Inter,
      ui-sans-serif,
      system-ui,
      -apple-system,
      BlinkMacSystemFont,
      Arial,
      sans-serif;
    line-height: 1.6;
  }

  body.menu-open {
    overflow: hidden;
  }

  h1,
  h2,
  h3,
  .brand-mark {
    font-family:
      Georgia,
      "Times New Roman",
      serif;
  }

  h1 {
    max-width: 900px;
    font-size: clamp(3.25rem, 8vw, 6.9rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.055em;
  }

  h2 {
    font-size: clamp(2.25rem, 5vw, 4.25rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.045em;
  }

  h3 {
    font-size: 1.4rem;
    line-height: 1.2;
  }

  a {
    color: inherit;
  }

  .container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
  }

  .section {
    padding-block: clamp(84px, 10vw, 144px);
  }

  .section-kicker,
  .eyebrow {
    margin-bottom: 16px;
    color: var(--forest-700);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    color: var(--white);
    background: var(--forest-900);
    border-radius: 8px;
    transform: translateY(-160%);
  }

  .skip-link:focus {
    transform: translateY(0);
  }
}

@layer components {
  .site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    color: var(--forest-900);
    background: rgba(255, 253, 247, 0.91);
    border-bottom: 1px solid rgba(31, 52, 38, 0.08);
    backdrop-filter: blur(16px);
  }

  .nav-shell {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--forest-900);
    text-decoration: none;
  }

  .brand-mark {
    display: grid;
    min-width: 64px;
    min-height: 46px;
    place-items: center;
    padding: 5px 10px;
    color: var(--cream-50);
    background: var(--forest-700);
    border-radius: 50% 44% 48% 43%;
    font-size: 1.08rem;
    font-weight: 700;
    transform: rotate(-2deg);
  }

  .brand-copy {
    display: grid;
    line-height: 1.05;
  }

  .brand-copy strong {
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .brand-copy small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
  }

  .site-nav a {
    position: relative;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
  }

  .site-nav a::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    content: "";
    background: var(--forest-700);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
  }

  .site-nav a:hover::after,
  .site-nav a:focus-visible::after {
    transform: scaleX(1);
  }

  .menu-button {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: var(--forest-900);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
  }

  .menu-label {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .menu-icon,
  .menu-icon::before,
  .menu-icon::after {
    width: 18px;
    height: 2px;
    display: block;
    content: "";
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .menu-icon {
    position: relative;
  }

  .menu-icon::before {
    position: absolute;
    top: -6px;
  }

  .menu-icon::after {
    position: absolute;
    top: 6px;
  }

  .menu-button[aria-expanded="true"] .menu-icon {
    background: transparent;
  }

  .menu-button[aria-expanded="true"] .menu-icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .menu-button[aria-expanded="true"] .menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .hero {
    position: relative;
    min-height: min(900px, calc(100vh - 78px));
    display: grid;
    align-items: center;
    overflow: hidden;
    color: var(--cream-50);
    background: var(--forest-900);
  }

  .hero::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    background:
      linear-gradient(90deg, rgba(22, 42, 29, 0.88) 0%, rgba(22, 42, 29, 0.62) 52%, rgba(22, 42, 29, 0.22) 100%),
      linear-gradient(0deg, rgba(22, 42, 29, 0.54), transparent 42%);
  }

  .hero-art {
    position: absolute;
    inset: 0;
    background:
      url("assets/farm-hero.webp") center center / cover no-repeat;
    transform: scale(1.02);
  }

  .hero-content {
    position: relative;
    z-index: 2;
    padding-block: 100px;
  }

  .hero .eyebrow {
    color: var(--gold-300);
  }

  .hero-intro {
    max-width: 650px;
    margin-top: 30px;
    color: rgba(255, 253, 247, 0.86);
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    line-height: 1.75;
  }

  .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 34px;
    padding: 14px 22px;
    color: var(--forest-900);
    background: var(--gold-300);
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    transition: transform 180ms ease, background-color 180ms ease;
  }

  .primary-button:hover {
    background: #f7d98c;
    transform: translateY(-2px);
  }

  .about-section {
    background:
      radial-gradient(circle at 90% 12%, rgba(217, 155, 53, 0.12), transparent 24%),
      var(--cream-50);
  }

  .split-layout {
    display: grid;
    grid-template-columns: 1.05fr 0.8fr;
    gap: clamp(48px, 8vw, 110px);
    align-items: start;
  }

  .prose {
    display: grid;
    gap: 22px;
    padding-top: 42px;
    color: var(--muted);
    font-size: 1.06rem;
  }

  .farm-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 72px;
  }

  .fact-card {
    display: grid;
    min-height: 160px;
    align-content: space-between;
    padding: 25px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    box-shadow: 0 18px 45px rgba(31, 52, 38, 0.07);
  }

  .fact-number {
    color: var(--forest-700);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.7rem;
    line-height: 1;
  }

  .fact-label {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .animals-section {
    color: var(--cream-50);
    background:
      linear-gradient(rgba(31, 52, 38, 0.97), rgba(31, 52, 38, 0.97)),
      repeating-linear-gradient(45deg, transparent 0 24px, rgba(255, 255, 255, 0.04) 24px 25px);
  }

  .animals-section .section-kicker {
    color: var(--gold-300);
  }

  .section-heading {
    max-width: 760px;
    margin-bottom: 58px;
  }

  .section-heading > p:last-child {
    max-width: 650px;
    margin-top: 22px;
    color: rgba(255, 253, 247, 0.72);
    font-size: 1.04rem;
  }

  .animal-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 22px;
  }

  .photo-card {
    position: relative;
    min-height: 390px;
    margin: 0;
    overflow: hidden;
    background: #16251b;
    border-radius: var(--radius-large);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.19);
  }

  .photo-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(15, 28, 19, 0.9) 0%, rgba(15, 28, 19, 0.04) 62%);
    pointer-events: none;
  }

  .photo-card img {
    width: 100%;
    height: 100%;
    min-height: 390px;
    display: block;
    object-fit: cover;
    transition: transform 500ms ease;
  }

  .photo-card:hover img {
    transform: scale(1.025);
  }

  .photo-card figcaption {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    gap: 6px;
    padding: 28px;
  }

  .photo-card figcaption strong {
    color: var(--cream-50);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
  }

  .photo-card figcaption span {
    max-width: 540px;
    color: rgba(255, 253, 247, 0.8);
    font-size: 0.92rem;
  }

  .animal-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }

  .animal-card {
    min-height: 205px;
    padding: 25px;
    color: var(--ink);
    background: var(--cream-50);
    border-top: 4px solid var(--gold-500);
    border-radius: var(--radius-medium);
    transition: transform 180ms ease, background-color 180ms ease;
  }

  .animal-card:hover {
    background: var(--white);
    transform: translateY(-4px);
  }

  .animal-label {
    color: var(--forest-700);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  .animal-card h3 {
    margin-top: 17px;
  }

  .animal-card > p:last-child {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.91rem;
    line-height: 1.55;
  }

  .garden-section {
    background: var(--cream-100);
  }

  .garden-layout {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: clamp(46px, 8vw, 110px);
    align-items: center;
  }

  .garden-copy > p:not(.section-kicker) {
    margin-top: 24px;
    color: var(--muted);
    font-size: 1.04rem;
  }

  .harvest-list {
    display: grid;
    gap: 24px;
    margin-top: 36px;
  }

  .harvest-list > div {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 15px;
    align-items: start;
  }

  .harvest-list h3 {
    font-size: 1.12rem;
  }

  .harvest-list p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.94rem;
  }

  .harvest-dot {
    width: 18px;
    height: 18px;
    display: block;
    margin-top: 2px;
    background: var(--forest-600);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(63, 104, 72, 0.12);
  }

  .apple-dot { background: var(--apple); box-shadow: 0 0 0 6px rgba(185, 73, 62, 0.12); }
  .peach-dot { background: var(--peach); box-shadow: 0 0 0 6px rgba(231, 154, 106, 0.14); }
  .cherry-dot { background: var(--cherry); box-shadow: 0 0 0 6px rgba(140, 36, 53, 0.12); }

  .garden-photo {
    position: relative;
    min-height: 560px;
    margin: 0;
    overflow: hidden;
    background: var(--forest-900);
    border: 12px solid var(--white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
  }

  .garden-photo::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(31, 52, 38, 0.68) 0%, transparent 42%);
    pointer-events: none;
  }

  .garden-photo img {
    width: 100%;
    height: 100%;
    min-height: 536px;
    display: block;
    object-fit: cover;
  }

  .garden-photo figcaption {
    position: absolute;
    z-index: 2;
    right: 28px;
    bottom: 24px;
    left: 28px;
    color: rgba(255, 253, 247, 0.9);
    font-size: 0.9rem;
    font-weight: 700;
  }

  .seasons-section {
    background: var(--cream-50);
  }

  .seasons-section .section-heading > p:last-child {
    color: var(--muted);
  }

  .season-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    overflow: hidden;
  }

  .season-card {
    min-height: 360px;
    display: grid;
    align-content: end;
    padding: 30px;
    border-right: 1px solid var(--border);
  }

  .season-card:last-child {
    border-right: 0;
  }

  .season-card h3 {
    margin-top: 8px;
    font-size: 1.75rem;
  }

  .season-card p {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.94rem;
  }

  .season-number {
    align-self: start;
    color: rgba(31, 52, 38, 0.35);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.5rem;
  }

  .spring { background: linear-gradient(#eef5e8, #f8fbf4); }
  .summer { background: linear-gradient(#f8efd2, #fffaf0); }
  .autumn { background: linear-gradient(#f3dfce, #fff7ef); }
  .winter { background: linear-gradient(#e4eef0, #f7fbfc); }

  .closing-section {
    padding-block: 0 110px;
    background: var(--cream-50);
  }

  .closing-card {
    min-height: 280px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
    padding: clamp(36px, 6vw, 72px);
    color: var(--cream-50);
    background:
      linear-gradient(135deg, rgba(31, 52, 38, 0.97), rgba(50, 84, 58, 0.91)),
      var(--forest-900);
    border-radius: var(--radius-large);
  }

  .closing-card h2 {
    max-width: 760px;
    font-size: clamp(2.1rem, 5vw, 4.2rem);
  }

  .closing-card .section-kicker {
    color: var(--gold-300);
  }

  .text-link {
    flex: 0 0 auto;
    padding-bottom: 6px;
    color: var(--gold-300);
    border-bottom: 1px solid currentColor;
    font-weight: 800;
    text-decoration: none;
  }

  .site-footer {
    color: rgba(255, 253, 247, 0.75);
    background: #17271d;
  }

  .footer-content {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
  }

  .footer-content > div {
    display: grid;
    gap: 6px;
  }

  .footer-content strong {
    color: var(--cream-50);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
  }

  .footer-content span,
  .footer-content p {
    font-size: 0.88rem;
  }

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

@layer utilities {
  @media (max-width: 1060px) {
    .animal-grid {
      grid-template-columns: repeat(3, 1fr);
    }

    .farm-facts,
    .season-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .season-card:nth-child(2) {
      border-right: 0;
    }

    .season-card:nth-child(-n + 2) {
      border-bottom: 1px solid var(--border);
    }
  }

  @media (max-width: 820px) {
    .menu-button {
      display: inline-flex;
    }

    .site-nav {
      position: fixed;
      z-index: 90;
      top: 78px;
      right: 0;
      bottom: 0;
      left: 0;
      display: grid;
      align-content: start;
      gap: 0;
      padding: 26px 20px;
      background: var(--cream-50);
      transform: translateX(100%);
      transition: transform 220ms ease;
    }

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

    .site-nav a {
      padding: 18px 4px;
      border-bottom: 1px solid var(--border);
      font-size: 1.1rem;
    }

    .site-nav a::after {
      display: none;
    }

    .split-layout,
    .garden-layout {
      grid-template-columns: 1fr;
    }

    .prose {
      padding-top: 0;
    }

    .garden-photo {
      min-height: 500px;
    }

    .garden-photo img {
      min-height: 476px;
    }

    .closing-card {
      align-items: start;
      flex-direction: column;
    }
  }

  @media (max-width: 680px) {
    .container {
      width: min(calc(100% - 28px), var(--container));
    }

    .hero {
      min-height: 760px;
    }

    .hero::before {
      background:
        linear-gradient(0deg, rgba(22, 42, 29, 0.93) 0%, rgba(22, 42, 29, 0.68) 68%, rgba(22, 42, 29, 0.28) 100%);
    }

    .hero-content {
      align-self: end;
      padding-block: 120px 68px;
    }

    .animal-photo-grid,
    .animal-grid,
    .farm-facts,
    .season-grid {
      grid-template-columns: 1fr;
    }

    .animal-card {
      min-height: 220px;
    }

    .season-card {
      min-height: 280px;
      border-right: 0;
      border-bottom: 1px solid var(--border);
    }

    .season-card:nth-child(2) {
      border-right: 0;
    }

    .season-card:nth-child(-n + 2) {
      border-bottom: 1px solid var(--border);
    }

    .season-card:last-child {
      border-bottom: 0;
    }

    .garden-photo {
      min-height: 410px;
      border-width: 8px;
    }

    .garden-photo img {
      min-height: 394px;
    }

    .photo-card,
    .photo-card img {
      min-height: 330px;
    }

    .footer-content {
      min-height: 180px;
      align-items: flex-start;
      justify-content: center;
      flex-direction: column;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}
