:root {
  --paper: #f7f2e8;
  --paper-deep: #eee4d3;
  --ink: #29231d;
  --muted: #756a5c;
  --red: #864234;
  --red-dark: #4a2d27;
  --gold: #b28a52;
  --line: rgba(67, 48, 34, 0.16);
}

html {
  scroll-padding-top: 96px;
}

body {
  font-size: 15px;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("assets/family-kolam.png") center / 560px auto repeat;
  content: "";
  opacity: 0.16;
  pointer-events: none;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 82px;
  padding-inline: max(5.5%, calc((100vw - 1280px) / 2));
  gap: clamp(24px, 4vw, 64px);
  background: rgba(247, 242, 232, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.wordmark {
  min-width: 230px;
  gap: 13px;
}

.wordmark-seal,
.footer-mark {
  width: 42px;
  height: 42px;
  border-color: rgba(134, 66, 52, 0.62);
  background: rgba(134, 66, 52, 0.04);
}

.wordmark-name {
  font-size: 10px;
  letter-spacing: 0.2em;
}

.main-nav {
  gap: clamp(20px, 3vw, 42px);
}

.main-nav a {
  position: relative;
  padding-block: 10px;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: var(--gold);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
}

.language-switch {
  flex: 0 0 auto;
  min-height: 40px;
  padding-inline: 16px;
  background: rgba(255, 255, 255, 0.28);
}

.hero {
  isolation: isolate;
  min-height: min(760px, calc(100svh - 82px));
  padding: clamp(54px, 7vw, 92px) max(7.5%, calc((100vw - 1280px) / 2)) 84px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  column-gap: clamp(36px, 6vw, 88px);
  background:
    radial-gradient(ellipse at 18% 44%, rgba(178, 138, 82, 0.16), transparent 36%),
    linear-gradient(115deg, #4a2d27, #55342c 62%, #482b25);
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("assets/family-kolam.png") center / 560px auto repeat fixed;
  content: "";
  opacity: 0.1;
  pointer-events: none;
}

.hero .eyebrow,
.hero h1 {
  color: #f7f2e8;
}

.hero h1 em {
  color: #d7b681;
}

.hero-mantra {
  color: #d7b681;
}

.hero .hero-description {
  color: #e0d2bd;
}

.hero .text-link {
  color: #f0dfc5;
}

.hero .text-link:hover {
  color: #d7b681;
}

.hero-note {
  color: #d0c0a8;
}

.hero-copy {
  max-width: 760px;
  z-index: 2;
  animation: rise 0.85s 0.12s both;
}

.hero-art {
  z-index: 1;
  width: min(100%, 560px);
  height: auto;
  min-height: 0;
  justify-self: end;
  perspective: 1100px;
  animation: fade-in 1.1s 0.12s both;
}

.loom-illustration {
  display: block;
  width: 100%;
  overflow: visible;
  transform: perspective(1100px) rotateY(-11deg) rotateX(3deg);
  transform-origin: 50% 56%;
  transform-style: preserve-3d;
  filter: drop-shadow(0 24px 24px rgba(17, 10, 8, 0.34));
}

.loom-shuttle {
  animation: shuttle-pass 3.4s ease-in-out infinite;
}

.loom-beater {
  transform-box: fill-box;
  transform-origin: center;
  animation: beater-tap 1.7s ease-in-out infinite;
}

.loom-caption {
  display: block;
  margin-top: -8px;
  color: #d0c0a8;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-align: center;
}

.eyebrow {
  gap: 12px;
  margin-bottom: 20px;
  font-size: 9px;
  letter-spacing: 0.17em;
}

.eyebrow > span:first-child {
  width: 30px;
}

.hero-mantra {
  margin: 0 0 12px 42px;
  color: #94734a;
  font: 500 12px/1.8 var(--sans);
  letter-spacing: 0.025em;
}

body[lang="te"] .hero-mantra {
  font: 500 14px/1.8 var(--telugu);
}

.hero h1 {
  margin-bottom: 24px;
  font-size: clamp(58px, 6vw, 86px);
  line-height: 0.98;
}

.hero h1 em {
  margin-top: 5px;
}

.hero-description {
  max-width: 450px;
  margin-bottom: 30px;
  color: #62594e;
  font-size: 14px;
  line-height: 1.95;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 18px 26px;
}

.button-primary {
  min-height: 52px;
  padding: 14px 18px;
  box-shadow: 0 8px 20px rgba(89, 46, 34, 0.12);
}

.text-link {
  align-items: center;
  padding-block: 10px;
}

.hero-note {
  margin-top: 40px;
  font-size: 13px;
}

.art-spark {
  animation: spark-breathe 4s ease-in-out infinite alternate;
}

.spark-two {
  animation-delay: -2s;
}

@keyframes shuttle-pass {
  0%,
  8% {
    transform: translateX(0);
  }
  44%,
  52% {
    transform: translateX(180px);
  }
  92%,
  100% {
    transform: translateX(0);
  }
}

@keyframes beater-tap {
  0%,
  38%,
  58%,
  100% {
    transform: translateY(0);
  }
  48% {
    transform: translateY(4px);
  }
}

.story-section {
  padding: clamp(78px, 9vw, 128px) max(12%, calc((100vw - 1080px) / 2)) clamp(88px, 10vw, 140px);
}

.story-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.72fr);
  gap: clamp(48px, 10vw, 140px);
}

.story-heading h2 {
  max-width: 500px;
  font-size: clamp(38px, 4.5vw, 58px);
  line-height: 1.12;
}

.story-text {
  padding-top: 54px;
}

.story-text p,
.roots-content > p:last-child,
.portal-section > div > p:last-child {
  color: #665d52;
  font-size: 14px;
  line-height: 2;
}

.underlined-link {
  margin-top: 14px;
  padding-bottom: 9px;
}

.roots-section {
  isolation: isolate;
  min-height: 410px;
  padding: clamp(70px, 8vw, 112px) max(12%, calc((100vw - 1080px) / 2));
  background:
    radial-gradient(circle at 88% 48%, rgba(207, 165, 104, 0.12), transparent 25%),
    linear-gradient(125deg, #4a2d27, #55342c 62%, #482b25);
}

.roots-section::before,
.portal-section::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("assets/family-kolam.png") center / 560px auto repeat fixed;
  content: "";
  opacity: 0.1;
  pointer-events: none;
}

.roots-content {
  max-width: 610px;
}

.roots-content h2 {
  font-size: clamp(38px, 4.5vw, 56px);
  line-height: 1.16;
}

.roots-content > p:last-child {
  max-width: 540px;
  color: #e0d2bd;
}

.roots-seal {
  position: relative;
  z-index: 1;
  width: 150px;
  height: 150px;
  min-width: 150px;
  margin-left: clamp(32px, 6vw, 84px);
  background: rgba(255, 255, 255, 0.025);
  font-size: 15px;
}

.portal-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(42px, 5vw, 66px) max(12%, calc((100vw - 1080px) / 2));
  gap: 26px;
  background:
    radial-gradient(ellipse at 8% 50%, rgba(178, 138, 82, 0.1), transparent 40%),
    var(--paper-deep);
}

