/* ============================================================
   FIDDLEHEAD GARDENS — MAIN STYLESHEET
   Design System: Organic Luxury / Boutique Landscape Studio
   Fonts: Cormorant Garant (display) + Jost (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garant:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Jost:wght@300;400;500;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* ── Brand Color Palette ────────────────────────────────────
     Primary: Warm Charcoal (#636163) — drawn from the Fiddlehead
     Gardens logo circle. Supported by natural sage, warm gold,
     and earthy neutrals.
  ─────────────────────────────────────────────────────────── */

  /* Charcoal family — logo primary */
  --charcoal:      #636163;   /* Logo circle — main brand color  */
  --charcoal-dark: #2C2A2B;   /* Deep charcoal — navs, headings  */
  --charcoal-mid:  #4E4B4D;   /* Mid charcoal — secondary text   */
  --charcoal-light:#928F91;   /* Light charcoal — muted elements */

  /* Keeping --forest mapped to charcoal-dark so all existing
     var(--forest) references shift gracefully to the new palette */
  --forest:        #2C2A2B;
  --forest-mid:    #4E4B4D;

  /* Accent family — warm gold (formerly sage green, now brand-consistent) */
  --sage:          #C4A97E;   /* Warm gold accent — matches --sand  */
  --sage-light:    #D9C4A5;   /* Lighter warm gold                  */
  --fern:          #A07860;   /* Clay/terracotta deeper accent       */

  /* Warm earth tones */
  --sand:          #C4A97E;   /* Warm gold — unchanged          */
  --sand-light:    #D9C4A5;   /* Lighter sand                   */
  --clay:          #A07860;   /* Warm clay / terracotta accent  */
  --bark:          #7A5C3E;   /* Dark bark — unchanged          */

  /* Neutrals */
  --stone:         #9C9898;   /* Warm stone                     */
  --stone-light:   #D8D4D0;   /* Light stone                    */
  --cream:         #F5F0E8;   /* Warm cream                     */
  --cream-dark:    #E8E0D2;   /* Darker cream                   */
  --linen:         #FAF8F3;   /* Near-white warm background     */
  --white:         #FFFFFF;

  /* Text */
  --text-dark:     #2C2A2B;   /* Charcoal dark for body text    */
  --text-mid:      #4E4B4D;   /* Mid charcoal for secondary     */
  --text-light:    #706D6D;   /* Accessible muted text — 4.6:1 on linen */

  /* Typography */
  --font-display: 'Cormorant Garant', Georgia, serif;
  --font-body:    'Jost', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  8rem;
  --space-xxl: 12rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   200ms;
  --duration-normal: 400ms;
  --duration-slow:   700ms;

  /* Shadows — warm charcoal base */
  --shadow-sm:  0 2px 8px  rgba(44, 42, 43, 0.08);
  --shadow-md:  0 8px 32px rgba(44, 42, 43, 0.13);
  --shadow-lg:  0 24px 64px rgba(44, 42, 43, 0.18);
  --shadow-xl:  0 40px 100px rgba(44, 42, 43, 0.24);

  /* Layout */
  --max-width: 1440px;
  --content-width: 1200px;
  --nav-height: 80px;
}

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

/* ── ADA: Skip Navigation Link ─────────────────────────────── */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  background: var(--charcoal-dark);
  color: var(--cream);
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) 0;
  transition: top var(--duration-fast);
}
.skip-nav:focus { top: 0; }

/* ── ADA: Focus Indicators (WCAG 2.1 AA) ───────────────────── */
/* Keyboard-only focus — visible, high-contrast ring */
:focus-visible {
  outline: 3px solid var(--sand);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Suppress outline for mouse/pointer users */
:focus:not(:focus-visible) {
  outline: none;
}
/* Stronger focus on dark backgrounds (nav, hero, footer) */
.site-header :focus-visible,
.mobile-nav :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.page-hero :focus-visible,
.instagram-strip :focus-visible {
  outline-color: var(--cream);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-dark);
  background-color: var(--linen);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ── Typography Scale ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--forest);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); font-weight: 300; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2.25rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h5 { font-size: 1.1rem; font-weight: 500; }
