/* Ordela landing
   Palette: cool paper, deep ink, one flag-red for actions, lagoon teal for the chat world.
   Type: Unbounded (display, wide, round — reads like a sign on a salon door) + Onest (body). */

:root {
  --paper: #F3F5F4;
  --paper-2: #E7ECEA;
  --ink: #16202E;
  --ink-2: #475366;
  --line: #CFD7D4;
  --red: #C8102E;
  --red-deep: #A00C24;
  --lagoon: #0F5E5A;
  --wall: #E9E4DA;
  --bubble-out: #D7F5CD;
  --bubble-in: #FFFFFF;

  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --body: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* modular scale, ratio ~1.25 on a 17px base */
  --fs-0: 0.875rem;
  --fs-1: 1.0625rem;
  --fs-2: 1.25rem;
  --fs-3: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
  --fs-4: clamp(2.1rem, 1.5rem + 3.2vw, 4rem);

  --wrap: 72rem;
  --gutter: clamp(1.125rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7.5rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-1);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
[id] { scroll-margin-top: 4.5rem; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }

a { color: inherit; }
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: .6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* ---------- type ---------- */

.h2 {
  font-family: var(--display);
  font-size: var(--fs-3);
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 22ch;
  text-wrap: balance;
}
.h3 {
  font-family: var(--body);
  font-size: var(--fs-2);
  line-height: 1.3;
  font-weight: 600;
}
.lead { font-size: var(--fs-2); line-height: 1.5; max-width: 34ch; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font: 600 var(--fs-1)/1.2 var(--body);
  text-decoration: none;
  transition: background-color .15s ease, transform .15s ease;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-deep); }
.btn--primary:active { transform: translateY(1px); }
.btn--quiet { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; padding-inline: .5rem; }
.btn--quiet:hover { text-decoration-thickness: 2px; }
.btn--light { background: #fff; color: var(--red-deep); }
.btn--light:hover { background: var(--paper); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand__mark { width: 1.75rem; height: 1.75rem; color: var(--red); }
.brand__word {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.site-nav { display: none; gap: 1.5rem; }
.site-nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; }
.site-nav a:hover { color: var(--ink); }

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.lang__btn {
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0 .55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 600 .8125rem/1 var(--body);
  letter-spacing: .02em;
  cursor: pointer;
}
.lang__btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lang__btn:not([aria-pressed="true"]):hover { color: var(--ink); background: var(--paper-2); }

@media (min-width: 60rem) {
  .site-nav { display: flex; margin-right: 1rem; }
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) var(--section); }
.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}
.hero__title {
  font-family: var(--display);
  font-size: var(--fs-4);
  line-height: 1.06;
  letter-spacing: -0.025em;
  max-width: 16ch;
  text-wrap: balance;
}
.hero__sub {
  margin-top: 1.5rem;
  font-size: var(--fs-2);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 38ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
  margin-top: 2rem;
}
.hero__note {
  margin-top: 1.25rem;
  font-size: var(--fs-0);
  color: var(--ink-2);
}

@media (min-width: 56rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
}

/* ---------- phone + chat (the signature element) ---------- */

.phone {
  margin: 0;
  justify-self: center;
  width: min(100%, 23rem);
}
.phone__screen {
  display: flex;
  flex-direction: column;
  height: 36rem;
  border: 10px solid var(--ink);
  border-radius: 2.5rem;
  overflow: hidden;
  background: var(--wall);
  box-shadow: 0 30px 60px -30px rgba(22, 32, 46, .45);
}
.phone__caption {
  margin-top: 1rem;
  text-align: center;
  font-size: var(--fs-0);
  color: var(--ink-2);
}

.chat__head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1rem .85rem;
  background: var(--lagoon);
  color: #fff;
}
.chat__avatar {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: #F6D8C9;
  color: var(--lagoon);
  font: 600 1rem/1 var(--display);
}
.chat__who { display: grid; line-height: 1.25; }
.chat__name { font-weight: 600; }
.chat__status { font-size: .8125rem; opacity: .85; }

.chat__log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .75rem .75rem 1rem;
  overflow-y: auto;
  scroll-behavior: smooth;
  background-color: var(--wall);
  background-image: radial-gradient(rgba(22, 32, 46, .06) 1px, transparent 1px);
  background-size: 14px 14px;
}
.chat__day {
  align-self: center;
  padding: .2rem .6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, .8);
  font-size: .75rem;
  color: var(--ink-2);
}
.chat__live { display: contents; }

