:root {
  --bg: #f5f4f0;
  --ink: #151514;
  --muted: #7a7872;
  --line: #e2e0d9;
  --accent: #ff5b2e;
  --green: #30c25a;
  --red: #ff3b30;
  --bezel: #121212;
  --card: #ffffff;
  --screen: #0a0a0a;
  --font: "Inter", "Noto Sans Malayalam", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f0e;
    --ink: #f1f0eb;
    --muted: #8e8c85;
    --line: #252422;
    --bezel: #1d1d1c;
    --card: #1a1a19;
  }
}
:root[data-theme="dark"] {
  --card: #1a1a19;
  --bg: #0f0f0e;
  --ink: #f1f0eb;
  --muted: #8e8c85;
  --line: #252422;
  --bezel: #1d1d1c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Nav */
.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.04em;
}
.logo::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 3px;
}
.logo.small { font-size: 16px; }
.sound {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .2s, border-color .2s;
}
.sound:hover { color: var(--ink); border-color: var(--muted); }
.sound-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); transition: background .2s; }
.sound[aria-pressed="true"] { color: var(--ink); }
.sound[aria-pressed="true"] .sound-dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }

/* Hero */
.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 32px 96px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  min-height: calc(100vh - 90px);
}
.eyebrow {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}
.eyebrow .ml { color: var(--accent); margin-left: 6px; }
h1 {
  font-weight: 500;
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 10ch;
}
h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.lede {
  margin-top: 28px;
  max-width: 44ch;
  color: var(--muted);
  font-size: 17px;
}

.cta {
  margin-top: 36px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px 10px 10px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  transition: transform .2s;
}
.cta:hover { transform: translateY(-2px); }
.cta-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
}
.cta-label { display: block; font-size: 12px; opacity: .6; line-height: 1.2; }
.cta-number { display: block; font-size: 17px; font-weight: 500; letter-spacing: .01em; font-variant-numeric: tabular-nums; }

