/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #020a12;
  color: #eaf4fb;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(125, 211, 252, 0.2);
}

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

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid #38bdf8; outline-offset: 3px; border-radius: 4px; }

/* ---------- header / menu ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(3, 14, 24, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(120, 190, 230, 0.14);
  transition: background 0.3s, padding 0.3s, border-color 0.3s;
}

.site-header.is-scrolled {
  background: rgba(2, 10, 18, 0.88);
  border-bottom-color: rgba(120, 190, 230, 0.25);
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand { display: flex; align-items: center; }

/* the logo file is a wide lockup that already includes the wordmark,
   so it is shown on its own light plate at a size where it stays legible */
.brand-logo {
  height: 58px;
  width: auto;
  display: block;
  padding: 8px 16px;
  border-radius: 13px;
  background: linear-gradient(180deg, #ffffff, #e8f2f9);
  box-shadow: 0 4px 16px rgba(2, 10, 18, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  -webkit-user-drag: none;
  user-select: none;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  position: relative;
  display: block;
  padding: 8px 2px;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(226, 240, 250, 0.82);
  transition: color 0.25s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: #38bdf8;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav a:hover { color: #fff; }
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: #fff; }

.nav-cta {
  padding: 9px 18px !important;
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  color: #9ddcff !important;
  transition: background 0.25s, border-color 0.25s, color 0.25s !important;
}

.nav-cta:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #fff !important;
}

.nav-cta::after { display: none; }

/* hamburger */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 12px 10px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: #dff1fb;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px clamp(16px, 5vw, 64px) 80px;
  overflow: hidden;
  background: linear-gradient(180deg, #0a3550 0%, #062639 45%, #020a12 100%);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  /* let the page scroll vertically even when a finger starts on the canvas */
  touch-action: pan-y;
}

/* if WebGL is unavailable the gradient background stays visible */
.hero.water-fallback .hero-canvas { display: none; }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 10, 18, 0.86) 0%, rgba(2, 10, 18, 0.45) 45%, rgba(2, 10, 18, 0.1) 100%),
    linear-gradient(180deg, rgba(2, 10, 18, 0.55) 0%, rgba(2, 10, 18, 0) 30%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* ---------- Tamil kavithai over the water ---------- */
.verse {
  position: relative;
  margin: 0 0 38px;
  padding: 22px 26px 20px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-left: 3px solid #7dd3fc;
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(6, 34, 54, 0.62), rgba(3, 16, 27, 0.48));
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: 0 18px 46px rgba(2, 10, 18, 0.45);
  max-width: 62ch;
  animation: rise 0.9s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.verse-lines { margin: 0; }

.verse-line {
  margin: 0;
  font-family: "Noto Serif Tamil", "Noto Sans Tamil", Latha, sans-serif;
  font-size: clamp(1.02rem, 2.1vw, 1.35rem);
  line-height: 1.75;
  font-weight: 600;
  color: #eaf7ff;
  text-shadow: 0 2px 18px rgba(2, 10, 18, 0.8);
  text-wrap: balance;
}

.verse-line + .verse-line { color: #bfe9ff; }

.verse-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(125, 211, 252, 0.18);
  font-family: "Noto Sans Tamil", Latha, sans-serif;
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(214, 236, 250, 0.74);
}

.verse-note-label {
  display: inline-block;
  margin-right: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.3);
  color: #7dd3fc;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  vertical-align: 1px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #7dd3fc, #38bdf8 45%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0 0 34px;
  max-width: 54ch;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  color: rgba(224, 240, 250, 0.84);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 54px; }

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.25s, background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(120deg, #38bdf8, #0ea5e9);
  color: #04121d;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.32);
}

.btn-primary:hover { box-shadow: 0 16px 40px rgba(14, 165, 233, 0.45); }

.btn-ghost {
  border-color: rgba(125, 211, 252, 0.45);
  color: #bae6fd;
}

.btn-ghost:hover { background: rgba(125, 211, 252, 0.12); border-color: #7dd3fc; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 48px);
  margin: 0;
  padding: 28px 0 0;
  list-style: none;
  border-top: 1px solid rgba(125, 211, 252, 0.18);
}

.hero-stats li { display: flex; flex-direction: column; }

.hero-stats strong {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  color: #7dd3fc;
}

.hero-stats span {
  font-size: 0.84rem;
  color: rgba(224, 240, 250, 0.66);
  max-width: 22ch;
}

.scroll-hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(224, 240, 250, 0.5);
}

.scroll-hint span {
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.9), transparent);
  animation: drip 2.2s ease-in-out infinite;
}

@keyframes drip {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}

/* ---------- sections ---------- */
.section {
  padding: clamp(70px, 10vw, 120px) clamp(16px, 5vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
}

.section h2 {
  margin: 0 0 24px;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
}

.section > p { margin: 0; max-width: 68ch; color: rgba(224, 240, 250, 0.78); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.tile {
  padding: 30px 26px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(14, 45, 68, 0.55), rgba(4, 16, 26, 0.75));
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.tile:hover {
  transform: translateY(-5px);
  border-color: rgba(125, 211, 252, 0.45);
  box-shadow: 0 22px 50px rgba(2, 10, 18, 0.6);
}

.tile h3 { margin: 0 0 10px; font-size: 1.2rem; }
.tile p { margin: 0; color: rgba(224, 240, 250, 0.72); font-size: 0.95rem; }

.section-contact { text-align: center; }
.contact-line { margin: 0 0 10px; color: rgba(224, 240, 250, 0.78); }
.contact-line a { color: #7dd3fc; }
.contact-line a:hover { text-decoration: underline; }

.site-footer {
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid rgba(125, 211, 252, 0.12);
  color: rgba(224, 240, 250, 0.5);
  font-size: 0.88rem;
}

/* ---------- responsive menu ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: var(--header-h, 71px);
    max-height: calc(100vh - var(--header-h, 71px));
    max-height: calc(100dvh - var(--header-h, 71px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px clamp(16px, 5vw, 32px) 26px;
    background: rgba(3, 14, 24, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(120, 190, 230, 0.18);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s, transform 0.28s, visibility 0.28s;
  }

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

  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }

  .nav a {
    padding: 15px 4px;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(120, 190, 230, 0.1);
  }

  .nav a::after { display: none; }
  .nav a.is-active { color: #7dd3fc; }

  .nav-cta { margin-top: 16px; text-align: center; border-bottom: 0 !important; }
}

@media (max-width: 480px) {
  .hero { padding: 104px 16px 64px; }
  .brand-logo { height: 46px; padding: 6px 12px; border-radius: 11px; }
  .hero-stats { gap: 18px; }
  .verse { padding: 18px 18px 16px; border-radius: 12px; }
}

/* short landscape phones — keep the verse and heading from crowding */
@media (max-height: 620px) and (max-width: 940px) {
  .hero { padding-top: 96px; padding-bottom: 56px; }
  .verse { margin-bottom: 24px; padding: 16px 18px 14px; }
  .verse-line { font-size: 1rem; line-height: 1.6; }
  .verse-note { margin-top: 12px; padding-top: 10px; font-size: 0.82rem; line-height: 1.65; }
  .lede { margin-bottom: 24px; }
  .hero-actions { margin-bottom: 32px; }
  .hero-stats { padding-top: 20px; }
  .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
