/* ============================================================
   CADDIE CRAFT — STYLES
   Primary:   #2d5a1b  (forest green)
   Secondary: #111111  (near black) / #ffffff (white)
   Accent:    #c9a84c  (gold)
   ============================================================ */

:root {
  --green:       #2d5a1b;
  --green-dark:  #1e3e12;
  --green-light: #3d7a25;
  --black:       #111111;
  --white:       #ffffff;
  --off-white:   #f5f2ee;
  --gold:        #c9a84c;
  --gold-light:  #e0c06a;
  --gray:        #888888;
  --transition:  0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---- RESET / BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--black);
  color: var(--white);
  overflow: hidden;          /* fullpage scroll handles overflow */
}

img { display: block; max-width: 100%; }
a   { text-decoration: none; color: inherit; }

/* ---- SCREEN READER ONLY (visually hidden but accessible) ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- SKIP LINK ---- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--gold);
  color: var(--black);
  padding: 0.6rem 1.25rem;
  border-radius: 3px;
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  font-weight: bold;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--black);
  outline-offset: 2px;
}

/* ---- GLOBAL FOCUS VISIBLE ---- */
/* Remove default outline, replace with high-contrast custom ring */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
/* On the light (about) section, invert to dark focus ring */
.section-about :focus-visible {
  outline-color: var(--green-dark);
}

/* list resets for semantic lists used in nav/products */
ul[role="list"] { list-style: none; padding: 0; margin: 0; }

/* ============================================================
   FULLPAGE SCROLL
   ============================================================ */
.fp-wrapper {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.fp-wrapper::-webkit-scrollbar { display: none; }

.fp-section {
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  transition: background var(--transition), box-shadow 0.3s;
}

.navbar.scrolled {
  background: rgba(17, 17, 17, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.nav-logo img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);   /* white version on dark bg */
  opacity: 0.92;
  transition: opacity 0.2s;
}
.nav-logo:hover img { opacity: 1; }

/* ---- HAMBURGER ---- */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}
.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.25s ease, width 0.25s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ============================================================
   SIDE MENU
   ============================================================ */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 149;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.menu-overlay.active { opacity: 1; pointer-events: all; }

.side-menu {
  position: fixed;
  top: 0; right: 0;
  width: min(340px, 85vw);
  height: 100dvh;
  background: var(--green-dark);
  z-index: 150;
  display: flex;
  flex-direction: column;
  padding: 5rem 2.5rem 2.5rem;
  transform: translateX(100%);
  transition: transform var(--transition);
  border-left: 3px solid var(--gold);
}
.side-menu.open { transform: translateX(0); }

