/* ==========================================================================
   DHRIVYAM — DAIRY AND FOODS  |  Coming Soon
   Palette sampled directly from the official Dhrivyam logo.
   ========================================================================== */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Brand colors extracted from the logo */
  --c-blue-deep:   #001B5C;   /* darkest royal blue (wordmark shade)   */
  --c-blue:        #002A80;   /* primary royal blue (wordmark)         */
  --c-blue-mid:    #0153B0;   /* mid blue (water swirls)               */
  --c-aqua:        #00A0F0;   /* fresh water blue                      */
  --c-aqua-bright: #2DB5FB;   /* bright sky blue (splashes)            */
  --c-aqua-soft:   #D9EEFC;   /* tinted aqua for halos                 */
  --c-green-deep:  #066201;   /* deep leaf green                       */
  --c-green:       #086802;   /* tagline green                         */
  --c-green-bright:#4DA201;   /* bright leaf green                     */
  --c-gold:        #FECB2B;   /* sunrise yellow (accent only)          */

  /* Neutrals */
  --c-bg:      #F7FBF8;
  --c-surface: #FFFFFF;
  --c-ink:     #0B1F4B;      /* headline ink (blue-tinted)            */
  --c-body:    #46536B;      /* supporting copy                       */
  --c-line:    rgba(0, 42, 128, 0.12);

  /* Type */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:    "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Elevation */
  --shadow-card: 0 22px 44px -24px rgba(0, 27, 92, 0.28),
                 0 2px 6px rgba(0, 42, 128, 0.05),
                 inset 0 1px 0 #FFFFFF;
  --shadow-pill: 0 12px 26px -14px rgba(0, 27, 92, 0.30);

  --radius-card: 18px;
  --radius-pill: 999px;

  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  font-family: var(--font-body);
  color: var(--c-body);
  background: linear-gradient(180deg, #FFFFFF 0%, var(--c-bg) 42%, #F1F8F3 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection {
  background: rgba(45, 181, 251, 0.28);
  color: var(--c-blue-deep);
}

.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;
}

/* ---------- 3. AMBIENT BACKGROUND ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Soft layered glows: sunlight, water, greenery */
.bg__glow {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.bg__glow--gold {
  top: -14vmin;
  left: calc(50% - 34vmin);
  width: 68vmin;
  height: 68vmin;
  background: radial-gradient(closest-side, rgba(254, 203, 43, 0.22), rgba(254, 203, 43, 0) 72%);
  animation: drift-a 26s var(--ease-soft) infinite alternate;
}

.bg__glow--blue {
  top: 12vh;
  left: calc(50% - 48vmin);
  width: 96vmin;
  height: 96vmin;
  background: radial-gradient(closest-side, rgba(0, 160, 240, 0.13), rgba(0, 160, 240, 0) 70%);
  animation: drift-b 34s var(--ease-soft) infinite alternate;
}

.bg__glow--green {
  top: 34vh;
  left: -26vmin;
  width: 74vmin;
  height: 74vmin;
  background: radial-gradient(closest-side, rgba(77, 162, 1, 0.11), rgba(77, 162, 1, 0) 70%);
  animation: drift-a 38s var(--ease-soft) infinite alternate-reverse;
}

.bg__glow--aqua {
  bottom: -22vmin;
  right: -24vmin;
  width: 80vmin;
  height: 80vmin;
  background: radial-gradient(closest-side, rgba(45, 181, 251, 0.14), rgba(45, 181, 251, 0) 70%);
  animation: drift-b 30s var(--ease-soft) infinite alternate-reverse;
}

/* Floating leaf motifs */
.bg__leaf {
  position: absolute;
  color: var(--c-green-bright);
  will-change: transform;
}

.bg__leaf--1 {
  top: 13%;
  left: 6%;
  width: 104px;
  opacity: 0.08;
  --rot: -18deg;
  animation: leaf-float 16s ease-in-out infinite alternate;
}

.bg__leaf--2 {
  top: 30%;
  right: 7%;
  width: 74px;
  opacity: 0.07;
  --rot: 26deg;
  animation: leaf-float 20s ease-in-out infinite alternate-reverse;
}

.bg__leaf--3 {
  bottom: 20%;
  left: 11%;
  width: 56px;
  opacity: 0.06;
  --rot: 42deg;
  animation: leaf-float 24s ease-in-out infinite alternate;
}

/* Flowing milk / water waves along the base */
.bg__waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(180px, 30vh, 320px);
}

/* ---------- 4. HERO ---------- */
.hero {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 7vh, 84px) 24px clamp(44px, 6vh, 72px);
}

.hero__inner {
  width: min(880px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ----- Brand lockup ----- */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
}

/* Warm sunlight halo + concentric water rings behind the logo */
.brand__halo {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(254, 203, 43, 0.20), rgba(254, 203, 43, 0) 72%);
}

.brand__halo::before,
.brand__halo::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.brand__halo::before {
  inset: 9%;
  border: 1px solid rgba(0, 42, 128, 0.08);
}

.brand__halo::after {
  inset: 21%;
  border: 1px solid rgba(0, 160, 240, 0.12);
}

