/* ==========================================================================
   Earth Blocks India — design tokens + custom styles
   (Tailwind Play CDN handles utilities; this file holds tokens & extras)
   ========================================================================== */

:root {
  --cream:      #F7F3EC;
  --cream-2:    #FBF8F2;
  --sand:       #D4C4A8;
  --terracotta: #C67B5C;
  --clay:       #9A3412;
  --clay-700:   #7C2D12;
  --olive:      #6B7B3C;
  --ink:        #1C1917;
  --ink-soft:   #44403C;
  --muted:      #78716C;
  --gold:       #A16207;
  --border:     #E7DFD2;

  --shadow-soft: 0 8px 32px rgba(28, 25, 23, .06);
  --shadow-lift: 0 14px 40px rgba(28, 25, 23, .10);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  background-color: var(--cream);
  color: var(--ink-soft);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .font-display {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: var(--ink);
}

/* Very light natural grain layered behind the page. Kept subtle. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ---------- Accessibility: visible focus ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--clay);
  color: var(--cream);
  padding: .65rem 1rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-link {
  position: relative;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .95rem;
  padding: .35rem 0;
  transition: color .2s ease;
}
.nav-link:hover { color: var(--clay); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--clay);
  transition: width .25s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link.is-active { color: var(--clay); }
.nav-link.is-active::after { width: 100%; }

/* Mobile menu */
.mobile-menu { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.mobile-menu.open { max-height: 420px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .95rem;
  padding: .8rem 1.6rem;
  border-radius: 9999px;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--clay); color: var(--cream); box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--clay-700); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-outline { border-color: var(--clay); color: var(--clay); background: transparent; }
.btn-outline:hover { background: var(--clay); color: var(--cream); transform: translateY(-2px); }
.btn-ghost { border-color: var(--border); color: var(--ink); background: var(--cream-2); }
.btn-ghost:hover { border-color: var(--clay); color: var(--clay); }

/* ---------- Cards ---------- */
.card {
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

/* Small serif eyebrow / kicker */
.kicker {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--gold);
}

.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--sand), transparent); }

/* ---------- Hero carousel ---------- */
.hero-slide {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s ease, transform .8s ease;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; transform: translateY(0); pointer-events: auto; }

.hero-dot {
  width: 11px; height: 11px;
  border-radius: 9999px;
  background: rgba(247, 243, 236, .45);
  border: 1px solid rgba(247, 243, 236, .7);
  transition: all .3s ease;
  cursor: pointer;
}
.hero-dot.active { background: var(--cream); width: 30px; }

/* ---------- Accordion ---------- */
.accordion-item { border: 1px solid var(--border); border-radius: 14px; background: var(--cream-2); overflow: hidden; }
.accordion-item + .accordion-item { margin-top: .85rem; }
.accordion-trigger {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  font-family: "Playfair Display", serif;
  font-size: 1.12rem;
  color: var(--ink);
  cursor: pointer;
  background: transparent;
}
.accordion-trigger:hover { color: var(--clay); }
.accordion-icon { flex: none; transition: transform .3s ease; color: var(--clay); }
.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(45deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.accordion-panel-inner { padding: 0 1.35rem 1.3rem; color: var(--ink-soft); }
.accordion-panel-inner ul { list-style: disc; padding-left: 1.3rem; margin-top: .6rem; }
.accordion-panel-inner li { margin: .3rem 0; }
.accordion-panel-inner p + p { margin-top: .8rem; }

/* ---------- Gallery + Lightbox ---------- */
.gallery-grid { columns: 1; column-gap: 1rem; }
@media (min-width: 640px) { .gallery-grid { columns: 2; } }
@media (min-width: 1024px) { .gallery-grid { columns: 3; } }
.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  cursor: zoom-in;
  display: block;
  background: var(--cream-2);
}
.gallery-item img { width: 100%; display: block; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.04); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(28, 25, 23, .9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(247,243,236,.12);
  border: 1px solid rgba(247,243,236,.3);
  color: var(--cream);
  width: 46px; height: 46px;
  border-radius: 9999px;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(247,243,236,.28); }