.menu-close {
  position: absolute;
  top: 1.25rem; right: 1.5rem;
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.menu-close:hover { opacity: 1; }

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-link {
  font-size: 1.35rem;
  font-family: 'Georgia', serif;
  color: var(--white);
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s, padding-left 0.2s;
  letter-spacing: 0.03em;
}
.menu-link:hover  { opacity: 1; color: var(--gold-light); padding-left: 0.5rem; }
.menu-link:last-child { border-bottom: none; }

.menu-shop {
  margin-top: 1rem;
  color: var(--gold);
  font-weight: bold;
  opacity: 1;
}
.menu-shop:hover { color: var(--gold-light); }

.menu-footer {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  border-radius: 3px;
  transition: background 0.25s, color 0.25s, transform 0.2s, box-shadow 0.25s;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-gold {
  background: var(--gold);
  color: var(--black);
}
.btn-gold:hover {
  background: var(--gold-light);
  box-shadow: 0 6px 24px rgba(201,168,76,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.45);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-sm  { padding: 0.55rem 1.25rem; font-size: 0.8rem; }
.btn-lg  { padding: 1rem 2.75rem; font-size: 1.1rem; }

/* ============================================================
   SECTION SHARED
   ============================================================ */
.section-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-inner {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1200px;
  width: 100%;
  padding: 0 2.5rem;
}

.section-inner--center {
  flex-direction: column;
  text-align: center;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: normal;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.section-hero {
  background: var(--green-dark);
  background-image:
    radial-gradient(ellipse at 30% 50%, rgba(61,122,37,0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(30,62,18,0.5) 0%, transparent 60%);
  flex-direction: column;
  text-align: center;
}

/* subtle diagonal stripe texture */
.section-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(0,0,0,0.04) 0px,
    rgba(0,0,0,0.04) 1px,
    transparent 1px,
    transparent 12px
  );
  pointer-events: none;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  z-index: 1;
}

.hero-logo {
  width: min(520px, 80vw);
  filter: brightness(0) invert(1);
  animation: fadeUp 1s ease both;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.06em;
  animation: fadeUp 1s 0.2s ease both;
}

.hero-content .btn {
  animation: fadeUp 1s 0.4s ease both;
}

/* scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}
.scroll-hint svg { width: 18px; height: 18px; }

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.section-about {
  background: var(--off-white);
  color: var(--black);
}

.about-text { flex: 1; min-width: 280px; }
.about-text h2 { color: var(--green); }
.about-text .section-label { color: var(--green); }

.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 1rem;
}
.about-text .btn-outline {
  border-color: var(--green);
  color: var(--green);
  margin-top: 0.5rem;
}
.about-text .btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.about-visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 260px;
}

.about-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.07);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.about-card-icon {
  font-size: 1.75rem;
  color: var(--green);
  flex-shrink: 0;
}
.about-card h3 {
  font-size: 1rem;
  color: var(--green-dark);
  margin-bottom: 0.3rem;
}
.about-card p { font-size: 0.9rem; color: #555; line-height: 1.5; }

/* ============================================================
   PRODUCTS SECTION
   ============================================================ */
.section-products {
  background: var(--black);
  color: var(--white);
}

.section-products h2 {
  color: var(--white);
  margin-bottom: 2.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  max-width: 1100px;
  margin-bottom: 2.5rem;
}

.product-card {
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 12px 40px rgba(201,168,76,0.15);
}

.product-card--featured {
  border-color: var(--gold);
  background: #1e1e1e;
}

.product-badge {
  position: absolute;
  top: -0.6rem;
  background: var(--gold);
  color: var(--black);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  font-family: sans-serif;
  font-weight: 700;
}

.product-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #1e3e12 0%, #2d5a1b 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: rgba(255,255,255,0.25);
  margin-bottom: 0.5rem;
}

.product-card h3 {
  font-size: 1.1rem;
  color: var(--white);
}
.product-card p {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.5;
  flex: 1;
}

/* ============================================================
   SHOP CTA SECTION
   ============================================================ */
.section-shop {
  background: var(--green-dark);
  background-image:
    radial-gradient(ellipse at center, rgba(61,122,37,0.35) 0%, transparent 65%);
  flex-direction: column;
  justify-content: space-between;
  padding-top: 0;
}

.shop-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding: 0 2rem;
  flex: 1;
  justify-content: center;
}

.shop-cta-inner h2 { color: var(--white); margin-bottom: 0; }
.shop-cta-inner p  { color: rgba(255,255,255,0.7); font-size: 1.1rem; max-width: 520px; }

.shop-divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0.25rem auto;
}

.shop-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
}

/* ---- FOOTER ---- */
.site-footer {
  width: 100%;
  background: rgba(0,0,0,0.4);
  padding: 1.25rem 2.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer-logo {
  height: 28px;
  filter: brightness(0) invert(1);
  opacity: 0.6;
}
.site-footer p { font-size: 0.8rem; color: rgba(255,255,255,0.35); }
.footer-nav { display: flex; gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.footer-nav a { font-size: 0.8rem; color: rgba(255,255,255,0.45); transition: color 0.2s; }
.footer-nav a:hover { color: var(--gold); }

/* ============================================================
   DOT NAVIGATION
   ============================================================ */
.dot-nav {
  position: fixed;
  right: 0.25rem;       /* pulled in because padding now extends the hit area */
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0;               /* padding on each dot provides the visual spacing */
}

.dot {
  /* Visual dot is 10px, but the clickable/tappable area is 44×44px
     via padding — satisfies WCAG 2.5.5 (44px) and 2.5.8 (24px) */
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: 2px solid rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 17px;           /* expands hit area to 10 + 17×2 = 44px */
  box-sizing: content-box; /* keep padding outside the visual 10px dot */
  transition: background 0.3s, transform 0.3s, border-color 0.3s;
}
.dot.active {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.35);
}
.dot:hover:not(.active) {
  background: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.8);
}

