:root {
  color-scheme: light;
  --ink: #111713;
  --ink-raised: #17211b;
  --ink-soft: #5f665f;
  --canvas: #f4f2ed;
  --paper: #fcfbf8;
  --line: #d4d1c9;
  --cobalt: #5757df;
  --cobalt-dark: #3f3fb5;
  --cobalt-pale: #e4e3ff;
  --mint: #22c983;
  --candidate-wave: #798cff;
  --ayrovoice-wave: #36d49b;
  --danger: #c54742;
  --shadow: 0 26px 80px rgba(17, 24, 38, 0.12);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 10%, rgba(87, 87, 223, 0.09), transparent 26rem),
    var(--canvas);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--candidate-wave);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.masthead,
main,
footer {
  width: min(1480px, 100%);
  margin-inline: auto;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4.5vw, 68px);
  border-bottom: 1px solid rgba(17, 24, 38, 0.14);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: inherit;
  text-decoration: none;
}

.wordmark-mark {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.wordmark-copy {
  display: grid;
  gap: 1px;
}

.wordmark-copy strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.header-note,
.live-key,
.stage-topline,
.activity-list time,
.record-card time {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.header-note {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  margin: 0;
  color: var(--ink-soft);
}

.header-note span,
.stage-topline i,
.live-key i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(32, 180, 134, 0.12);
}

main {
  padding: 0 clamp(20px, 4.5vw, 68px) 96px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.72fr);
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 38px clamp(50px, 7vw, 106px);
  padding: clamp(62px, 7vw, 104px) 0 72px;
}

.intro-copy {
  align-self: end;
}

.hero-visual {
  position: relative;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: stretch;
  min-height: 580px;
  margin: 0;
  overflow: hidden;
  background: #ded7ca;
  box-shadow: 0 28px 70px rgba(17, 23, 19, 0.14);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 34px), calc(100% - 34px) 100%, 0 100%);
}

.hero-visual::after {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  content: "";
  pointer-events: none;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  max-width: 900px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(3.5rem, 6.1vw, 6.4rem);
  font-weight: 650;
  letter-spacing: -0.072em;
  line-height: 0.9;
}

h1 em {
  display: block;
  color: var(--cobalt);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 0.96em;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.065em;
}

.lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.03rem, 1.35vw, 1.25rem);
  line-height: 1.65;
}

.intro-aside a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-width: 235px;
  margin-top: 32px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.intro-aside a:hover span {
  transform: translateY(3px);
}

.intro-aside a span {
  transition: transform 0.2s ease;
}

.studio {
  margin-top: 22px;
  scroll-margin-top: 18px;
}

.studio-heading,
.records-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--ink);
}

.studio-heading h2,
.records-heading h2 {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 3vw, 3.25rem);
  font-weight: 580;
  letter-spacing: -0.055em;
}

.studio-heading > p,
.records-heading > p {
  max-width: 450px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.91rem;
  line-height: 1.55;
}

.console-grid {
  display: grid;
  grid-template-areas: "setup stage" "activity stage";
  grid-template-columns: minmax(310px, 0.68fr) minmax(520px, 1.32fr);
  grid-template-rows: auto 1fr;
  box-shadow: var(--shadow);
}

.panel {
  min-width: 0;
  padding: clamp(26px, 3vw, 44px);
  background: var(--paper);
  border: 1px solid var(--line);
}

.setup-panel {
  grid-area: setup;
}

.panel-heading {
  margin-bottom: 30px;
}

.panel-heading h2 {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.setup-panel label {
  display: block;
  margin: 20px 0 7px;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 700;
}

.setup-panel input,
.setup-panel select {
  width: 100%;
  min-height: 46px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.14rem;
  font-weight: 600;
}

.call-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 34px;
}

.call-actions button {
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 750;
}

.primary-action {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  padding-inline: 17px;
  border-color: var(--cobalt) !important;
  background: var(--cobalt);
  color: white;
}

.primary-action:hover:not(:disabled) {
  background: var(--cobalt-dark);
}

.secondary-action {
  background: transparent;
  color: var(--ink);
}

.secondary-action:hover:not(:disabled) {
  background: var(--ink);
  color: white;
}

.secondary-action.danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: var(--danger);
}

.error-message {
  margin: 14px 0 0;
  padding: 12px;
  border-left: 3px solid var(--danger);
  background: #f9e9e8;
  color: #832d29;
  font-size: 0.83rem;
  line-height: 1.45;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 25px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.45;
}

.privacy-note > span {
  display: grid;
  flex: 0 0 20px;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(32, 180, 134, 0.12);
  color: #0b805f;
  font-size: 0.65rem;
  font-weight: 900;
}

.privacy-note p {
  margin: 1px 0 0;
}

.call-stage {
  position: relative;
  display: flex;
  grid-area: stage;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 690px;
  overflow: hidden;
  border-left: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #05070a;
  background-size: 54px 54px;
  color: white;
  text-align: center;
}

.call-stage::after {
  position: absolute;
  inset: auto -12% -42% 25%;
  height: 64%;
  border-radius: 50%;
  background: var(--cobalt);
  content: "";
  filter: blur(110px);
  opacity: 0.18;
  pointer-events: none;
}

.stage-topline {
  position: absolute;
  top: 28px;
  right: 30px;
  left: 30px;
  display: flex;
  justify-content: flex-start;
  color: rgba(255, 255, 255, 0.52);
}

