:root {
  --bg-deep: #29130d;
  --bg-panel: #3a1d10;
  --silhouette: #180a06;
  --gold: #d9a441;
  --gold-dim: #a8813a;
  --chili: #b23a2e;
  --leaf: #5c7a52;
  --parchment: #efe3ce;
  --parchment-dim: #c7b79b;
  --stencil: "Big Shoulders Stencil", "Arial Narrow", sans-serif;
  --serif: "Lora", Georgia, serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --malayalam: "Noto Serif Malayalam", "Lora", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--serif);
  background:
    radial-gradient(ellipse 85% 42% at 60% 102%, rgba(201, 110, 42, .30) 0%, transparent 62%),
    radial-gradient(ellipse 130% 60% at 50% 112%, var(--bg-panel) 0%, transparent 62%),
    var(--bg-deep);
  color: var(--parchment);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  padding-bottom: 110px;
}

/* ---------- atmosphere ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  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)'/%3E%3C/svg%3E");
}

/* kasavu — cream ground with gold zari stripe, like a mundu border */
.kasavu {
  position: fixed;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--parchment) 0 4px,
    var(--bg-deep)   4px 5px,
    var(--gold)      5px 8px,
    var(--bg-deep)   8px 9px,
    var(--gold-dim)  9px 10px
  );
}

.kasavu--top { top: 0; }
.kasavu--bottom { bottom: 0; transform: scaleY(-1); }

.backwater {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  max-height: 30vh;
  z-index: 0;
  pointer-events: none;
  fill: var(--silhouette);
}

.backwater .reflections rect {
  fill: var(--gold-dim);
  opacity: .22;
}

.backwater .boat {
  animation: bob 7s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(3px) rotate(.4deg); }
}

.vine {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 0;
  height: 100vh;
  width: 120px;
  opacity: .55;
  pointer-events: none;
  fill: none;
  stroke: var(--gold-dim);
}

.vine-stem {
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 1700;
  stroke-dashoffset: 1700;
  animation: draw 2.4s .3s cubic-bezier(.3, .7, .3, 1) forwards;
}

.vine-leaf {
  opacity: 0;
  transform: scale(.4);
  transform-box: fill-box;
  transform-origin: center;
  animation: sprout .6s var(--ld, 0s) cubic-bezier(.2, 1.4, .4, 1) forwards,
             sway 5.5s calc(var(--ld, 0s) + .6s) ease-in-out infinite;
}

.leaf-fill {
  fill: var(--leaf);
  fill-opacity: .55;
  stroke: none;
}

.leaf-vein {
  fill: none;
  stroke: var(--gold-dim);
  stroke-opacity: .55;
  stroke-width: 1;
}

.vine-berries circle {
  fill: var(--chili);
  fill-opacity: .8;
  stroke: none;
  opacity: 0;
  transform: scale(.3);
  transform-box: fill-box;
  transform-origin: center;
  animation: sprout .5s var(--bd, 0s) cubic-bezier(.2, 1.4, .4, 1) forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes sprout { to { opacity: 1; transform: scale(1); } }
@keyframes sway {
  0%, 100% { rotate: -3deg; }
  50%      { rotate: 3deg; }
}

@media (max-width: 860px) {
  .vine { display: none; }
}

/* ---------- layout ---------- */

.wrap {
  position: relative;
  z-index: 1;
  max-width: 640px;
  width: 100%;
  padding: 56px 24px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- load sequence ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal .9s cubic-bezier(.22, .8, .3, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes reveal {
  to { opacity: 1; transform: none; }
}

/* ---------- pieces ---------- */

.tag {
  font-family: var(--mono);
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .32em;
  text-indent: .32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 30px;
}

.tag-corner {
  color: var(--gold-dim);
}

.hearth {
  position: relative;
  margin-bottom: 18px;
}

.icon {
  width: min(38vw, 150px);
  height: auto;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .45));
}

.wordmark {
  position: relative;
  font-family: var(--stencil);
  font-weight: 800;
  font-size: clamp(2.8rem, 11vw, 5rem);
  line-height: 1;
  letter-spacing: .03em;
  margin: 0 0 22px;
  cursor: default;
}

.wordmark-face,
.wordmark-ghost {
  display: block;
}

.wordmark-face {
  position: relative;
  z-index: 1;
  color: var(--gold);
  transition: transform .4s cubic-bezier(.2, .8, .3, 1);
}

.wordmark-ghost {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: var(--chili);
  opacity: .38;
  transform: translate(4px, 5px);
  transition: transform .4s cubic-bezier(.2, .8, .3, 1);
}

.wordmark:hover .wordmark-face { transform: translate(-1px, -1px) rotate(-.4deg); }
.wordmark:hover .wordmark-ghost { transform: translate(6px, 7px) rotate(.6deg); }

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.02rem, 2.6vw, 1.2rem);
  color: var(--parchment);
  max-width: 380px;
  margin: 0 0 10px;
}

.malayalam {
  font-family: var(--malayalam);
  font-weight: 500;
  font-size: .92rem;
  letter-spacing: .04em;
  color: var(--gold);
  opacity: .85;
  margin: 0 0 28px;
}

.blurb {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--parchment-dim);
  max-width: 420px;
  margin: 0 0 40px;
}

/* ---------- socials ---------- */

.socials {
  display: flex;
  gap: 16px;
}

.social-btn {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--parchment);
  border: 1px solid rgba(239, 227, 206, .22);
  background: rgba(239, 227, 206, .04);
  transition: transform .25s ease, background .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease;
}

.social-btn:hover,
.social-btn:focus-visible {
  transform: translateY(-3px);
  color: var(--bg-deep);
  border-color: transparent;
  background: var(--gold);
  box-shadow: 0 8px 22px rgba(217, 164, 65, .3);
}

.social-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  z-index: 1;
  padding: 28px 20px 10px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(239, 227, 206, .62);
  text-align: center;
}

/* ---------- small screens ---------- */

@media (max-width: 380px) {
  .tag { letter-spacing: .24em; text-indent: .24em; }
  .blurb { font-size: .96rem; }
  .social-btn { width: 44px; height: 44px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .wordmark-face,
  .wordmark-ghost {
    transition: none;
  }
  .reveal { animation: none; opacity: 1; transform: none; }
  .vine-stem { animation: none; stroke-dashoffset: 0; }
  .vine-leaf,
  .vine-berries circle { animation: none; opacity: 1; transform: none; }
  .backwater .boat { animation: none; }
  .social-btn { transition: none; }
}