.lightbox-close { top: 1.25rem; right: 1.25rem; }
.lightbox-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox-caption { position: absolute; bottom: 1.25rem; left: 0; right: 0; text-align: center; color: var(--cream); font-size: .9rem; opacity: .85; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #E7DFD2; }
.site-footer a { color: #E7DFD2; transition: color .2s ease; }
.site-footer a:hover { color: var(--terracotta); }

/* ---------- Misc content helpers ---------- */
.prose-block p + p { margin-top: 1rem; }
.spec-list li { display: flex; gap: .6rem; align-items: flex-start; }

/* ==========================================================================
   VISUAL ELEVATION (v2) — cinematic photography, immersion, motion, polish
   ========================================================================== */

/* ---------- Transparent header over hero → solid on scroll ---------- */
body[data-transparent-header] { padding-top: 0; }
body[data-transparent-header] .site-header {
  position: fixed;
  left: 0; right: 0; top: 0;
  background: linear-gradient(to bottom, rgba(28,15,8,.38), rgba(28,15,8,0));
  backdrop-filter: none;
  border-bottom-color: transparent;
  transition: background .4s ease, border-color .4s ease, backdrop-filter .4s ease;
}
body[data-transparent-header] .site-header .nav-link { color: rgba(247,243,236,.92); }
body[data-transparent-header] .site-header .nav-link:hover,
body[data-transparent-header] .site-header .nav-link.is-active { color: #fff; }
body[data-transparent-header] .site-header .nav-link::after { background: var(--cream); }
body[data-transparent-header] .site-header #navToggle {
  color: var(--cream);
  border-color: rgba(247,243,236,.45);
}
body[data-transparent-header] .site-header .site-logo {
  filter: brightness(0) invert(1);
  transition: filter .4s ease;
}

body[data-transparent-header] .site-header.is-solid {
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--border);
  box-shadow: 0 6px 24px rgba(28,25,23,.06);
}
body[data-transparent-header] .site-header.is-solid .nav-link { color: var(--ink-soft); }
body[data-transparent-header] .site-header.is-solid .nav-link:hover,
body[data-transparent-header] .site-header.is-solid .nav-link.is-active { color: var(--clay); }
body[data-transparent-header] .site-header.is-solid #navToggle {
  color: var(--ink);
  border-color: var(--border);
}
body[data-transparent-header] .site-header.is-solid .site-logo { filter: none; }
/* Mobile menu open: force legible solid chrome regardless of scroll */
body[data-transparent-header] .site-header.menu-open {
  background: color-mix(in srgb, var(--cream) 96%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--border);
}
body[data-transparent-header] .site-header.menu-open .nav-link { color: var(--ink-soft); }
body[data-transparent-header] .site-header.menu-open .nav-link.is-active { color: var(--clay); }
body[data-transparent-header] .site-header.menu-open #navToggle { color: var(--ink); border-color: var(--border); }
body[data-transparent-header] .site-header.menu-open .site-logo { filter: none; }
/* Belt-and-suspenders: the open dropdown panel is always a solid, legible surface */
body[data-transparent-header] .site-header .mobile-menu.open {
  background: var(--cream);
  border-radius: 0 0 14px 14px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  margin-left: -1.25rem;
  margin-right: -1.25rem;
}
body[data-transparent-header] .site-header .mobile-menu.open .nav-link { color: var(--ink-soft) !important; }
body[data-transparent-header] .site-header .mobile-menu.open .nav-link.is-active { color: var(--clay) !important; }

/* ---------- Cinematic hero ---------- */
.hero-shell { min-height: 100svh; }
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.6s ease, transform 8s ease-out;
  will-change: opacity, transform;
}
.hero-bg-img.active { opacity: 1; transform: scale(1.14); }
/* Warm dark-clay scrim for legibility */
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(43,20,9,.86) 0%, rgba(43,20,9,.30) 45%, rgba(43,20,9,.55) 100%),
    linear-gradient(105deg, rgba(43,20,9,.72), rgba(43,20,9,.10) 60%);
}
.hero-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 40%, transparent 45%, rgba(28,12,4,.45) 100%);
  pointer-events: none;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%; bottom: 1.75rem;
  transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: .5rem;
  color: rgba(247,243,236,.8);
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
}
.scroll-cue .mouse {
  width: 22px; height: 34px; border: 1.5px solid rgba(247,243,236,.55);
  border-radius: 12px; position: relative;
}
.scroll-cue .mouse::after {
  content: ""; position: absolute; left: 50%; top: 7px;
  width: 3px; height: 7px; border-radius: 2px; background: rgba(247,243,236,.85);
  transform: translateX(-50%);
  animation: cueScroll 1.8s ease-in-out infinite;
}
@keyframes cueScroll { 0%,100% { opacity: 0; transform: translate(-50%,0);} 50% { opacity: 1; transform: translate(-50%,8px);} }

