/* ================================================
   SYNERGETICA COFFEE — STYLE SYSTEM
   Warm corporate / specialty coffee aesthetic
   ================================================ */

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

:root {
  --bg: #ffffff;
  --bg-warm: #f9f6f1;
  --cream: #faf8f4;
  --text-primary: #2c2418;
  --text-secondary: #8b7355;
  --muted: #999999;
  --border: #eeeeee;
  --accent: #8b7355;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}


/* --- SECTION LABELS & HEADINGS --- */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 3rem;
  max-width: 640px;
}


/* ================================================
   SECTION 1 — HERO
   ================================================ */
.hero {
  position: relative;
  height: 200vh; /* enough room for full animation playback */
  background: var(--bg);
}

.hero__fixed-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 10;
  pointer-events: none;
}

.hero__wordmark {
  position: absolute;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--text-secondary);
  text-transform: uppercase;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 20;
}

.hero__hero-word {
  position: absolute;
  top: 18vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 0.02em;
  opacity: 1;
  transition: opacity 0.4s ease;
  z-index: 20;
}

.hero__title {
  position: absolute;
  top: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  max-width: 900px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 20;
}

.hero__tagline {
  position: absolute;
  top: 22vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  max-width: 700px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 20;
}

.hero__canvas {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -40%);
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: auto;
  z-index: 5;

  /* THE VIGNETTE MASK — generous center, gentle graduated fade */
  -webkit-mask-image: radial-gradient(
    ellipse 70% 60% at 50% 48%,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 25%,
    rgba(0,0,0,0.7) 45%,
    rgba(0,0,0,0.3) 62%,
    rgba(0,0,0,0.08) 78%,
    rgba(0,0,0,0) 92%
  );
  mask-image: radial-gradient(
    ellipse 70% 60% at 50% 48%,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 25%,
    rgba(0,0,0,0.7) 45%,
    rgba(0,0,0,0.3) 62%,
    rgba(0,0,0,0.08) 78%,
    rgba(0,0,0,0) 92%
  );
}

/* Loading indicator */
.hero__loading {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  text-align: center;
  transition: opacity 0.5s ease;
}

.hero__loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.hero__loading-bar {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.hero__loading-fill {
  width: 0%;
  height: 100%;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.hero__loading-text {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}


/* ================================================
   SECTION 2 — ORIGIN
   ================================================ */
.origin {
  position: relative;
  z-index: 20;
  background: var(--bg);
  padding: 6rem 0 8rem;
  margin-top: -1px; /* prevent subpixel gap */
}

/* Soft gradient fade that covers the frozen hero as origin scrolls up */
.origin::before {
  content: '';
  position: absolute;
  top: -150px;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 40%, rgba(255,255,255,1) 100%);
  z-index: 21;
  pointer-events: none;
}

.origin__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.origin__image-placeholder {
  border-radius: 12px;
  overflow: hidden;
  background: var(--cream);
}

.origin__image-placeholder img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.origin__text p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

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

.badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  text-transform: uppercase;
}


/* ================================================
   SECTION 3 — PRODUCTS
   ================================================ */
.products {
  position: relative;
  z-index: 20;
  background: var(--cream);
  padding: 8rem 0;
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.product-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(44, 36, 24, 0.08);
}

.product-card__process {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.product-card__name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.product-card__notes {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Expandable product details */
.product-card {
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.product-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.product-card__details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  margin-top: 0;
}

.product-card.is-open .product-card__details {
  max-height: 300px;
  opacity: 1;
  margin-top: 1rem;
}

.product-card__elevation {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.product-card__description {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.product-card__formats {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

.product-card__toggle {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.product-card.is-open .product-card__toggle::before {
  content: '- ';
}

.product-card.is-open .product-card__toggle {
  color: var(--muted);
}

.products__extras {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}


/* ================================================
   SECTION 4 — CAPABILITIES
   ================================================ */
.capabilities {
  position: relative;
  z-index: 20;
  background: var(--bg);
  padding: 8rem 0;
  text-align: center;
}

.capabilities .section-heading {
  margin-left: auto;
  margin-right: auto;
}

.capabilities__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.stat {
  text-align: center;
}

.stat__number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.stat__unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.capabilities__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.cap-badge {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  background: var(--cream);
  border-radius: 8px;
  text-transform: uppercase;
}


/* ================================================
   SECTION 5 — CTA
   ================================================ */
.cta {
  position: relative;
  z-index: 20;
  background: linear-gradient(180deg, var(--bg-warm) 0%, #f3ede4 100%);
  padding: 8rem 0;
  text-align: center;
}

.cta__heading {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.cta__sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.cta__button {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--text-primary);
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  margin-bottom: 1.5rem;
}

.cta__button:hover {
  background: var(--text-secondary);
  transform: translateY(-2px);
}

.cta__contact {
  font-size: 0.875rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}


/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
  .section-heading {
    font-size: 1.75rem;
  }

  .hero__title {
    font-size: 2.5rem;
  }

  .hero__tagline {
    font-size: 0.875rem;
    padding: 0 1rem;
  }

  .origin__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

  .cta__heading {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2rem;
  }

  .products__grid {
    grid-template-columns: 1fr;
  }

  .capabilities__stats {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .stat__number {
    font-size: 2.5rem;
  }
}