.brand__logo {
  position: relative;
  width: clamp(188px, 30vw, 280px);
  height: auto;
  filter: drop-shadow(0 20px 32px rgba(0, 42, 128, 0.16));
}

.brand__name {
  margin-top: clamp(18px, 3vh, 30px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.7rem, 6.6vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: var(--c-blue);
}

/* Subtle vertical blue gradient on the wordmark, echoing the logo */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand__name {
    background: linear-gradient(180deg, var(--c-blue-mid) 0%, var(--c-blue) 52%, var(--c-blue-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.brand__tagline {
  margin-top: clamp(10px, 1.6vh, 16px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 20px);
  font-weight: 700;
  font-size: clamp(0.86rem, 2vw, 1.05rem);
  letter-spacing: 0.2em;
  color: var(--c-green);
}

.brand__tagline::before,
.brand__tagline::after {
  content: "";
  width: clamp(28px, 6vw, 58px);
  height: 2px;
  border-radius: 2px;
}

.brand__tagline::before {
  background: linear-gradient(90deg, rgba(8, 104, 2, 0), rgba(8, 104, 2, 0.55));
}

.brand__tagline::after {
  background: linear-gradient(90deg, rgba(8, 104, 2, 0.55), rgba(8, 104, 2, 0));
}

/* ----- Launch message ----- */
.launch {
  margin-top: clamp(32px, 5vh, 54px);
  max-width: 800px;
}

.launch__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(8, 104, 2, 0.18);
  box-shadow: 0 8px 20px -10px rgba(6, 98, 1, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-green-deep);
}

.launch__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-gold);
  animation: pulse-gold 2.6s ease-out infinite;
}

.launch__headline {
  margin-top: clamp(18px, 2.8vh, 26px);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.15rem, 5.4vw, 3.9rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  text-wrap: balance;
}

.launch__headline em {
  font-style: italic;
  color: var(--c-green-deep);
  background: linear-gradient(180deg, transparent 68%, rgba(254, 203, 43, 0.30) 68%, rgba(254, 203, 43, 0.30) 94%, transparent 94%);
  padding: 0 0.08em;
}

.launch__copy {
  margin: clamp(14px, 2.2vh, 20px) auto 0;
  max-width: 54ch;
  font-size: clamp(1rem, 1.5vw, 1.13rem);
  font-weight: 500;
  line-height: 1.75;
  color: var(--c-body);
}

/* ---------- 5. COUNTDOWN ---------- */
.countdown {
  margin-top: clamp(34px, 5.4vh, 58px);
  width: min(680px, 100%);
}

.countdown__overline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(0, 42, 128, 0.55);
}

.countdown__overline::before,
.countdown__overline::after {
  content: "";
  width: clamp(26px, 5vw, 46px);
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 42, 128, 0), rgba(0, 42, 128, 0.28));
}

.countdown__overline::after {
  background: linear-gradient(90deg, rgba(0, 42, 128, 0.28), rgba(0, 42, 128, 0));
}

.countdown__grid {
  margin-top: clamp(16px, 2.4vh, 22px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 18px);
}

.count-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: clamp(18px, 2.8vw, 28px) 6px clamp(15px, 2.3vw, 21px);
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FBFF 100%);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* Thin brand-colored accent hairline, one hue per unit */
.count-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 3px;
  border-radius: 0 0 4px 4px;
}

.count-card:nth-child(1)::before { background: linear-gradient(90deg, var(--c-blue-mid), var(--c-blue)); }
.count-card:nth-child(2)::before { background: linear-gradient(90deg, var(--c-aqua-bright), var(--c-aqua)); }
.count-card:nth-child(3)::before { background: linear-gradient(90deg, var(--c-green-bright), var(--c-green)); }
.count-card:nth-child(4)::before { background: linear-gradient(90deg, #FFE082, var(--c-gold)); }

.count-card__value {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(2.05rem, 6.4vw, 3.3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--c-blue);
}

.count-card__value.tick {
  animation: tick 0.38s var(--ease-soft);
}

.count-card__label {
  font-size: clamp(0.6rem, 1.4vw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(70, 83, 107, 0.78);
}

/* ----- "We are live" state ----- */
.countdown__live {
  padding: 8px 0 4px;
  text-align: center;
  animation: rise 0.9s var(--ease-soft) both;
}

.countdown__live[hidden] {
  display: none;
}

.countdown.is-live .countdown__grid,
.countdown.is-live .countdown__overline {
  display: none;
}

.countdown__live-title {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.9rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-green-deep);
}

.countdown__live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-green-bright);
  animation: pulse-green 2.2s ease-out infinite;
}

.countdown__live-copy {
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-body);
}

/* ---------- 6. SOCIAL BUTTONS ---------- */
.social {
  margin-top: clamp(30px, 5vh, 50px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.social__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-pill);
  color: var(--c-blue);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.35s var(--ease-soft),
              box-shadow 0.35s var(--ease-soft),
              border-color 0.35s var(--ease-soft),
              background-color 0.35s var(--ease-soft);
}

