/* ═══════════════════════════════════════════════════════════════
   TamilChat — design system
   Warm, vibrant, Tamil-inspired. Light content pages + immersive
   dark app screens for chat/video.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Brand palette */
  --saffron: #ff6b35;
  --saffron-2: #ff8c42;
  --magenta: #f7567c;
  --violet: #7b5cff;
  --teal: #11b5a4;
  --gold: #ffb84d;

  --grad-warm: linear-gradient(135deg, #ff6b35 0%, #f7567c 50%, #7b5cff 100%);
  --grad-warm-soft: linear-gradient(135deg, #ff8c42 0%, #f7567c 100%);
  --grad-night: linear-gradient(160deg, #160f29 0%, #25183f 50%, #341a4d 100%);

  /* Neutral / surface */
  --ink: #1a1426;
  --ink-2: #4a4458;
  --muted: #7a7488;
  --line: #ececf2;
  --bg: #ffffff;
  --bg-soft: #faf7fb;
  --bg-cream: #fff8f3;
  --card: #ffffff;

  /* Effects */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(26, 20, 38, 0.06);
  --shadow: 0 10px 30px rgba(26, 20, 38, 0.10);
  --shadow-lg: 0 24px 60px rgba(123, 92, 255, 0.18);
  --shadow-glow: 0 8px 30px rgba(255, 107, 53, 0.35);

  --font-head: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  /* Noto Sans Tamil actually renders Tamil script glyphs; Catamaran/Outfit
     are the Latin fallback for headings and non-Tamil text. */
  --font-tamil: 'Noto Sans Tamil', 'Catamaran', 'Outfit', sans-serif;

  --container: 1160px;
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; color: var(--ink); font-weight: 700; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:lang(ta), .tamil { font-family: var(--font-tamil); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 22px; }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  padding: 11px 22px; border-radius: 100px; border: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap; text-align: center;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--grad-warm-soft); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(255,107,53,.45); }
.btn-ghost { background: rgba(123,92,255,.08); color: var(--violet); }
.btn-ghost:hover { background: rgba(123,92,255,.16); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-lg { padding: 15px 32px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-white { background:#fff; color: var(--saffron); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ─── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 800; font-size: 21px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad-warm); color: #fff; font-family: var(--font-tamil); font-weight: 800; font-size: 22px;
  box-shadow: var(--shadow-glow);
}
.brand-text span { color: var(--saffron); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  font-family: var(--font-head); font-weight: 500; font-size: 15px; color: var(--ink-2);
  padding: 8px 14px; border-radius: 100px; transition: all .15s ease;
}
.main-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.main-nav a.active { color: var(--saffron); background: rgba(255,107,53,.10); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.user-chip { font-weight: 600; font-size: 14px; color: var(--violet); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: .25s; }

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad-night);
  color: #fff; padding: 84px 0 96px;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: 0;
}
.hero::before { width: 420px; height: 420px; background: var(--saffron); top: -120px; right: -80px; }
.hero::after { width: 360px; height: 360px; background: var(--violet); bottom: -140px; left: -60px; }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 100px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  font-size: 13.5px; font-weight: 600; letter-spacing: .3px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); font-weight: 800; letter-spacing: -1.2px; color: #fff; }
.hero h1 .grad { background: linear-gradient(90deg, #ffb84d, #ff6b35, #f7567c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { font-size: 19px; color: rgba(255,255,255,.82); margin: 20px 0 30px; max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stats { display: flex; gap: 30px; margin-top: 38px; }
.hero-stats .stat b { font-family: var(--font-head); font-size: 28px; font-weight: 800; display: block; }
.hero-stats .stat span { font-size: 13.5px; color: rgba(255,255,255,.6); }
.hero-stats .dot { display:inline-block; width:8px;height:8px;border-radius:50%;background:#36e07f;margin-right:6px;box-shadow:0 0 0 4px rgba(54,224,127,.25); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.45} }

/* Hero visual — live room mock */
.hero-visual {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg); padding: 18px; backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg);
}
.hero-visual .hv-head { display:flex; align-items:center; justify-content: space-between; margin-bottom: 14px; }
.hv-cams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hv-cam { aspect-ratio: 4/3; border-radius: 12px; background: linear-gradient(135deg,#3a2256,#7b5cff33); position: relative; overflow:hidden; display:grid; place-items:center; font-size: 34px; }
.hv-cam:nth-child(2){ background: linear-gradient(135deg,#5a1d44,#f7567c33);}
.hv-cam:nth-child(3){ background: linear-gradient(135deg,#1d3a4a,#11b5a433);}
.hv-cam:nth-child(4){ background: linear-gradient(135deg,#4a3a1d,#ffb84d33);}
.hv-cam .tag { position:absolute; bottom:7px; left:7px; font-size:11px; background:rgba(0,0,0,.45); padding:2px 8px; border-radius:20px; }
.hv-chat { margin-top: 14px; display:flex; flex-direction: column; gap: 7px; }
.hv-msg { font-size: 13px; background: rgba(255,255,255,.08); padding: 7px 12px; border-radius: 12px; max-width: 80%; }
.hv-msg.me { align-self: flex-end; background: var(--grad-warm-soft); }

/* ─── Sections / cards ────────────────────────────────────── */
section { padding: 70px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-head .eyebrow { color: var(--saffron); font-weight: 700; font-family: var(--font-head); letter-spacing: 1px; text-transform: uppercase; font-size: 13px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.6px; margin: 10px 0 12px; }
.section-head p { color: var(--muted); font-size: 17px; }
.bg-soft { background: var(--bg-soft); }
.bg-cream { background: var(--bg-cream); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 26px; transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; margin-bottom: 18px; color: #fff; }
.feature-card h3 { font-size: 20px; margin-bottom: 9px; }
.feature-card p { color: var(--muted); font-size: 15px; }

/* Room cards */
.rooms-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.room-card {
  position: relative; border-radius: var(--radius-lg); padding: 24px; color: #fff; overflow: hidden;
  min-height: 168px; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .2s ease, box-shadow .2s ease; box-shadow: var(--shadow);
}
.room-card:hover { transform: translateY(-6px) scale(1.015); box-shadow: var(--shadow-lg); }
.room-card .emoji { font-size: 34px; }
.room-card h3 { color: #fff; font-size: 21px; }
.room-card .ta { font-family: var(--font-tamil); opacity: .92; font-weight: 700; font-size: 15px; }
.room-card .room-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.room-card .live { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.22); padding: 4px 11px; border-radius: 100px; font-weight: 600; }
.room-card .live i { width: 7px; height: 7px; border-radius: 50%; background: #36e07f; display:inline-block; animation: pulse 2s infinite; }
.room-card .go { background: rgba(255,255,255,.22); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; transition:.2s; }
.room-card:hover .go { background: #fff; color: var(--ink); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; counter-reset: step; }
.step { text-align: center; padding: 10px; }
.step .num { width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 24px; color: #fff; background: var(--grad-warm); box-shadow: var(--shadow-glow); }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* CTA band */
.cta-band { background: var(--grad-warm); color: #fff; border-radius: var(--radius-lg); padding: 54px 40px; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); }
.cta-band p { color: rgba(255,255,255,.9); font-size: 18px; margin: 12px 0 26px; }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 18px 22px; font-family: var(--font-head); font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 24px; color: var(--saffron); font-weight: 400; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 22px 20px; color: var(--muted); }

/* ─── Prose pages (legal, blog, about) ────────────────────── */
.page-hero { background: var(--grad-night); color: #fff; padding: 60px 0 64px; position: relative; overflow: hidden; }
.page-hero::after { content:''; position:absolute; width:300px;height:300px;border-radius:50%;background:var(--saffron);filter:blur(80px);opacity:.4;top:-80px;right:-40px; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(30px,4.4vw,46px); color: #fff; }
.page-hero p { color: rgba(255,255,255,.8); font-size: 18px; margin-top: 12px; max-width: 640px; }
.breadcrumb { font-size: 14px; color: rgba(255,255,255,.6); margin-bottom: 16px; }
.breadcrumb a { color: rgba(255,255,255,.85); }

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 28px; margin: 38px 0 14px; }
.prose h3 { font-size: 21px; margin: 28px 0 10px; }
.prose p { color: var(--ink-2); margin-bottom: 16px; font-size: 16.5px; }
.prose ul { margin: 0 0 18px 20px; color: var(--ink-2); }
.prose li { margin-bottom: 9px; }
.prose strong { color: var(--ink); }
.prose .lead { font-size: 19px; color: var(--ink); }

/* Blog cards */
.post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: .2s; display:flex; flex-direction:column; }
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.post-thumb { height: 150px; background: var(--grad-warm); display: grid; place-items: center; font-size: 50px; }
.post-card:nth-child(3n+2) .post-thumb { background: linear-gradient(135deg,#7b5cff,#11b5a4); }
.post-card:nth-child(3n) .post-thumb { background: linear-gradient(135deg,#f7567c,#ffb84d); }
.post-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.post-body .meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.post-body h3 { font-size: 20px; margin-bottom: 10px; }
.post-body p { color: var(--muted); font-size: 15px; flex: 1; }
.post-body .read { color: var(--saffron); font-weight: 600; margin-top: 14px; font-family: var(--font-head); }
.tag { display:inline-block; font-size:12px; font-weight:600; color:var(--violet); background:rgba(123,92,255,.1); padding:3px 10px; border-radius:100px; margin-right:6px; }

/* ─── Ads ─────────────────────────────────────────────────── */
.ad-slot { margin: 26px auto; text-align: center; max-width: 100%; }
.ad-label { display: block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #b9b4c4; margin-bottom: 6px; }
.ad-placeholder {
  border: 1.5px dashed #d9d4e2; border-radius: var(--radius); background: repeating-linear-gradient(45deg,#fbfaff,#fbfaff 12px,#f6f4fb 12px,#f6f4fb 24px);
  padding: 26px; color: var(--muted); display: grid; place-items: center; gap: 4px;
}
.ad-placeholder span { font-weight: 600; font-family: var(--font-head); }
.ad-placeholder small { font-size: 12px; color: #aaa4b8; }
.ad-horizontal .ad-placeholder { min-height: 90px; }
.ad-rectangle .ad-placeholder { min-height: 250px; max-width: 336px; margin: 0 auto; }
.ad-vertical .ad-placeholder { min-height: 600px; max-width: 300px; }

/* ─── Forms / auth ────────────────────────────────────────── */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 50px 20px; background: var(--bg-soft); }
.auth-card { width: 100%; max-width: 430px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 38px 34px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 27px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; font-family: var(--font-head); }
.field input {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 15px; font-family: var(--font-body); transition: .15s; background: #fff;
}
.field input:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 4px rgba(255,107,53,.12); }
.auth-alt { text-align: center; margin-top: 20px; color: var(--muted); font-size: 14.5px; }
.auth-alt a { color: var(--saffron); font-weight: 600; }
.form-msg { font-size: 14px; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; display: none; }
.form-msg.error { display: block; background: #fff0f0; color: #d6336c; border: 1px solid #ffd6e0; }
.form-msg.success { display: block; background: #effbf3; color: #119a4e; border: 1px solid #c7f0d6; }
.divider { display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px;margin:20px 0; }
.divider::before,.divider::after{content:'';flex:1;height:1px;background:var(--line);}

/* ─── Footer ──────────────────────────────────────────────── */
.site-footer { background: #150f23; color: #c8c2d6; padding: 56px 0 30px; margin-top: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: 14.5px; color: #9b94ad; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14.5px; color: #9b94ad; padding: 5px 0; transition: .15s; }
.footer-col a:hover { color: var(--saffron); padding-left: 4px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 13.5px; color: #7d7690; flex-wrap: wrap; gap: 8px; }

/* ─── Scroll progress + floating CTA ──────────────────────── */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200; background: var(--grad-warm); box-shadow: 0 0 10px rgba(255,107,53,.6); transition: width .08s linear; }
.floating-cta {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 100px; font-family: var(--font-head); font-weight: 700; font-size: 16px;
  color: #fff; background: var(--grad-warm-soft); box-shadow: var(--shadow-glow);
  opacity: 0; transform: translateY(24px) scale(.9); pointer-events: none; transition: all .3s cubic-bezier(.2,.8,.2,1);
}
.floating-cta.show { opacity: 1; transform: none; pointer-events: auto; }
.floating-cta:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(255,107,53,.5); }
@media (max-width: 680px) { .floating-cta { right: 14px; bottom: 14px; padding: 12px 20px; font-size: 15px; } }

/* ─── Accessibility ───────────────────────────────────────── */
:focus-visible { outline: 3px solid rgba(123,92,255,.55); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible { outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ─── Utility ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 460px; }
  .feature-grid, .post-grid, .steps { grid-template-columns: 1fr 1fr; }
  .rooms-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 680px) {
  .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; background: #fff; padding: 14px 22px; gap: 2px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-130%); transition: transform .28s ease; align-items: stretch; }
  .main-nav.open { transform: none; }
  .main-nav a { padding: 13px 14px; }
  .nav-toggle { display: flex; }
  .header-actions .btn-ghost { display: none; }
  .feature-grid, .post-grid, .steps, .rooms-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  section { padding: 50px 0; }
  .cta-band { padding: 40px 24px; }
}