/* ---------- Photographic media treatment ---------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  background: var(--cream-2);
}
.media img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.media-hover:hover img { transform: scale(1.035); }
.media-hover { transition: box-shadow .4s ease; }
.media-hover:hover { box-shadow: var(--shadow-lift); }
/* Warm scrim variants (never gray) */
.scrim-clay::after, .scrim-olive::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
}
.scrim-clay::after { background: linear-gradient(to top, rgba(60,28,13,.55), rgba(60,28,13,.05) 55%); }
.scrim-olive::after { background: linear-gradient(140deg, rgba(53,61,30,.42), rgba(60,28,13,.12) 60%); }

/* ---------- Full-bleed immersive photo band ---------- */
.photo-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.photo-band .band-media { position: absolute; inset: 0; overflow: hidden; z-index: -2; }
.photo-band .band-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: transform;
}
.photo-band .band-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to right, rgba(43,20,9,.78) 0%, rgba(43,20,9,.38) 55%, rgba(43,20,9,.62) 100%);
}

/* ---------- Home showcase strip ---------- */
.showcase-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  background: var(--cream-2);
}
.showcase-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.showcase-tile:hover img { transform: scale(1.06); }
.showcase-tile .tile-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.4rem 1.15rem .95rem;
  color: var(--cream);
  font-size: .92rem; font-weight: 500;
  background: linear-gradient(to top, rgba(43,20,9,.82), rgba(43,20,9,0));
  transform: translateY(6px);
  opacity: .96;
  transition: transform .4s ease, opacity .4s ease;
}
.showcase-tile:hover .tile-cap { transform: translateY(0); opacity: 1; }

/* ---------- Why-choose refined cards ---------- */
.why-card {
  position: relative;
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.9rem 1.6rem;
  box-shadow: var(--shadow-soft);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  overflow: hidden;
}
.why-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--clay), var(--olive));
  opacity: 0; transition: opacity .35s ease;
}
.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--clay) 30%, var(--border)); }
.why-card:hover::before { opacity: 1; }
.why-num {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem; font-weight: 600;
  color: var(--clay);
}
.why-ico { color: var(--olive); flex: none; }

/* ---------- Editorial benefits list ---------- */
.benefit-row {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: .9rem 0;
  border-bottom: 1px solid var(--border);
}
.benefit-row:last-child { border-bottom: 0; }
.benefit-row .dot {
  margin-top: .55rem; width: 7px; height: 7px; border-radius: 9999px;
  background: var(--olive); flex: none;
}

/* ---------- Slim page hero bands ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; }
.page-hero .ph-media { position: absolute; inset: 0; overflow: hidden; z-index: -2; }
.page-hero .ph-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.page-hero .ph-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(120deg, rgba(43,20,9,.82) 0%, rgba(43,20,9,.5) 55%, rgba(53,61,30,.55) 100%);
}

/* ---------- Gallery: hover captions + polish ---------- */
.gallery-item { position: relative; }
.gallery-item .g-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.5rem 1rem .9rem;
  color: var(--cream);
  font-size: .88rem; font-weight: 500;
  background: linear-gradient(to top, rgba(43,20,9,.85), rgba(43,20,9,0));
  opacity: 0; transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}
.gallery-item:hover .g-cap,
.gallery-item:focus-visible .g-cap { opacity: 1; transform: translateY(0); }

/* Larger, smoother lightbox */
.lightbox { background: rgba(20,12,6,.94); backdrop-filter: blur(6px); padding: 2rem; }
.lightbox img {
  max-width: 94vw; max-height: 90vh; border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  opacity: 0; transform: scale(.97);
  transition: opacity .35s ease, transform .35s ease;
}
.lightbox.open img { opacity: 1; transform: scale(1); }
.lightbox-caption { font-size: .95rem; letter-spacing: .02em; }

/* ---------- Blog featured post ---------- */
.featured-post { position: relative; overflow: hidden; border-radius: 24px; }
.featured-post .fp-media { position: relative; overflow: hidden; }
.featured-post .fp-media img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.featured-post:hover .fp-media img { transform: scale(1.04); }

/* ---------- Contact icons emphasis ---------- */
.contact-hero-band { position: relative; overflow: hidden; isolation: isolate; }

/* ---------- Parallax ---------- */
[data-parallax] { will-change: transform; }

/* ---------- Section eyebrow divider ---------- */
.eyebrow-rule { display: inline-flex; align-items: center; gap: .8rem; }
.eyebrow-rule::before { content: ""; width: 34px; height: 1px; background: var(--clay); opacity: .6; }

/* Reduced motion: disable all transitions/animations & reveal offsets */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-slide { transition: opacity .001ms; }
  .hero-bg-img.active { transform: scale(1.08); }
  .scroll-cue .mouse::after { animation: none; opacity: .85; }
  [data-parallax] { transform: none !important; }
}
