/* ==========================================================================
   Cielo Vista Farms — Shared Design System
   ========================================================================== */

:root {
  /* Brand palette */
  --orange: #e8731f;
  --orange-deep: #c95c10;
  --orange-bright: #fb923c;
  --orange-soft: #fdf0e3;
  --green: #3f6b3c;
  --green-deep: #24401f;
  --cream: #faf6ef;
  --sand: #f2ebdd;
  --ink: #221f1a;
  --ink-soft: #5c574c;
  --white: #ffffff;
  --dark: #171512;
  --dark-2: #201d18;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --container: 1180px;
  --container-wide: 1320px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 10px rgba(34, 31, 26, 0.06);
  --shadow-md: 0 12px 32px rgba(34, 31, 26, 0.1);
  --shadow-lg: 0 24px 60px rgba(34, 31, 26, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

ul[class],
ol[class] {
  list-style: none;
}

::selection {
  background: var(--orange);
  color: var(--white);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

.eyebrow.centered::after {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

.container-wide {
  width: min(var(--container-wide), 100% - 3rem);
  margin-inline: auto;
}

.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head.centered {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  margin: 0.9rem 0 1rem;
}

.section-head p {
  font-size: 1.08rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    background-color 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(232, 115, 31, 0.32);
}

.btn-primary:hover {
  background: var(--orange-deep);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(232, 115, 31, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
  transform: translateY(-3px);
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--orange-deep);
  border-color: var(--orange);
}

.btn-outline:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   Page hero (interior page banner)
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  min-height: clamp(420px, 62vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.page-hero .hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(18, 15, 11, 0.55) 0%, rgba(18, 15, 11, 0.15) 40%, rgba(18, 15, 11, 0.72) 100%);
}

.page-hero .hero-inner {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
  padding: clamp(6rem, 12vh, 8rem) 0 clamp(3rem, 7vh, 4.5rem);
  color: var(--white);
}

.page-hero .eyebrow {
  color: var(--orange-bright);
}

.page-hero .eyebrow::before {
  background: var(--orange-bright);
}

.page-hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  color: var(--white);
  margin: 1rem 0 0.9rem;
  max-width: 16ch;
  text-wrap: balance;
}

.page-hero p {
  max-width: 54ch;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
}

/* --------------------------------------------------------------------------
   Cards & media
   -------------------------------------------------------------------------- */
.media-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   CTA band (shared page-bottom call to action)
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--orange-deep) 0%, var(--orange) 55%, #f08a3c 100%);
  color: var(--white);
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.cta-band::before,
.cta-band::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.cta-band::before {
  width: 420px;
  height: 420px;
  top: -180px;
  right: -120px;
}

.cta-band::after {
  width: 300px;
  height: 300px;
  bottom: -150px;
  left: -80px;
}

.cta-band .cta-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-band h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  color: var(--white);
  max-width: 22ch;
  text-wrap: balance;
}

.cta-band p {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 46ch;
}

.cta-band .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.cta-band .btn-ghost {
  border-color: rgba(255, 255, 255, 0.7);
}

.cta-band .btn-white {
  background: var(--white);
  color: var(--orange-deep);
}

.cta-band .btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

/* --------------------------------------------------------------------------
   Scroll-reveal animation
   -------------------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}

.js [data-reveal].revealed {
  opacity: 1;
  transform: none;
}

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

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-center {
  text-align: center;
}

@media (max-width: 640px) {
  .container,
  .container-wide,
  .page-hero .hero-inner {
    width: calc(100% - 2.5rem);
  }

  .btn {
    width: 100%;
  }

  .cta-band .cta-actions {
    width: 100%;
    flex-direction: column;
  }
}
