/* DoctorAI page layout. Tokens, nav, buttons and footer come from /assets/site.css. */

/* Real app screens: phone-screen radius, a hairline and a tinted shadow. */
.screen { margin: 0; overflow: hidden; border-radius: 26px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); box-shadow: var(--shadow-lg); }
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- Hero ---------- */
.hero { padding: clamp(16px, 3vw, 40px) 0 clamp(64px, 8vw, 112px); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
  min-height: min(calc(100dvh - var(--nav-h) - 56px), 760px);
}
.hero h1 { font-size: var(--display-l); line-height: 1; letter-spacing: -0.048em; max-width: 9.2em; }
.hero-sub { margin-top: 24px; font-size: var(--text-lg); line-height: 1.5; color: var(--muted); max-width: 27em; }
.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media { position: relative; width: min(100%, 500px); aspect-ratio: 4 / 5; justify-self: end; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; border-radius: var(--r-surface); }
.hero-screen { position: absolute; width: 48%; aspect-ratio: 620 / 1120; left: -20%; bottom: -9%; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 48px; }
  .hero-media { justify-self: stretch; width: 100%; aspect-ratio: 5 / 4; margin-bottom: 48px; }
  .hero-photo { object-position: 50% 62%; }
  .hero-screen { width: 38%; left: auto; right: 6%; bottom: -14%; }
}
@media (max-width: 480px) {
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-screen { width: 44%; bottom: -18%; }
  .hero-media { margin-bottom: 64px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-photo { animation: settle 1.2s var(--ease) .05s both; }
  .hero-screen { animation: rise-far 1s var(--ease) .35s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
  @keyframes rise-far { from { opacity: 0; transform: translateY(56px); } }
  @keyframes settle { from { opacity: 0; transform: scale(1.04); } }
}

/* ---------- Facts ---------- */
.facts-row {
  list-style: none; margin: 0; padding: 36px 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px;
  border-block: 1px solid var(--line);
}
.facts-row li { display: grid; gap: 6px; }
.facts-row strong { font-size: clamp(2rem, 1.3rem + 2.2vw, 3rem); font-weight: 750; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.facts-row span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--text-sm); }
.facts-row .star { width: 15px; height: 15px; color: var(--accent-ink); }
@media (max-width: 760px) {
  .facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .facts-row li:last-child { grid-column: 1 / -1; }
}

/* ---------- Sample answer with its sources ---------- */
.demo {
  margin-top: 48px;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.demo-chat { padding: clamp(20px, 3.4vw, 44px); }
/* Chat bubble radius mirrors the app, not the surface scale. */
.bubble {
  width: fit-content; max-width: 28em; margin-left: auto;
  padding: 12px 18px; border-radius: 20px 20px 6px 20px;
  background: var(--accent-fill); color: var(--on-accent); font-weight: 550; line-height: 1.45;
}
.refs-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--accent-softer); color: var(--accent-ink); border: 1px solid var(--accent-soft);
  font-size: var(--text-sm); font-weight: 650; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .2s var(--ease);
}
.refs-chip .i { width: 16px; height: 16px; }
.refs-chip:hover { background: var(--accent-soft); }
.refs-chip:active { transform: scale(0.97); }
.refs-chip[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); }
.answer { margin-top: 18px; color: var(--ink-2); font-size: 1rem; line-height: 1.6; }
.answer h3 { margin: 22px 0 8px; font-size: 1.0625rem; letter-spacing: -0.01em; color: var(--ink); }
.answer ul { margin: 0; padding-left: 1.15em; display: grid; gap: 8px; }
.answer li::marker { color: var(--accent); }
.answer strong { color: var(--ink); font-weight: 650; }

.demo-sources { position: relative; background: var(--sunk); border-left: 1px solid var(--line); padding: clamp(20px, 3vw, 36px); outline: none; }
.sources-empty, .sources-list { position: sticky; top: calc(var(--nav-h) + 28px); }
.sources-empty { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 48px 12px; color: var(--muted); }
.sources-empty .i { width: 40px; height: 40px; color: var(--accent-ink); }
.sources-empty p { max-width: 20em; }
.sources-empty strong { color: var(--ink); font-weight: 650; }
html:not(.js) .sources-empty { display: none; }
.js .demo:not(.is-open) .sources-list { display: none; }
.js .demo.is-open .sources-empty { display: none; }
.sources-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.sources-sub { color: var(--muted); font-size: var(--text-sm); }
.sources-list ol { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.source {
  position: relative; display: grid; gap: 2px; padding: 14px 44px 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-inner);
  text-decoration: none; color: inherit;
}
a.source { transition: border-color .25s var(--ease), transform .25s var(--ease); }
a.source:hover { border-color: var(--accent); transform: translateY(-1px); }
.source-kind { font-size: var(--text-xs); font-weight: 650; color: var(--accent-ink); }
.source-name { font-weight: 600; line-height: 1.35; }
.source-meta { font-size: var(--text-xs); color: var(--muted); }
.source-out { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .demo.is-open .sources-list li { animation: sheet-in .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(12px); } }
}
@media (max-width: 860px) {
  .demo { grid-template-columns: 1fr; }
  .demo-sources { border-left: 0; border-top: 1px solid var(--line); }
  .sources-empty { padding: 24px 8px; }
}