.msg {
  position: relative;
  max-width: 85%;
  padding: .5rem .65rem 1.15rem;
  border-radius: .85rem;
  font-size: .9375rem;
  line-height: 1.4;
  box-shadow: 0 1px 0 rgba(22, 32, 46, .12);
}
.msg--in { align-self: flex-start; background: var(--bubble-in); border-top-left-radius: .25rem; }
.msg--out { align-self: flex-end; background: var(--bubble-out); border-top-right-radius: .25rem; }
.msg__time {
  position: absolute;
  right: .6rem;
  bottom: .3rem;
  font-size: .6875rem;
  color: #5B6676;
}
.msg[hidden] { display: none; }

.msg--voice {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 13rem;
  padding-bottom: 1.15rem;
}
.voice__play {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent var(--lagoon);
  flex: none;
}
.voice__wave { display: flex; align-items: center; gap: 2px; height: 1.5rem; flex: 1; }
.voice__wave i { display: block; width: 3px; border-radius: 2px; background: #9AA6A3; }
.voice__wave i:nth-child(3n+1) { height: 40%; }
.voice__wave i:nth-child(3n+2) { height: 85%; }
.voice__wave i:nth-child(3n)   { height: 60%; }
.voice__wave i:nth-child(-n+4) { background: var(--lagoon); }
.voice__len { font-size: .75rem; color: #5B6676; }

.msg__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .6rem;
}
.chip {
  flex: 1 1 auto;
  min-height: 2.5rem;
  padding: .45rem .9rem;
  border: 1px solid rgba(15, 94, 90, .35);
  border-radius: .6rem;
  background: #fff;
  color: var(--lagoon);
  font: 600 .9375rem/1.2 var(--body);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, opacity .2s ease;
}
.chip--go { background: var(--lagoon); border-color: var(--lagoon); color: #fff; }
.chip:hover:not(:disabled) { filter: brightness(1.08); }
.chip:disabled { cursor: default; opacity: .45; }
.chip.is-chosen:disabled { opacity: 1; }
.chip--static { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; cursor: default; }

/* Only the "ask" message pulses its button once the chat has played, to invite a tap. */
.msg--ask:not(.is-answered):not(.is-pending) .chip--go { animation: nudge 2.4s ease-in-out 1s 2; }
@keyframes nudge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(15, 94, 90, 0); }
  50% { box-shadow: 0 0 0 6px rgba(15, 94, 90, .18); }
}

.msg--done { animation: pop .35s ease-out; }
.msg__tag {
  display: inline-block;
  margin: 0 .35rem .15rem 0;
  padding: .1rem .5rem .1rem 1.35rem;
  border-radius: 999px;
  background: var(--lagoon);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: .8rem;
  background-position: .4rem center;
}

/* Intro playback: pending messages are removed from layout so the log grows naturally */
.is-playing .is-pending,
.msg.is-pending { display: none; }
.is-playing .msg:not(.is-pending) { animation: pop .3s ease-out; }
@keyframes pop {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.typing {
  align-self: flex-end;
  display: inline-flex;
  gap: 4px;
  padding: .7rem .8rem;
  border-radius: .85rem;
  border-top-right-radius: .25rem;
  background: var(--bubble-out);
}
.typing[hidden] { display: none; }
.typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6E8C78;
  animation: blink 1s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.chat__bar {
  padding: .6rem .75rem .8rem;
  background: var(--wall);
}
.chat__bar span {
  display: block;
  height: 2.5rem;
  border-radius: 999px;
  background: #fff;
}

/* ---------- problem: a working day ---------- */

.problem {
  padding-block: var(--section);
  background: var(--paper-2);
}
.day {
  list-style: none;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.day__item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
}
.day__item:last-child { border-bottom: 1px solid var(--line); }
.day__time {
  font: 500 1.0625rem/1.5 var(--display);
  color: var(--red-deep);
  font-variant-numeric: tabular-nums;
}
.day__item p { max-width: 52ch; font-size: var(--fs-2); line-height: 1.45; }
.problem__pitch {
  margin-top: clamp(2rem, 5vw, 3rem);
  max-width: 40ch;
  font-size: var(--fs-2);
  font-weight: 600;
}

@media (min-width: 48rem) {
  .day { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
  .day__item:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

/* ---------- how it works ---------- */

.how { padding-block: var(--section); }
.steps {
  list-style: none;
  counter-reset: step;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  display: grid;
  gap: 2.25rem;
}
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  column-gap: 1rem;
  row-gap: .4rem;
}
.step::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  font: 600 1.0625rem/1 var(--display);
}
.step p { color: var(--ink-2); max-width: 40ch; }

@media (min-width: 64rem) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
  .step { grid-template-columns: 1fr; }
  .step::before { grid-row: auto; margin-bottom: .75rem; }
}