.portal-section > * {
  position: relative;
}

.portal-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  border: 1px solid rgba(134, 66, 52, 0.28);
  border-radius: 50%;
  color: var(--red);
  font: 500 24px var(--telugu);
}

.portal-section h2 {
  font-size: clamp(22px, 2.4vw, 30px);
}

.portal-section > div > p:last-child {
  margin-bottom: 0;
}

.portal-section .portal-member-button {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid var(--red);
  border-radius: 4px;
  background: var(--red);
  color: #fff8eb;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(89, 46, 34, 0.12);
}

.portal-section .portal-member-button:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
}

.portal-arrow {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  min-width: 46px;
  margin-left: auto;
  border: 1px solid rgba(134, 66, 52, 0.34);
  border-radius: 50%;
  color: var(--red);
  transition: color 0.25s, background 0.25s, transform 0.25s;
}

.portal-arrow:hover {
  transform: translate(2px, -2px);
  color: var(--paper);
  background: var(--red);
}

.site-footer {
  min-height: 96px;
  padding-inline: max(7.5%, calc((100vw - 1280px) / 2));
  background: var(--paper);
}

.site-footer p {
  color: #756a5c;
}

body[lang="te"] .hero-mantra {
  font-size: 14px;
}

body[lang="te"] .hero h1 {
  font-size: clamp(46px, 5.2vw, 72px);
  line-height: 1.3;
}