/* ---------- Tools ---------- */
.tools-grid { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tool-list li { border-radius: var(--r-surface); border: 1px solid transparent; transition: background-color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); }
.tool-list li.is-active { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.tool-list [role="tab"] {
  width: 100%; display: flex; align-items: center; gap: 16px; padding: 14px 16px;
  background: none; border: 0; border-radius: var(--r-surface); cursor: pointer; text-align: left;
  color: var(--muted); font-size: 1.1875rem; font-weight: 650; letter-spacing: -0.02em;
  transition: color .25s var(--ease);
}
.tool-list [role="tab"]:hover, .tool-list [aria-selected="true"] { color: var(--ink); }
.tool-icon {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: var(--r-inner); background: var(--sunk); color: var(--ink-2);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.tool-icon .i { width: 22px; height: 22px; }
.tool-list [aria-selected="true"] .tool-icon { background: var(--accent-soft); color: var(--accent-ink); }
.tool-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--ease); }
.tool-body > div { overflow: hidden; }
.tool-body p { padding: 0 20px 20px 76px; color: var(--muted); max-width: 34em; }
.js .tool-list li:not(.is-active) .tool-body { grid-template-rows: 0fr; }

.tool-stage {
  position: sticky; top: calc(var(--nav-h) + 24px);
  aspect-ratio: 1 / 1.02; overflow: hidden; border-radius: var(--r-surface);
  background:
    radial-gradient(70% 55% at 50% 100%, var(--accent-soft), transparent 72%),
    var(--accent-softer);
}
.tool-stage img {
  position: absolute; left: 50%; top: 9%; width: min(58%, 330px);
  border-radius: 28px; border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translate(-50%, 28px);
  transition: opacity .45s var(--ease), transform .7s var(--ease);
}
.tool-stage img.is-active { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 860px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tool-stage { position: relative; top: 0; order: -1; aspect-ratio: 1 / 0.9; }
  .tool-stage img { width: min(56%, 300px); top: 8%; }
  .tool-body p { padding-left: 76px; }
}
@media (max-width: 480px) {
  .tool-body p { padding: 0 16px 18px; }
}

/* ---------- Who it's for ---------- */
.people-grid { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; }
.person { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); }
.person-night { grid-row: span 2; }
.person-media { position: relative; min-height: 260px; }
.person-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.person-night .person-media { flex: 1; }
.person-study .person-media { aspect-ratio: 2 / 1; min-height: 0; }
.person-copy { padding: 22px 24px 26px; }
.person h3 { font-size: 1.3125rem; letter-spacing: -0.02em; }
.person p { margin-top: 6px; color: var(--muted); max-width: 30em; }
.person-clinic { justify-content: space-between; gap: 32px; padding: 26px; background: var(--accent-soft); border-color: transparent; }
.person-clinic .person-copy { padding: 0; }
.person-clinic .i { width: 44px; height: 44px; color: var(--accent-ink); }
.person-clinic p { color: var(--ink-2); }
@media (max-width: 760px) {
  .people-grid { grid-template-columns: 1fr; }
  .person-night { grid-row: auto; }
  .person-night .person-media { flex: none; aspect-ratio: 4 / 3; }
}

/* ---------- Where its job ends ---------- */
.limits-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: 36px;
  border-top: 1px solid var(--line); padding-top: clamp(48px, 6vw, 80px);
}
.limits h2 { grid-column: 1 / span 9; font-size: clamp(2.5rem, 1.1rem + 5.6vw, 5.75rem); line-height: 0.98; letter-spacing: -0.055em; }
.limits-body { grid-column: 6 / -1; display: grid; gap: 20px; font-size: var(--text-lg); line-height: 1.5; color: var(--ink-2); max-width: 32em; }
.limits-urgent { display: flex; align-items: flex-start; gap: 12px; color: var(--ink); font-weight: 650; font-size: var(--text-md); }
.limits-urgent .i { width: 24px; height: 24px; margin-top: 1px; color: var(--accent-ink); }
@media (max-width: 860px) { .limits h2, .limits-body { grid-column: 1 / -1; } }