.stage-topline span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: white;
}

.stage-topline i {
  display: block;
}

.conversation-field {
  position: relative;
  display: grid;
  place-items: center;
  width: min(390px, 68vw);
  aspect-ratio: 1;
  margin-bottom: 30px;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.orbit-one {
  inset: 10%;
}

.orbit-two {
  inset: 25%;
  border-color: rgba(116, 164, 255, 0.3);
}

.orbit-label {
  position: absolute;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.62);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.orbit-listen {
  top: 7%;
  left: 25%;
}

.orbit-understand {
  top: 45%;
  right: -2%;
}

.orbit-act {
  bottom: 8%;
  left: 26%;
}

.voice-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(116, 164, 255, 0.28), rgba(52, 87, 229, 0.07));
  box-shadow: 0 0 0 18px rgba(116, 164, 255, 0.035);
}

.signal {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 50px;
}

.signal i {
  display: block;
  width: 4px;
  height: 9px;
  border-radius: 4px;
  background: var(--candidate-wave);
  transition: height 0.2s ease, background-color 0.2s ease;
}

.signal i:nth-child(2),
.signal i:nth-child(6) {
  height: 17px;
}

.signal i:nth-child(3),
.signal i:nth-child(5) {
  height: 28px;
}

.signal i:nth-child(4) {
  height: 42px;
}

.call-stage[data-state="responding"] .signal i,
.call-stage[data-state="speaking"] .signal i,
.call-stage[data-state="thinking"] .signal i {
  animation: signal-wave 0.72s ease-in-out infinite alternate;
}

.call-stage[data-state="responding"] .signal i {
  background: var(--ayrovoice-wave);
}

.call-stage[data-state="thinking"] .voice-core {
  animation: core-breathe 1.45s ease-in-out infinite;
}

.signal i:nth-child(2),
.signal i:nth-child(6) {
  animation-delay: 0.12s !important;
}

.signal i:nth-child(3),
.signal i:nth-child(5) {
  animation-delay: 0.24s !important;
}

.signal i:nth-child(4) {
  animation-delay: 0.36s !important;
}

.call-stage h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(2.4rem, 4.2vw, 4.6rem);
  font-weight: 560;
  letter-spacing: -0.06em;
}

.call-stage > p {
  position: relative;
  z-index: 1;
  max-width: 390px;
  min-height: 46px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.55;
}

.activity-panel {
  grid-area: activity;
  border-top: 0;
}

.activity-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.live-key {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
}

.live-key i {
  display: block;
  width: 6px;
  height: 6px;
}

.activity-list {
  max-height: 190px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.activity-list li {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  line-height: 1.42;
}

.activity-list time,
.record-card time {
  color: var(--ink-soft);
}

.activity-list li[data-tone="success"] span {
  color: #087657;
}

.activity-list li[data-tone="error"] span {
  color: var(--danger);
}

.records-section {
  margin-top: 96px;
}

.records-heading {
  border-bottom: 1px solid var(--line);
}

.empty-records {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 34px 0;
  color: var(--ink-soft);
}

.empty-records > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cobalt);
  font-size: 1.3rem;
}

.empty-records strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.empty-records p {
  margin: 4px 0 0;
  font-size: 0.82rem;
}

.records-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.record-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--cobalt);
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(17, 24, 38, 0.07);
}

.record-card h3 {
  margin: 0 0 7px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: -0.025em;
}

.record-card pre {
  max-height: 280px;
  margin: 18px 0 0;
  padding-top: 16px;
  overflow: auto;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.69rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 30px clamp(20px, 4.5vw, 68px);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.58);
}

footer p {
  margin: 0;
  font-size: 0.72rem;
}

footer p:last-child {
  justify-self: end;
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-mark {
  color: white;
}

@keyframes signal-wave {
  50% {
    height: 44px;
  }

  to {
    height: 13px;
  }
}

@keyframes core-breathe {
  50% {
    transform: scale(1.045);
    box-shadow: 0 0 0 25px rgba(116, 164, 255, 0.055);
  }
}

@media (max-width: 980px) {
  .intro {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .hero-visual {
    grid-column: 1;
    grid-row: auto;
    min-height: 560px;
  }

  .intro-aside {
    max-width: 620px;
  }

  .console-grid {
    grid-template-areas: "setup" "stage" "activity";
    grid-template-columns: 1fr;
  }

  .call-stage {
    min-height: 650px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .activity-panel {
    border-left: 1px solid var(--line);
  }

  .activity-list {
    max-height: 230px;
  }

  .records-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .masthead {
    padding-block: 17px;
  }

  .header-note {
    font-size: 0.55rem;
  }

  .intro {
    gap: 32px;
    padding: 58px 0 54px;
  }

  h1 {
    font-size: clamp(3.25rem, 16vw, 5.2rem);
  }

  .hero-visual {
    min-height: 430px;
  }

  .studio-heading,
  .records-heading {
    display: block;
  }

  .studio-heading > p,
  .records-heading > p {
    margin-top: 14px;
  }

  .call-stage {
    min-height: 560px;
    padding-inline: 18px;
  }

  .conversation-field {
    width: min(330px, 90vw);
  }

  .voice-core {
    width: 130px;
    height: 130px;
  }

  .stage-topline span:last-child {
    display: none;
  }

  .records-list {
    grid-template-columns: 1fr;
  }

  footer {
    grid-template-columns: 1fr auto;
  }

  footer > p:first-of-type {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