.social__btn i {
  font-size: 1.15rem;
  line-height: 1;
}

.social__btn--instagram i { color: var(--c-blue-mid); }
.social__btn--whatsapp  i { color: var(--c-green); }

.social__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -16px rgba(0, 27, 92, 0.38);
  border-color: rgba(0, 42, 128, 0.30);
  background-color: #FBFDFF;
}

.social__btn--whatsapp:hover {
  border-color: rgba(8, 104, 2, 0.30);
  background-color: #FBFFFA;
}

.social__btn:active {
  transform: translateY(-1px);
}

.social__btn:focus-visible {
  outline: 2px solid var(--c-aqua);
  outline-offset: 3px;
}

/* ---------- 7. FOOTER ---------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 26px 20px calc(26px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(0, 42, 128, 0.08);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(70, 83, 107, 0.78);
}

/* ---------- 8. ENTRANCE & AMBIENT ANIMATION ---------- */
.reveal {
  opacity: 0;
  animation: rise 1s var(--ease-soft) forwards;
}

.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.20s; }
.d3 { animation-delay: 0.34s; }
.d4 { animation-delay: 0.50s; }
.d5 { animation-delay: 0.62s; }
.d6 { animation-delay: 0.76s; }
.d7 { animation-delay: 0.92s; }
.d8 { animation-delay: 1.08s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes tick {
  from { opacity: 0.15; transform: translateY(8px); }
  to   { opacity: 1;    transform: translateY(0); }
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.08); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to   { transform: translate3d(-4%, -2%, 0) scale(1); }
}

@keyframes leaf-float {
  from { transform: rotate(var(--rot, 0deg)) translateY(0); }
  to   { transform: rotate(calc(var(--rot, 0deg) + 6deg)) translateY(-16px); }
}

@keyframes pulse-gold {
  0%   { box-shadow: 0 0 0 0 rgba(254, 203, 43, 0.45); }
  70%  { box-shadow: 0 0 0 9px rgba(254, 203, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(254, 203, 43, 0); }
}

@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(77, 162, 1, 0.40); }
  70%  { box-shadow: 0 0 0 10px rgba(77, 162, 1, 0); }
  100% { box-shadow: 0 0 0 0 rgba(77, 162, 1, 0); }
}

/* ---------- 9. RESPONSIVE ---------- */

/* Large desktops */
@media (min-width: 1600px) {
  .brand__logo { width: 300px; }
  .countdown { width: 720px; }
}

/* Short viewports (laptops, landscape tablets) — tighten vertical rhythm */
@media (max-height: 820px) and (min-width: 561px) {
  .hero { padding-top: 40px; padding-bottom: 40px; }
  .brand__logo { width: clamp(170px, 22vw, 215px); }
  .brand__name { margin-top: 14px; font-size: clamp(2.2rem, 4.6vw, 3rem); }
  .brand__tagline { margin-top: 8px; }
  .launch { margin-top: 26px; }
  .launch__headline { font-size: clamp(1.85rem, 4.2vw, 2.85rem); }
  .launch__copy { margin-top: 12px; }
  .countdown { margin-top: 28px; }
  .social { margin-top: 26px; }
}

/* Tablets */
@media (max-width: 1024px) {
  .hero { padding-left: 22px; padding-right: 22px; }
  .bg__leaf--1 { width: 88px; }
}

@media (max-width: 768px) {
  .bg__waves { height: 200px; }
  .bg__leaf--2 { display: none; }
  .launch__copy { max-width: 46ch; }
}

/* Large phones — countdown becomes a clean 2x2 grid */
@media (max-width: 560px) {
  .hero { padding-left: 18px; padding-right: 18px; }
  .countdown__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .count-card { border-radius: 16px; }
  .social__btn { padding: 11px 22px; font-size: 0.92rem; }
  .brand__tagline { letter-spacing: 0.16em; }
}

/* Small phones */
@media (max-width: 400px) {
  .hero { padding-left: 14px; padding-right: 14px; }
  .brand__logo { width: clamp(160px, 52vw, 200px); }
  .brand__name { font-size: 2.35rem; }
  .countdown__grid { gap: 9px; }
  .count-card { padding: 15px 4px 13px; }
  .count-card__value { font-size: 1.9rem; }
  .count-card__label { font-size: 0.58rem; letter-spacing: 0.18em; }
  .launch__eyebrow { padding: 8px 16px; letter-spacing: 0.24em; }
  .social { gap: 10px; }
  .social__btn { padding: 11px 18px; }
  .bg__leaf--1 { width: 64px; }
  .bg__leaf--3 { display: none; }
}

@media (max-width: 330px) {
  .brand__name { font-size: 2.05rem; }
  .count-card__value { font-size: 1.65rem; }
  .brand__tagline { letter-spacing: 0.12em; gap: 10px; }
  .countdown__overline { letter-spacing: 0.24em; }
}

/* ---------- 10. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal { opacity: 1; animation: none; }
  .bg__glow, .bg__leaf { animation: none; }
  .launch__dot, .countdown__live-dot { animation: none; }
}