/* ---------- Made for real life (bento, 5 cells) ---------- */
.bento { margin-top: 48px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.cell { position: relative; display: flex; flex-direction: column; overflow: hidden; min-height: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); }
.cell-copy { padding: 26px 26px 0; }
.cell h3 { font-size: 1.3125rem; letter-spacing: -0.02em; }
.cell p { margin-top: 6px; color: var(--muted); font-size: var(--text-sm); max-width: 26em; }
.cell-shot { position: relative; flex: 1; min-height: 280px; margin-top: 24px; overflow: hidden; }
.cell-shot img {
  position: absolute; top: 0; left: 50%; width: min(78%, 320px);
  border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow-md);
  transform: translate(-50%, var(--y, 0%));
}
/* Each crop shows the part of the screen the cell is about. */
.cell-attach .cell-shot img { --y: -53%; }
.cell-remind .cell-shot img { --y: -27%; }
.cell-chats .cell-shot img { --y: -7%; }
.cell-attach { grid-column: span 5; }
.cell-voice { grid-column: span 3; justify-content: space-between; padding: 26px; background: var(--accent-soft); border-color: transparent; }
.cell-voice .cell-copy { padding: 0; }
.cell-voice p { color: var(--ink-2); }
.voice-icons { display: flex; gap: 10px; color: var(--accent-ink); }
.voice-icons .i { width: 44px; height: 44px; }
.cell-remind { grid-column: span 4; }
.cell-lang { grid-column: span 7; justify-content: space-between; padding-bottom: 26px; }
.cell-chats { grid-column: span 5; }
.langs { list-style: none; margin: 28px 0 0; padding: 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.langs li { padding: 8px 16px; border-radius: var(--r-pill); background: var(--sunk); color: var(--ink-2); font-size: var(--text-md); font-weight: 500; }
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
  .cell-attach, .cell-voice, .cell-remind, .cell-chats { grid-column: span 1; }
  .cell-lang { grid-column: 1 / -1; min-height: 0; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .cell-voice { min-height: 240px; }
}

/* ---------- Pricing ---------- */
.pricing-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.plan { grid-column: span 4; display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); }
.plan h3 { font-size: 1.3125rem; letter-spacing: -0.02em; }
.plan-num { margin-top: 18px; display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: var(--text-sm); }
.plan-num strong { font-size: clamp(3rem, 2rem + 3vw, 4.5rem); font-weight: 750; letter-spacing: -0.055em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.plan ul { list-style: none; margin: 24px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li .i { width: 18px; height: 18px; margin-top: 4px; color: var(--accent-ink); }
.plan-note { margin-top: auto; padding-top: 22px; color: var(--muted); font-size: var(--text-sm); }
.plan-premium { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-softer), var(--surface) 65%); box-shadow: var(--shadow-md); }
.pricing-aside { grid-column: span 4; display: grid; align-content: start; gap: 12px; padding: 28px 8px 0 20px; }
.pricing-aside h3 { font-size: 1.1875rem; letter-spacing: -0.015em; }
.pricing-aside p { color: var(--muted); font-size: var(--text-sm); max-width: 28em; }
@media (max-width: 960px) {
  .plan { grid-column: span 6; }
  .pricing-aside { grid-column: 1 / -1; padding: 12px 4px 0; }
}
@media (max-width: 600px) { .plan { grid-column: 1 / -1; } }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 48px; align-items: start; }
.faq h2 { position: sticky; top: calc(var(--nav-h) + 24px); font-size: var(--display-m); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 1.1875rem; font-weight: 650; letter-spacing: -0.015em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .i { width: 20px; height: 20px; color: var(--muted); rotate: 45deg; transition: rotate .35s var(--ease); }
.faq-list details[open] summary .i { rotate: 0deg; }
.faq-list details p { padding: 0 48px 24px 0; color: var(--muted); max-width: 60ch; }
.faq-list a { color: var(--accent-ink); text-underline-offset: 3px; }
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .faq-list { interpolate-size: allow-keywords; }
    .faq-list details::details-content { block-size: 0; overflow: hidden; transition: block-size .4s var(--ease), content-visibility .4s allow-discrete; }
    .faq-list details[open]::details-content { block-size: auto; }
  }
}
@media (max-width: 760px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq h2 { position: static; }
  .faq-list details p { padding-right: 0; }
}

/* ---------- Closing ---------- */
.end { padding-bottom: clamp(72px, 9vw, 128px); }
.end-panel {
  display: grid; justify-items: center; gap: 28px; text-align: center;
  padding: clamp(48px, 7vw, 96px) 24px; border-radius: var(--r-surface);
  background: radial-gradient(80% 90% at 50% 0%, var(--accent-soft), transparent 70%), var(--accent-softer);
}
.end-panel img { width: 72px; height: 72px; }
.end-panel h2 { font-size: var(--display-s); max-width: 17em; }