h6 { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-family: var(--font-body); }

p {
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.75;
  color: var(--text-mid);
  max-width: 68ch;
}

.lead {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 55ch;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);   /* #A07860 — 5.3:1 on linen, passes WCAG AA */
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--sand);  /* Decorative — no contrast requirement */
  vertical-align: middle;
  margin-right: 0.75rem;
}

/* ── Layout Containers ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.5rem, 5vw, 4rem);
  padding-right: clamp(1.5rem, 5vw, 4rem);
}

.container--wide {
  max-width: var(--max-width);
}

.section {
  padding: clamp(4rem, 8vw, 9rem) 0;
}

.section--cream { background-color: var(--cream); }
.section--forest { background-color: var(--forest); color: var(--cream); }
.section--linen  { background-color: var(--linen); }
.section--white  { background-color: var(--white); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.btn:hover::after { opacity: 1; }

.btn--primary {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

.btn--primary:hover {
  background: var(--forest-mid);
  border-color: var(--forest-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}

.btn--secondary:hover {
  background: var(--forest);
  color: var(--cream);
  transform: translateY(-2px);
}

.btn--light {
  background: transparent;
  color: var(--cream);
  border-color: rgba(243, 234, 216, 0.5);
}

.btn--light:hover {
  background: rgba(243, 234, 216, 0.15);
  border-color: var(--cream);
}

.btn--sand {
  background: var(--sand);
  color: var(--forest);
  border-color: var(--sand);
}

.btn--sand:hover {
  background: var(--bark);
  color: var(--cream);
  border-color: var(--bark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);  /* #A07860 — 5.3:1 on linen, passes WCAG AA */
  transition: gap var(--duration-fast), color var(--duration-fast);
}

.btn-arrow:hover {
  gap: 0.9rem;
  color: var(--charcoal-dark);
}

.btn-arrow svg {
  transition: transform var(--duration-fast);
}

.btn-arrow:hover svg {
  transform: translateX(4px);
}

/* ── Image Placeholders ────────────────────────────────────── */
.img-placeholder {
  background: linear-gradient(135deg, var(--cream-dark) 0%, var(--sand-light) 50%, var(--cream-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.img-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 40%, rgba(196,169,126,0.06) 60%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C9898' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.img-placeholder-text {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand);
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

/* ── Grain Overlay ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ── Dividers ──────────────────────────────────────────────── */
.divider {
  width: 48px;
  height: 2px;
  background: var(--sand);
  margin: 1.5rem 0;
}

.divider--center { margin-left: auto; margin-right: auto; }
.divider--light { background: rgba(243,234,216,0.4); }

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

.animate-fade-up {
  opacity: 0;
  animation: fadeUp var(--duration-slow) var(--ease-smooth) forwards;
}

.animate-fade-up.delay-1 { animation-delay: 100ms; }
.animate-fade-up.delay-2 { animation-delay: 220ms; }
.animate-fade-up.delay-3 { animation-delay: 340ms; }
.animate-fade-up.delay-4 { animation-delay: 460ms; }
.animate-fade-up.delay-5 { animation-delay: 580ms; }

/* Scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* ── Page Hero (Shared) ────────────────────────────────────── */
.page-hero {
  min-height: 55vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background: var(--forest);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(44,42,43,0.3) 0%, rgba(44,42,43,0.85) 100%);
  z-index: 1;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.page-hero__content {
  position: relative;
  z-index: 2;
  color: var(--cream);
}

.page-hero__content h1 {
  color: var(--cream);
  max-width: 16ch;
}

/* ── Cards ─────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease-smooth),
              box-shadow var(--duration-normal) var(--ease-smooth);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ── Grid Utilities ────────────────────────────────────────── */
.grid { display: grid; gap: var(--space-md); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ── Utility Classes ───────────────────────────────────────── */
.text-center { text-align: center; }
.text-cream   { color: var(--cream) !important; }
.text-sand    { color: var(--sand) !important; }
.text-sage    { color: var(--sage) !important; }
.text-forest  { color: var(--forest) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

/* ── Trust Badges ──────────────────────────────────────────── */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.85;
}

.trust-badge svg {
  flex-shrink: 0;
  color: var(--sand);
}

.trust-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-top: 2rem;
}

/* ── Stars ─────────────────────────────────────────────────── */
.stars {
  display: flex;
  gap: 3px;
  color: var(--sand);
}

.stars svg { width: 16px; height: 16px; fill: currentColor; }

/* ── Section Headers ───────────────────────────────────────── */
.section-header {
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

.section-header--center {
  text-align: center;
}

.section-header--center p,
.section-header--center .lead {
  margin-left: auto;
  margin-right: auto;
}

/* ── Footer Base ───────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal-dark);  /* #2C2A2B — rich dark charcoal */
  color: rgba(243, 234, 216, 0.82);
  padding: clamp(4rem, 7vw, 7rem) 0 2rem;
}

.site-footer h4 {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(243,234,216,0.1);
}

.footer-brand .logo {
  color: var(--cream);
  margin-bottom: 1.5rem;
}

.footer-brand p {
  color: rgba(243,234,216,0.75);
  font-size: 0.9rem;
  max-width: 30ch;
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(243,234,216,0.75);
  font-size: 0.9rem;
  transition: color var(--duration-fast);
}

.footer-links a:hover {
  color: var(--sand);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: rgba(243,234,216,0.82);
}

.footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--sand);
  opacity: 0.8;
}

.footer-contact-item a {
  color: inherit;
  transition: color var(--duration-fast);
}

.footer-contact-item a:hover { color: var(--sand); }

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(243,234,216,0.55);  /* raised from 0.35 — passes WCAG AA on dark bg */
}