/* ---------- features ---------- */

.features { padding-block: 0 var(--section); }
.feat-list {
  list-style: none;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  display: grid;
  border-top: 2px solid var(--ink);
}
.feat-list li {
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--line);
}
.feat-list p { margin-top: .35rem; color: var(--ink-2); max-width: 46ch; }

@media (min-width: 48rem) {
  .feat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
}
@media (min-width: 64rem) {
  .feat-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- owner mode ---------- */

.owner {
  padding-block: var(--section);
  background: var(--ink);
  color: #F3F5F4;
}
.owner__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.owner .lead { margin-top: 1.25rem; color: #C9D2DC; }
.owner__admin { margin-top: 1.5rem; max-width: 38ch; color: #C9D2DC; }

.owner-chat {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.25rem;
  border-radius: 1.5rem;
  background: #1F2C3E;
  color: var(--ink);
}
.owner-chat .msg { padding-bottom: .55rem; font-size: 1rem; }
.msg--owner { background: var(--bubble-out); }
.msg--bot { background: var(--bubble-in); }
.owner-chat .msg__actions { margin-top: .5rem; }

@media (min-width: 56rem) {
  .owner__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
}

/* ---------- trust ---------- */

.trust { padding-block: var(--section); }
.trust__list {
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  display: grid;
  gap: 2rem;
}
.trust__list > div { padding-left: 1.25rem; border-left: 3px solid var(--lagoon); }
.trust__list dd { margin: .35rem 0 0; color: var(--ink-2); max-width: 44ch; }

@media (min-width: 48rem) {
  .trust__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; }
}

/* ---------- pilot ---------- */

.pilot {
  padding-block: var(--section);
  background: var(--red);
  color: #fff;
}
.pilot__grid { display: grid; gap: 2rem; }
.pilot__title {
  font-family: var(--display);
  font-size: var(--fs-4);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 12ch;
  text-wrap: balance;
}
.pilot__body { display: grid; gap: 1.5rem; justify-items: start; }
.pilot__body > p { font-size: var(--fs-2); line-height: 1.5; max-width: 40ch; }
.pilot__list { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.pilot__list li { padding-left: 1.6rem; position: relative; }
.pilot__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: .9rem;
  height: .5rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

@media (min-width: 56rem) {
  .pilot__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
}

/* ---------- faq ---------- */

.faq { padding-block: var(--section); }
.faq__wrap { display: grid; gap: 2rem; }
.faq__list { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  font-size: var(--fs-2);
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex: none;
  font: 500 1.5rem/1 var(--display);
  color: var(--red);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.35rem; max-width: 60ch; color: var(--ink-2); }

@media (min-width: 56rem) {
  .faq__wrap { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4rem; align-items: start; }
}

/* ---------- contact ---------- */

.contact {
  padding-block: var(--section);
  background: var(--paper-2);
}
.contact__inner { display: grid; gap: 1.5rem; justify-items: start; }
.contact .lead { color: var(--ink-2); max-width: 44ch; }
.contact__pending {
  padding: .9rem 1.1rem;
  border: 1px dashed var(--ink-2);
  border-radius: .75rem;
  color: var(--ink-2);
}
.contact__pending[hidden], .btn[hidden] { display: none; }

/* ---------- footer ---------- */

.site-footer {
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--line);
}
.site-footer__inner { display: grid; gap: .75rem; }
.site-footer__brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; color: var(--ink-2); }
.site-footer__brand .brand__word { color: var(--ink); font-size: 1.125rem; }
.site-footer__small { font-size: var(--fs-0); color: var(--ink-2); }

/* ---------- 404 ---------- */

.notfound {
  min-height: 70vh;
  display: grid;
  align-content: center;
  gap: 1.25rem;
  justify-items: start;
  padding-block: 4rem;
}
.notfound__code {
  font: 600 clamp(4rem, 18vw, 9rem)/1 var(--display);
  letter-spacing: -0.04em;
  color: var(--red);
}