/* Floating use-case cards */
.stage-inner { position: relative; width: 640px; height: 662px; display: flex; justify-content: center; padding-top: 11px; }
.cards { list-style: none; }
.card {
  position: absolute;
  z-index: 6;
  width: 206px;
  animation: cardIn .7s cubic-bezier(.2,.8,.2,1) both, float 6s ease-in-out infinite;
  animation-delay: calc(.25s + var(--i) * .12s), calc(var(--i) * -1.3s);
}
.card button {
  width: 100%;
  display: flex; align-items: flex-start; gap: 11px;
  text-align: left;
  padding: 12px 14px 13px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20,20,10,.04), 0 12px 32px -12px rgba(20,20,10,.22);
  position: relative;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, scale .3s;
}
.card button:hover { border-color: var(--muted); }
.card.is-on button {
  border-color: var(--accent);
  scale: 1.04;
  box-shadow: 0 1px 2px rgba(20,20,10,.04), 0 18px 40px -14px color-mix(in srgb, var(--accent) 45%, transparent);
}
.card-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  transition: background .3s, color .3s;
}
.card.is-on .card-icon { background: var(--accent); color: #fff; }
.card-t { display: block; font-weight: 600; font-size: 14px; letter-spacing: -0.01em; line-height: 1.3; }
.card-d { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.card-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }
.card.is-on .card-bar { animation: bar var(--dur, 20s) linear forwards; }
@keyframes bar { to { width: 100%; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }

.card-1 { left: 0;    top: 70px; }
.card-2 { right: 0;   top: 150px; }
.card-3 { left: 6px;  top: 296px; }
.card-4 { right: 4px; top: 566px; }
.card-5 { left: 0;    top: 548px; }

/* Phone */
.stage { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.stage-note { font-size: 13px; color: var(--muted); height: 20px; transition: opacity .3s; }
.phone {
  width: 312px;
  height: 640px;
  padding: 11px;
  border-radius: 54px;
  background: var(--bezel);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 2px 0 1px rgba(0,0,0,.04),
    0 40px 80px -20px rgba(20,20,10,.35),
    0 20px 30px -20px rgba(20,20,10,.3);
  position: relative;
}
.screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 44px;
  background: var(--screen);
  overflow: hidden;
  color: #fff;
}
.island {
  position: absolute; top: 11px; left: 50%;
  width: 92px; height: 27px;
  transform: translateX(-50%);
  background: #000;
  border-radius: 20px;
  z-index: 5;
}
.status {
  position: absolute; top: 0; left: 0; right: 0;
  height: 48px;
  padding: 15px 28px 0 32px;
  display: flex; justify-content: space-between;
  font-size: 14px; font-weight: 600;
  z-index: 4;
}
.status-right { display: flex; gap: 6px; align-items: center; }
.nodata { color: var(--accent); display: none; }
.nodata.is-on { display: inline-flex; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.bars i { width: 3px; background: #fff; border-radius: 1px; }
.bars i:nth-child(1) { height: 4px; }
.bars i:nth-child(2) { height: 6px; }
.bars i:nth-child(3) { height: 8px; }
.bars i:nth-child(4) { height: 11px; }

.view {
  position: absolute; inset: 0;
  padding: 56px 22px 34px;
  display: flex; flex-direction: column; align-items: center;
  opacity: 0;
  transform: scale(.97);
  pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
.view.is-on { opacity: 1; transform: none; }

/* Dialer */
.dial-number {
  height: 92px;
  margin-top: 24px;
  font-size: 32px;
  font-weight: 300;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center;
  white-space: nowrap;
}
.dial-number::after {
  content: "";
  width: 2px; height: 30px;
  background: var(--accent);
  margin-left: 3px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 66px);
  gap: 14px 22px;
  margin-top: 8px;
}
.key {
  width: 66px; height: 66px;
  border-radius: 50%;
  background: #2a2a2a;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: background .25s;
}
.key b { font-size: 28px; font-weight: 400; line-height: 1; }
.key small { font-size: 8.5px; letter-spacing: .18em; color: #aaa; margin-top: 2px; height: 10px; }
.key.is-press { background: #6a6a6a; transition: none; }
.key-call, .key-end {
  width: 66px; height: 66px;
  border-radius: 50%;
  background: var(--green);
  display: grid; place-items: center;
  transition: transform .2s, filter .2s;
}
.view-dial .key-call { margin-top: 18px; }
.key-end { background: var(--red); margin-top: auto; flex-shrink: 0; }
.key-call.is-press, .key-end.is-press { transform: scale(.9); filter: brightness(1.25); }
.small { width: 62px; height: 62px; margin: 0; }

/* Call */
.who { display: flex; flex-direction: column; align-items: center; transition: transform .5s ease; }
.avatar {
  width: 82px; height: 82px;
  border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
  margin-top: 26px;
  position: relative;
  transition: width .5s ease, height .5s ease, margin .5s ease;
}
.avatar span { font-family: var(--serif); font-size: 44px; line-height: 1; transition: font-size .5s; }
.avatar::before, .avatar::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
}
.avatar.ring::before { animation: ring 1.6s ease-out infinite; }
.avatar.ring::after  { animation: ring 1.6s ease-out .8s infinite; }
@keyframes ring {
  from { transform: scale(1); opacity: .8; }
  to   { transform: scale(1.9); opacity: 0; }
}
.who-name { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; margin-top: 14px; }
.who-status { font-size: 14px; color: #9a9a9a; font-variant-numeric: tabular-nums; margin-top: 2px; }
.pill {
  margin-top: 10px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: #ffb39c;
  display: none;
}
.pill.is-on { display: block; }

.view-call.is-live .avatar { width: 56px; height: 56px; margin-top: 12px; }
.view-call.is-live .avatar span { font-size: 30px; }
.view-call.is-live .who-name { font-size: 21px; margin-top: 8px; }

.wave { width: 276px; height: 70px; margin-top: 14px; flex-shrink: 0; }

.captions {
  width: 100%;
  flex: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 12px;
  padding: 4px 4px 16px;
  overflow: hidden;
  min-height: 0;
}
.cap {
  max-width: 92%;
  font-size: 15px;
  line-height: 1.35;
  transition: opacity .5s ease, transform .5s ease;
  animation: capIn .35s ease;
}
@keyframes capIn { from { opacity: 0; transform: translateY(8px); } }
.cap-who {
  display: block;
  font-size: 11px; font-weight: 500;
  margin-bottom: 2px;
  color: #8a8a8a;
}
.cap.dosth .cap-who { color: var(--accent); }
.cap.you { align-self: flex-end; text-align: right; }
.cap.you .cap-text { color: #d6d6d6; }
.cap.old { opacity: .32; }
.cap .w { opacity: 0; transition: opacity .18s ease; }
.cap .w.is-on { opacity: 1; }

/* Incoming */
.view-in .who { margin-top: 70px; }
.view-in .avatar { width: 96px; height: 96px; }
.in-actions {
  margin-top: auto;
  width: 100%;
  display: flex; justify-content: space-between;
  padding: 0 26px 10px;
}
#key-accept { animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-6px); } }
#key-accept.is-press { animation: none; transform: scale(.9); }

/* Later */
.view-lock { justify-content: center; padding-bottom: 120px; }
.lock-label { font-size: 14px; color: var(--accent); }
.lock-time { font-size: 84px; font-weight: 300; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.lock-date { font-size: 15px; color: #9a9a9a; }

/* Facts */
.facts {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.facts > div { border-top: 1px solid var(--line); padding-top: 20px; }
.fact-n { font-size: 12px; color: var(--accent); font-variant-numeric: tabular-nums; }
.facts h3 { font-weight: 500; font-size: 18px; letter-spacing: -0.01em; margin: 10px 0 6px; }
.facts p { color: var(--muted); font-size: 15px; max-width: 32ch; }

.foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 32px 40px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 13px; color: var(--muted);
}
.foot .logo { color: var(--ink); }

/* Responsive */
@media (max-width: 1100px) {
  .hero { display: flex; flex-direction: column-reverse; align-items: center; gap: 40px; min-height: 0; padding-top: 8px; padding-bottom: 64px; }
  .copy { width: 100%; max-width: 640px; }
}
@media (max-width: 920px) {
  .facts { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 700px) {
  .stage-inner { width: 100%; height: auto; flex-direction: column; align-items: center; padding-top: 0; }
  .cards { order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 24px; }
  .card { position: static; width: auto; animation: cardIn .6s ease both; animation-delay: calc(var(--i) * .08s); }
  .card:last-child { grid-column: 1 / -1; }
  .card button { height: 100%; flex-direction: column; gap: 8px; padding: 12px; }
  .card.is-on button { scale: 1; }
}
@media (max-width: 560px) {
  .nav, .hero, .facts, .foot { padding-left: 16px; padding-right: 16px; }
  .phone { transform: scale(.88); transform-origin: top center; margin-bottom: -76px; }
  .foot { flex-direction: column; align-items: flex-start; }
  .lede { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .avatar.ring::before, .avatar.ring::after, #key-accept, .dial-number::after { animation: none; }
  .card { animation: cardIn .01s both; }
}

/* Malayalam text: taller lines, no tight tracking (Malayalam glyphs need the room) */
h1 { letter-spacing: -0.01em; line-height: 1.25; font-size: clamp(32px, 3.9vw, 54px); max-width: none; font-weight: 600; }
h1 em { display: block; font-family: inherit; font-style: normal; font-weight: inherit; letter-spacing: inherit; color: var(--accent); }
.lede { line-height: 1.75; max-width: 34em; }
.card-t, .facts h3 { letter-spacing: 0; }
.card-d, .facts p { line-height: 1.6; }
@media (min-width: 701px) { .card { width: 220px; } }