/* dots on light section (about) */
body.section-light .dot         { background: rgba(0,0,0,0.2); border-color: rgba(0,0,0,0.3); }
body.section-light .dot.active  { background: var(--gold); border-color: var(--gold); }
body.section-light .dot:hover:not(.active) { background: rgba(0,0,0,0.4); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .section-inner {
    flex-direction: column;
    gap: 2rem;
    padding: 5rem 1.5rem 1.5rem;
    align-items: flex-start;
    overflow-y: auto;
  }
  .about-visual { flex-direction: row; flex-wrap: wrap; }
  .about-card   { flex: 1 1 200px; }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 1rem;
  }
  .product-card:last-child { display: none; }

  .section-inner--center {
    align-items: center;
    padding-top: 5rem;
  }

  .dot-nav { display: none; }

  .section-shop { justify-content: flex-start; padding-top: 4rem; }
  .shop-cta-inner { padding-top: 2rem; }
}

@media (max-width: 600px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card:last-child { display: flex; }
  .hero-logo { width: min(320px, 85vw); }
  .navbar { padding: 0.75rem 1.25rem; }
  h2 { font-size: 1.75rem; }
  .footer-inner { flex-direction: column; text-align: center; gap: 0.75rem; }
}

/* ============================================================
   REDUCED MOTION
   Disable all animations and smooth scroll for users who
   prefer reduced motion (vestibular disorders, epilepsy, etc.)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .fp-wrapper { scroll-snap-type: none; }
  .hero-logo,
  .hero-tagline,
  .hero-content .btn { animation: none; }
  .scroll-hint { animation: none; }
}

/* ============================================================
   HIGH CONTRAST
   Replaces opacity-dimmed text and semi-transparent surfaces
   with fully opaque values so contrast ratios stay well above
   the WCAG 4.5:1 minimum when the OS forced-colors/high-contrast
   mode is active, or when the user prefers more contrast.
   ============================================================ */
@media (prefers-contrast: more) {
  /* Opacity-based text → fully opaque equivalents */
  .hero-tagline           { color: #ffffff; }
  .shop-cta-inner p       { color: #ffffff; }
  .shop-sub               { color: #cccccc; }
  .site-footer p          { color: #cccccc; }
  .footer-nav a           { color: #cccccc; }
  .about-card p           { color: #111111; }
  .product-card p         { color: #cccccc; }
  .menu-link              { opacity: 1; color: #ffffff; }

  /* Thicker, fully-opaque borders so UI structure is unmistakable */
  .about-card             { border: 2px solid #000000; border-left: 5px solid var(--gold); }
  .product-card           { border: 2px solid #ffffff; }
  .product-card--featured { border: 3px solid var(--gold); }
  .btn-outline            { border: 3px solid currentColor; }
  .side-menu              { border-left: 5px solid var(--gold); }

  /* Semi-transparent backgrounds → solid */
  .site-footer            { background: #000000; }
  .navbar.scrolled        { background: #111111; }

  /* Stronger focus ring */
  :focus-visible {
    outline: 4px solid var(--gold);
    outline-offset: 4px;
  }
  .section-about :focus-visible {
    outline-color: #000000;
    outline-width: 4px;
  }
}

/* For browsers that support forced-colors (Windows High Contrast Mode) */
@media (forced-colors: active) {
  /* Let the OS palette take over for interactive elements */
  .btn, .menu-link, .dot, .hamburger span, .skip-link {
    forced-color-adjust: auto;
  }
  /* Keep the gold accent visible as a highlight color */
  .dot.active, .product-badge, .coming-badge {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
    border-color: Highlight;
  }
}
