/*
 * The AirNote page. It is built from the shared components in /site.css (the product hero, the
 * gradient stage, the story, the speech panel, the trust band, the scope card, the proof bento,
 * the FAQ and the call-to-action band) and adds only what AirNote needs: its dark status pill,
 * redrawn in CSS from the app's own design, the scenes of the story, and the polish switch.
 * Every rule is scoped to `.an-page` or an `.an-` class, so nothing here reaches another page.
 */

/* ---------- Hero ---------- */

.an-pill-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.an-pill-name img {
  width: 16px;
  height: 16px;
}

.an-page .window > img {
  width: 100%;
  height: auto;
}

/* ---------- Films ----------
 * Every AirNote film is filmed on its own sky with the app as a window, so it is shown
 * bare: no .sky or .window around it, and none of the zoom crop site.css gives Clario's. */

.an-film {
  overflow: hidden;
  border-radius: 24px;
  background: #eaf2fd;
  box-shadow:
    0 0 0 1px rgb(17 17 17 / 0.06),
    0 40px 90px -50px rgb(0 30 70 / 0.45);
}

.an-film video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 1200;
}

.an-film-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  margin: 28px 0 0;
}

.an-film-row figcaption b {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.an-film-row figcaption span {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- Live embeds (assets/products/airnote/embeds) ---------- */

.an-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.an-embed-hinglish {
  height: 360px;
}

.an-embed-flow {
  height: 340px;
  margin: 0 0 32px;
}

@media (max-width: 760px) {
  .an-film-row {
    grid-template-columns: 1fr;
  }

  .an-embed-flow {
    height: 960px;
  }

  .an-embed-hinglish {
    height: 440px;
  }
}

/* ---------- AirNote's status pill ---------- */

.an-hud {
  display: grid;
  place-items: center;
  width: 184px;
  height: 46px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 999px;
  background: linear-gradient(180deg, #25262c, #141519);
  box-shadow:
    0 20px 44px -14px rgb(0 20 50 / 0.6),
    inset 0 1px 0 rgb(255 255 255 / 0.06);
  color: #a6abb6;
  font-size: 15px;
}

.an-hud-auto {
  width: auto;
  padding: 0 22px;
}

.an-hud-state {
  display: inline-flex;
  grid-area: 1 / 1;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.an-hud-state b {
  color: #eef0f4;
  font-weight: 600;
}

.an-hud svg {
  width: 17px;
  height: 17px;
  color: #4ade80;
  stroke-width: 2.2;
}

.an-rec {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #f06a6a 0 4.5px, rgb(240 106 106 / 0.18) 5px);
  animation: an-rec 1.6s ease-in-out infinite;
}

@keyframes an-rec {
  50% {
    box-shadow: 0 0 0 5px rgb(240 106 106 / 0.12);
  }
}

.an-ok {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
}

.an-bars,
.an-dash {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.an-bars i {
  width: 4px;
  height: 13px;
  border-radius: 2px;
  background: #9fb0ff;
  animation: an-bar 1.05s ease-in-out infinite alternate;
}

.an-bars i:nth-child(odd) {
  height: 17px;
  animation-delay: -0.35s;
}

.an-bars i:nth-child(3n) {
  height: 21px;
  animation-delay: -0.7s;
  animation-duration: 0.9s;
}

.an-bars i:nth-child(4n + 1) {
  height: 9px;
  animation-delay: -0.2s;
}

@keyframes an-bar {
  from {
    transform: scaleY(0.35);
  }
}

.an-dash i {
  width: 5px;
  height: 3px;
  border-radius: 2px;
  background: #9fb0ff;
  animation: an-dash 1.4s ease-in-out infinite;
}

.an-dash i:nth-child(2) {
  animation-delay: 0.1s;
}

.an-dash i:nth-child(3) {
  animation-delay: 0.2s;
}

.an-dash i:nth-child(4) {
  animation-delay: 0.3s;
}

.an-dash i:nth-child(5) {
  animation-delay: 0.4s;
}

.an-dash i:nth-child(6) {
  animation-delay: 0.5s;
}

.an-dash i:nth-child(7) {
  animation-delay: 0.6s;
}

@keyframes an-dash {
  50% {
    opacity: 0.3;
  }
}

/* ---------- The story's scenes ---------- */

.an-page .scene > .window > img {
  height: 100%;
  object-fit: cover;
  object-position: 30% 50%;
}

.an-scene-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 0;
  padding: 24px 28px;
  background: linear-gradient(180deg, #fff 0%, var(--sheet) 100%);
}

.an-heard {
  max-width: 440px;
  margin: 0;
  font-size: clamp(16px, 1.7vw, 22px);
  line-height: 1.5;
  text-align: center;
}

.an-heard span {
  display: inline-block;
  padding: 0 2px;
  border-bottom: 3px solid;
  animation: an-word 6s var(--ease) infinite both;
  animation-delay: calc(var(--i) * 0.5s);
}

.an-heard .hi,
.an-legend .hi::before {
  border-color: #ffc896;
}

.an-heard .en,
.an-legend .en::before {
  border-color: #9cc3f2;
}

@keyframes an-word {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }

  8%,
  84% {
    opacity: 1;
    transform: none;
  }

  100% {
    opacity: 0;
  }
}

.an-legend {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  list-style: none;
}

.an-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.an-legend li::before {
  width: 14px;
  border-bottom: 3px solid;
  content: '';
}

.an-diff {
  align-items: stretch;
  gap: 16px;
}

.an-diff small,
.an-polish-rows small {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.an-raw {
  color: var(--muted);
  font: 14px/1.6 var(--mono);
}

.an-raw del {
  color: #b4542a;
  text-decoration-thickness: 1.5px;
}

.an-clean {
  padding: 14px 16px;
  border: 1px solid #cfe0f6;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.45;
}

.an-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.an-chips li {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--brand);
  font-size: 12.5px;
}

.an-chat {
  align-items: stretch;
  justify-content: flex-end;
  gap: 14px;
}

.an-msg {
  display: flex;
  gap: 10px;
  margin-bottom: auto;
}

.an-msg i {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #e8e0f3;
  color: #4a2a6e;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}

.an-msg p {
  color: var(--ink-2);
  font-size: 15px;
}

.an-msg b {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.an-compose {
  display: grid;
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid #d3d7dc;
  border-radius: 12px;
  background: #fff;
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.45;
}

.an-compose > span {
  grid-area: 1 / 1;
}

.an-placeholder {
  color: var(--faint);
  animation: an-empty 6s linear infinite;
}

.an-typed {
  animation: an-filled 6s linear infinite;
}

@keyframes an-empty {
  0%,
  30% {
    opacity: 1;
  }

  31%,
  100% {
    opacity: 0;
  }
}

@keyframes an-filled {
  0%,
  30% {
    opacity: 0;
  }

  31%,
  100% {
    opacity: 1;
  }
}

.an-chat .an-hud {
  align-self: center;
  width: auto;
  height: 38px;
  padding: 0 18px;
  font-size: 14px;
  animation: an-pop 6s var(--ease) infinite;
}

@keyframes an-pop {
  0%,
  32% {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }

  38%,
  88% {
    opacity: 1;
    transform: none;
  }

  100% {
    opacity: 0;
  }
}

/* ---------- Hinglish ---------- */

.an-polish-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 20px;
  margin-top: 44px;
  padding: 20px;
  border-radius: 28px;
  background: var(--sheet);
}

.an-polish-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 20px;
}

.an-switch {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
}

.an-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.an-switch-track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #cfd4da;
  transition: background-color 0.2s;
}

.an-switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(17 17 17 / 0.25);
  transition: transform 0.2s var(--ease);
  content: '';
}

.an-switch input:checked + .an-switch-track {
  background: var(--brand);
}

.an-switch input:checked + .an-switch-track::after {
  transform: translateX(18px);
}

.an-switch input:focus-visible + .an-switch-track {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.an-switch-text {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.an-switch-text b {
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
}

/* On is drawn by default; the switch reveals Off where the browser can follow it. */
.an-polish-card .an-off {
  display: none;
}

.an-polish-card:has(input:not(:checked)) .an-off {
  display: block;
}

.an-polish-card:has(input:not(:checked)) small .an-off {
  display: inline;
}

.an-polish-card:has(input:not(:checked)) .an-on {
  display: none;
}

.an-try {
  color: var(--muted);
  font-size: 15px;
}

.an-honest {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #dcdfe3;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}

.an-honest svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--brand);
}

.an-polish-out.sky {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(20px, 3.6vw, 52px);
  border-radius: 20px;
}

.an-polish-rows {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.an-result em {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--brand);
  font-size: 11.5px;
  font-style: normal;
}

.an-result p {
  padding: 14px 16px;
  border: 1px solid #cfe0f6;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1.45;
}

.an-result p.an-off {
  border-color: var(--line);
  color: var(--ink-2);
  font: 15px/1.6 var(--mono);
}

.an-sample {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Learns your words ---------- */

.an-learn-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 44px;
}

.an-learn-shot {
  grid-row: span 2;
  align-self: start;
  margin: 0;
}

.an-rules {
  padding: 30px 30px 26px;
  border-radius: 24px;
  background: var(--sheet);
}

.an-kicker {
  color: var(--muted);
  font-size: 14px;
}

.an-rules h3,
.an-learned h3 {
  margin-top: 6px;
  font-size: 24px;
  letter-spacing: -0.015em;
}

.an-rule-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.an-rule-list li {
  display: grid;
  grid-template-columns: 42% 16px minmax(0, 1fr) 2.4em;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #dcdfe3;
  font-size: 15px;
}

.an-rule-list span {
  color: var(--muted);
}

.an-rule-list svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
}

.an-rule-list b {
  font-weight: 500;
}

.an-rule-list em {
  color: var(--faint);
  text-align: right;
  font: 13px var(--mono);
  font-style: normal;
}

.an-note {
  margin-top: 14px;
  color: var(--faint);
  font-size: 13px;
}

.an-learned.proof-quote {
  grid-row: auto;
  gap: 28px;
  min-height: 260px;
}

.an-learned .an-hud {
  align-self: flex-start;
}

.an-learned p {
  max-width: 340px;
  margin-top: 8px;
  color: #9aa6b6;
  font-size: 15px;
  line-height: 1.5;
}

.an-learn .start-steps {
  margin-top: 20px;
}

/* ---------- Style per context ---------- */

.an-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 64px;
}

.an-contexts {
  margin: 36px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.an-contexts li {
  display: grid;
  gap: 4px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.an-contexts b {
  font-size: 17px;
  font-weight: 500;
}

.an-contexts span {
  color: var(--muted);
  font-size: 15px;
}

.an-contexts q {
  margin-top: 8px;
  padding-left: 14px;
  border-left: 2px solid #b9d3f3;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
  quotes: none;
}

.an-style-shot {
  margin: 0;
  padding: clamp(18px, 3vw, 44px) 0 clamp(18px, 3vw, 44px) clamp(18px, 3vw, 44px);
  overflow: hidden;
}

/* The screen is cut at its right edge on purpose, so the words stay readable. */
.an-style-shot .window {
  border-right: 0;
  border-radius: 14px 0 0 14px;
}

.an-style-shot img {
  mask-image: linear-gradient(90deg, #000 78%, transparent);
}

.an-buckets {
  margin: 24px 0 0;
}

.an-buckets .window {
  border-radius: 18px;
}

/* ---------- Insights ---------- */

.an-stage-wide {
  width: 100%;
  margin-top: 48px;
}

.an-insight-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 40px;
}

/* ---------- Where your words go, and the rest ---------- */

.an-trust .trust-grid p {
  max-width: 260px;
}

.an-proof .bento-proof {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.an-proof .proof-model {
  grid-column: span 2;
}

.an-proof .proof-model b {
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.025em;
}

.an-statement {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 430;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.an-statement-foot {
  margin-top: 18px;
  color: #9aa6b6;
  font-size: 14px;
}

.an-cta .eyebrow {
  color: rgb(255 255 255 / 0.78);
}

.an-cta h2,
.an-cta p,
.an-cta .actions {
  position: relative;
  z-index: 1;
}

/* ---------- Narrower screens ---------- */

@media (max-width: 1100px) {
  .an-insight-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .an-polish-card,
  .an-learn-grid,
  .an-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .an-learn-shot {
    grid-row: auto;
  }

  .an-split {
    gap: 40px;
  }

  .an-proof .bento-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .an-proof .proof-quote {
    grid-column: span 2;
    grid-row: auto;
    min-height: 360px;
  }

  .an-page .story.is-inline .scene > .panel-ui,
  .an-page .story.is-inline .scene > .window {
    height: 100%;
  }
}

@media (max-width: 720px) {
  .an-hud {
    width: 150px;
    height: 38px;
    font-size: 13px;
  }

  .an-hud-auto,
  .an-chat .an-hud {
    width: auto;
  }

  .an-bars i {
    width: 3px;
  }

  .an-scene-body {
    gap: 12px;
    padding: 14px 16px;
  }

  .an-diff {
    gap: 8px;
  }

  .an-chips,
  .an-msg,
  .an-scene-body .an-legend {
    display: none;
  }

  .an-company .grain {
    aspect-ratio: 1.1;
  }

  .an-raw {
    font-size: 12px;
  }

  .an-compose {
    min-height: 0;
  }

  .an-polish-card {
    padding: 12px;
  }

  .an-polish-side {
    padding: 16px 8px;
  }

  .an-polish-rows {
    padding: 18px;
  }

  .an-result p {
    font-size: 16px;
  }

  .an-insight-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .an-rules {
    padding: 24px 20px;
  }

  .an-rule-list li {
    grid-template-columns: 44% 14px minmax(0, 1fr) 2.2em;
    gap: 8px;
    font-size: 14px;
  }

  .an-proof .bento-proof {
    grid-template-columns: minmax(0, 1fr);
  }

  .an-proof .proof-quote,
  .an-proof .proof-model {
    grid-column: auto;
  }
}

/* Without motion, each pill shows its last state and every word is in place. */
@media (prefers-reduced-motion: reduce) {
  .an-heard span,
  .an-typed,
  .an-chat .an-hud {
    opacity: 1;
    animation: none;
  }

  .an-placeholder {
    opacity: 0;
    animation: none;
  }
}