body[lang="te"] .hero h1 em {
  margin-top: 0;
}

body[lang="te"] .story-heading h2,
body[lang="te"] .roots-content h2 {
  line-height: 1.55;
}

@keyframes spark-breathe {
  from {
    opacity: 0.5;
    transform: scale(0.9) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: scale(1.08) rotate(8deg);
  }
}

@media (max-width: 980px) {
  .site-header {
    padding-inline: 5%;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
    column-gap: 30px;
  }

  .hero-art {
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(42px, 5.5vw, 58px);
  }

  .story-section,
  .roots-section,
  .portal-section {
    padding-inline: 8%;
  }
}

@media (max-width: 700px) {
  body::before {
    background-size: 390px auto;
  }

  .site-header {
    height: 72px;
    gap: 10px;
  }

  .wordmark {
    flex: 1 1 auto;
    min-width: 0;
  }

  .menu-toggle {
    display: grid;
    flex: 0 0 42px;
    place-content: center;
    gap: 4px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    color: var(--red);
    cursor: pointer;
  }

  .menu-toggle > span:not(.sr-only) {
    display: block;
    width: 17px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .menu-toggle[aria-expanded="true"] > span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] > span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] > span:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
  }

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

  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--line);
    background: rgba(247, 242, 232, 0.98);
    box-shadow: 0 14px 32px rgba(41, 35, 29, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-nav a {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .main-nav a::after {
    display: none;
  }

  .wordmark-seal {
    width: 36px;
    height: 36px;
  }

  .hero {
    display: block;
    min-height: 0;
    padding: 58px 8%;
  }

  .hero::after {
    background-size: 390px auto;
  }

  .roots-section::before,
  .portal-section::before {
    background-size: 390px auto;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-art {
    width: min(100%, 500px);
    margin: 34px auto 0;
  }

  .hero h1 {
    font-size: clamp(46px, 12vw, 72px);
  }

  .hero-mantra {
    margin-left: 0;
  }

  .hero-note {
    margin-top: 27px;
  }

  .story-section {
    padding: 66px 9% 76px;
  }

  .story-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .story-heading h2 {
    font-size: clamp(36px, 10vw, 46px);
  }

  .story-text {
    padding-top: 0;
  }

  .roots-section {
    display: block;
    padding: 68px 9%;
  }

  .roots-content h2 {
    font-size: clamp(34px, 9.5vw, 44px);
  }

  .roots-seal {
    width: 118px;
    height: 118px;
    min-width: 118px;
    margin: 32px 4px 0 auto;
    font-size: 12px;
  }

  .roots-seal i {
    margin: 3px;
    font-size: 18px;
  }

  .roots-seal small {
    font-size: 6px;
  }

  .portal-section {
    padding: 34px 8%;
    gap: 15px;
  }

  .portal-icon {
    width: 43px;
    height: 43px;
    min-width: 43px;
    font-size: 20px;
  }

  .portal-section h2 {
    font-size: 20px;
  }

  .portal-arrow {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .site-footer {
    min-height: 82px;
    padding-inline: 7%;
  }
}

@media (max-width: 390px) {
  .wordmark {
    min-width: 0;
  }

  .wordmark-seal {
    width: 32px;
    height: 32px;
  }

  .wordmark-name {
    font-size: 8px;
    letter-spacing: 0.13em;
  }

  .wordmark-name small {
    font-size: 6px;
    letter-spacing: 0.1em;
  }

  .language-switch {
    gap: 6px;
    padding-inline: 9px;
  }

  .hero {
    padding-inline: 7%;
  }

  .hero-actions {
    gap: 12px 18px;
  }

  .button-primary {
    gap: 12px;
    padding-inline: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .art-spark,
  .hero-art,
  .loom-shuttle,
  .loom-beater,
  .menu-toggle > span,
  .main-nav {
    animation: none;
    transition: none;
  }
}