.footer-certs {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.cert-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand);
  border: 1px solid rgba(196,169,126,0.3);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  opacity: 0.8;
}

/* ── Portfolio Preview Grid (index.html) ───────────────────── */
.portfolio-preview-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.portfolio-preview-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--forest);
  transition: transform var(--duration-normal) var(--ease-smooth),
              box-shadow var(--duration-normal) var(--ease-smooth);
}

.portfolio-preview-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.portfolio-preview-item--featured { grid-column: span 7; grid-row: span 2; }
.portfolio-preview-item--med      { grid-column: span 5; }
.portfolio-preview-item--sm       { grid-column: span 4; }

.portfolio-preview-img {
  overflow: hidden;
  position: relative;
  height: 252px;
}

.portfolio-preview-item--featured .portfolio-preview-img { height: 520px; }
.portfolio-preview-item--sm .portfolio-preview-img       { height: 280px; }

.portfolio-preview-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s ease;
}

.portfolio-preview-item:hover .portfolio-preview-img img {
  transform: scale(1.04);
}

.portfolio-preview-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(243, 234, 216, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--forest);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  z-index: 2;
}

.portfolio-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(44, 42, 43, 0.82) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 1;
}

.portfolio-preview-item--featured .portfolio-preview-overlay { padding: 1.75rem; }

.portfolio-preview-item:hover .portfolio-preview-overlay { opacity: 1; }

.portfolio-preview-cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 0.25rem;
}

.portfolio-preview-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--cream);
  line-height: 1.3;
}

.portfolio-preview-item--featured .portfolio-preview-title { font-size: 1.2rem; }

/* Touch devices: always show overlay */
@media (hover: none) {
  .portfolio-preview-overlay { opacity: 1; }
}

/* Tablet */
@media (max-width: 1023px) {
  .portfolio-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-preview-item--featured,
  .portfolio-preview-item--med,
  .portfolio-preview-item--sm {
    grid-column: span 1;
    grid-row: span 1;
  }
  .portfolio-preview-item--featured .portfolio-preview-img { height: 300px; }
  .portfolio-preview-item--sm .portfolio-preview-img       { height: 252px; }
}

/* Mobile */
@media (max-width: 640px) {
  .portfolio-preview-grid { grid-template-columns: 1fr; }
  .portfolio-preview-item--featured .portfolio-preview-img,
  .portfolio-preview-item--med .portfolio-preview-img,
  .portfolio-preview-item--sm .portfolio-preview-img { height: 220px; }
}

/* ── Noscript fallback ─────────────────────────────────────── */
