/* Ditto, the opening view: a person who has just finished talking, eyes
   closed, and a slow ring of what Ditto kept from the day around their head.
   Light ground, the Today panel's paper and feeling colours (TodayPage.swift
   in the app), a serif headline. Everything here sits at its final state
   without html.mo; motion only adds to it. Class prefix: orb-. */
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-italic-latin.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --orb-ground: #F4F3EE;
  --orb-ink: #17170F;
  --orb-ink-2: rgba(23, 23, 15, 0.66);
  --orb-ink-3: rgba(23, 23, 15, 0.48);
  --orb-line: rgba(23, 23, 15, 0.08);
  --orb-sunk: #F5F4E6;
  --orb-glass: rgba(255, 255, 250, 0.66);
  --orb-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  /* the app's feeling set, one value each, as HomePage.swift and TodayPage.swift carry it */
  --f-frustrated: #FF6C4C; --f-urgent: #FFA946; --f-uncertain: #B892FF; --f-excited: #34D399; --f-neutral: #E4E4D0;
  --d-frustrated: #B4361E; --d-urgent: #A4600F; --d-uncertain: #6A41B8; --d-excited: #0E7A55; --d-neutral: #5E5C4A;
  --speech: #4FC3FF;
}
.t-frustrated { --tone: var(--f-frustrated); --tone-d: var(--d-frustrated); }
.t-urgent { --tone: var(--f-urgent); --tone-d: var(--d-urgent); }
.t-uncertain { --tone: var(--f-uncertain); --tone-d: var(--d-uncertain); }
.t-excited { --tone: var(--f-excited); --tone-d: var(--d-excited); }

/* ------------------------------------------------- nav, light over the hero */
.nav-in { border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 250, 0.62); color: var(--orb-ink);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 24px -12px rgba(23, 23, 15, 0.25); }
.nav-mark { color: var(--orb-ink); }
.nav-link { color: var(--orb-ink-2); border-radius: 999px; padding: 9px 14px; transition: color var(--dt-t-color), background-color var(--dt-t-color); }
.nav-link:hover { color: var(--orb-ink); background: rgba(23, 23, 15, 0.05); }
.nav-link.is-on { color: var(--orb-ink); background: #fff; box-shadow: 0 1px 2px rgba(23, 23, 15, 0.08), inset 0 0 0 1px var(--orb-line); }
.nav-in { border-radius: 999px; padding-left: 18px; padding-right: 8px; height: 56px; }
.nav-links { gap: 2px; padding: 3px; border-radius: 999px; background: rgba(23, 23, 15, 0.04); }
.nav-cta { margin-left: auto; display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--orb-ink); color: #FFFFFA;
  font: 500 14px/1 var(--dt-font); text-decoration: none; white-space: nowrap; transition: transform 0.15s ease, box-shadow 0.2s ease; }
.nav-cta:hover { box-shadow: 0 6px 18px -6px rgba(23, 23, 15, 0.5); transform: translateY(-1px); }

/* ------------------------------------------------------------------ section */
.orb-sec { position: relative; overflow: clip; background: var(--orb-ground); color: var(--orb-ink); padding: 84px var(--dt-gutter) 0;
  background-image: radial-gradient(60% 40% at 50% 78%, #FFFFFA 0%, transparent 70%); }
.orb-copy { position: relative; z-index: 4; max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.orb-h1 { font: 400 clamp(46px, 8.6vw, 132px)/0.94 var(--orb-serif); letter-spacing: -0.025em; color: var(--orb-ink); }
.orb-line { display: block; overflow: clip; padding-bottom: 0.06em; overflow-clip-margin: 0.08em; }
.orb-line--it { font-style: italic; letter-spacing: -0.02em; }
.orb-in { display: inline-block; }
.orb-sub { margin-top: 18px; max-width: 30ch; font: 400 16px/1.45 var(--dt-font); letter-spacing: 0; color: var(--orb-ink-2); text-wrap: balance; }

/* the sign-up: one field, the black pill inside it; the glass pill beside */
.orb-sec .notice-box { width: min(100%, 520px); margin-top: 26px; }
.orb-acts { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.orb-field { display: flex; align-items: center; gap: 6px; height: 52px; padding: 5px 5px 5px 18px; border-radius: 999px; background: #FFFFFA;
  box-shadow: inset 0 0 0 1px var(--orb-line), 0 10px 30px -18px rgba(23, 23, 15, 0.45); transition: box-shadow 0.2s ease; }
.orb-field:focus-within { box-shadow: inset 0 0 0 1.5px var(--orb-ink), 0 10px 30px -18px rgba(23, 23, 15, 0.45); }
.orb-input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: 0; font: 400 16px/1 var(--dt-font); letter-spacing: 0; color: var(--orb-ink); }
.orb-input::placeholder { color: var(--orb-ink-3); }
.orb-input[aria-invalid="true"] { color: var(--d-frustrated); }
.orb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--orb-ink); color: #FFFFFA; font: 500 15px/1 var(--dt-font); letter-spacing: 0; text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 12px -4px rgba(23, 23, 15, 0.5); transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease; }
.orb-btn:hover { background: #000; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 20px -6px rgba(23, 23, 15, 0.6); }
.orb-btn:active { transform: scale(0.98); }
.orb-dl { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.orb-btn--dl { height: 48px; padding: 0 24px; font-size: 16px; text-decoration: none; }
.orb-apple { width: 16px; height: 16px; margin-top: -2px; }
.orb-dl-note { margin-top: 8px; font: 500 12px/1.2 var(--dt-font); color: var(--orb-ink-2); }
.orb-btn[disabled] { opacity: 0.6; cursor: default; }
.orb-arrow { display: inline-block; transition: transform 0.2s var(--dt-ease-out); }
.orb-btn:hover .orb-arrow { transform: translateX(3px); }
.orb-field .orb-btn { flex: none; padding: 0 14px; font-size: 14px; }
.orb-btn--glass { height: 48px; background: rgba(255, 255, 250, 0.7); color: var(--orb-ink); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 10px 30px -18px rgba(23, 23, 15, 0.45); }
.orb-btn--glass:hover { background: #FFFFFA; box-shadow: inset 0 0 0 1px #fff, 0 12px 30px -14px rgba(23, 23, 15, 0.5); }
.orb-play { position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--orb-ink); }
.orb-play::after { content: ""; position: absolute; left: 8px; top: 6px; border-left: 8px solid #FFFFFA; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.orb-sec .notice-line { margin-top: 12px; font: 500 13px/1.3 var(--dt-font); color: var(--orb-ink-3); text-shadow: none; }
.orb-sec .notice-line.is-bad { color: var(--d-frustrated); }
.orb-sec .notice-box.is-done .orb-field { display: none; }
.orb-sec .notice-box.is-done .notice-line { margin-top: 14px; font: 400 24px/1.2 var(--orb-serif); color: var(--orb-ink); }

/* ----------------------------------------------------------------- the stage */
.orb-stage { --cw: 124px; position: relative; z-index: 1; width: min(100%, 1180px); height: clamp(320px, 92vw, 440px); margin: 8px auto 0; perspective: 1200px; }
.orb-face { position: absolute; z-index: 2; left: 50%; bottom: 0; translate: -50% 0; height: 100%; width: auto; max-width: 100vw; object-fit: cover; object-position: 50% 0; display: block;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent); mask-image: linear-gradient(to bottom, #000 78%, transparent);
  -webkit-user-select: none; user-select: none; pointer-events: none; }
.orb-head { display: none; position: absolute; z-index: 2; left: 50%; top: 40%; width: min(78%, 400px); height: auto; aspect-ratio: 16 / 10; transform: translate(-50%, -50%); pointer-events: none; }
.orb-stage.no-face .orb-face { display: none; }
.orb-stage.no-face .orb-head { display: block; }
.orb-ring { position: absolute; inset: 0; z-index: auto; }
/* small screens carry five cards; the two smallest wait for room */
.orb-card--words, .orb-card--chip, .orb-card--saved { display: none; }

.orb-card { position: absolute; left: 0; top: 0; width: var(--cw); padding: 11px 12px 12px; border-radius: 16px; text-align: left;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.82), var(--orb-glass)); color: var(--orb-ink);
  -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), inset 0 1px 0 #fff, 0 18px 40px -20px rgba(23, 23, 15, 0.45), 0 2px 6px -2px rgba(23, 23, 15, 0.12);
  transform: translate3d(var(--x, 0px), var(--y, 0px), 0) scale(var(--s, 1)) rotateY(var(--ry, 0deg)); transform-origin: 50% 50%;
  transition: box-shadow 0.25s ease; will-change: transform; cursor: default; }
.orb-card:hover { box-shadow: inset 0 0 0 1px #fff, inset 0 1px 0 #fff, 0 26px 50px -18px rgba(23, 23, 15, 0.55), 0 2px 6px -2px rgba(23, 23, 15, 0.12); }
.orb-card p { margin: 0; }
.orb-eye { display: flex; align-items: center; gap: 6px; font: 650 10px/1.2 var(--dt-font); letter-spacing: 0.09em; text-transform: uppercase; color: var(--orb-ink-3); }
.orb-live { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; letter-spacing: 0; text-transform: none; font-size: 10px; color: var(--d-excited); }
.orb-live--sample { color: var(--orb-ink-2); }
.orb-src { margin-top: 14px; font: 500 12px/1.4 var(--dt-font); color: var(--orb-ink-2); }
.orb-src a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.orb-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--f-excited); }
html.mo .orb-live i { animation: orb-ping 1.8s ease-out infinite; }
.orb-big { margin-top: 6px !important; font: 400 44px/0.95 var(--orb-serif); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.orb-big small, .orb-mid small { margin-left: 5px; font: 600 11px/1 var(--dt-font); letter-spacing: 0; color: var(--orb-ink-2); }
.orb-vs { margin-top: 6px !important; font: 400 10.5px/1.3 var(--dt-font); color: var(--orb-ink-2); }
.orb-vs b { color: var(--orb-ink); font-weight: 650; }
.orb-mid { margin-top: 4px !important; font: 400 30px/1 var(--orb-serif); letter-spacing: -0.02em; white-space: nowrap; }
.orb-u { margin-top: 6px !important; font: 400 10px/1.2 var(--dt-font); color: var(--orb-ink-3); }
.orb-bar { margin-top: 8px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--tone) 22%, transparent); overflow: hidden; }
.orb-bar i { display: block; height: 100%; width: calc(var(--w) * 100%); border-radius: 3px; background: var(--tone-d); }
.orb-strip { display: flex; gap: 3px; margin-top: 9px; }
.orb-strip i { flex: 1; height: 13px; border-radius: 4px; }
.orb-strip .f-frustrated { background: var(--f-frustrated); } .orb-strip .f-urgent { background: var(--f-urgent); } .orb-strip .f-uncertain { background: var(--f-uncertain); }
.orb-strip .f-excited { background: var(--f-excited); } .orb-strip .f-neutral { background: var(--f-neutral); }
.orb-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px !important; }
.orb-chip { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px 0 6px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--tone) 22%, #FFFFFA); color: var(--tone-d); font: 600 10.5px/1 var(--dt-font); }
.orb-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }
.orb-chip b { color: var(--orb-ink); font-weight: 750; }
.orb-card--chip { width: auto; padding: 6px; border-radius: 999px; }
.orb-chip--solo { height: 28px; padding: 0 12px 0 9px; font-size: 12.5px; }
.orb-chip--solo i { width: 9px; height: 9px; }
.orb-time { margin-left: auto; letter-spacing: 0; color: var(--orb-ink-2); font-variant-numeric: tabular-nums; }
.orb-wave { display: flex; align-items: center; gap: 2px; height: 26px; margin-top: 8px; }
.orb-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--orb-ink); opacity: 0.8; height: calc(var(--h) * 100%); }
.orb-wave i.is-past { background: var(--d-frustrated); opacity: 1; }
.orb-words { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px !important; }
.orb-words span { display: inline-flex; align-items: baseline; gap: 4px; height: 23px; padding: 3px 8px 0; border-radius: 999px; background: var(--orb-sunk); box-shadow: inset 0 0 0 1px var(--orb-line);
  font: 400 13px/1.2 var(--orb-serif); }
.orb-words b { font: 700 10px/1 var(--dt-font); color: var(--orb-ink-3); }

/* the brain card is the recorder itself: the app's dark capsule on glass */
.orb-card--brain { padding: 0 0 11px; overflow: hidden; color: #FFFFEB;
  background: linear-gradient(160deg, rgba(36, 36, 34, 0.86), rgba(20, 20, 19, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 235, 0.16), inset 0 1px 0 rgba(255, 255, 235, 0.28), 0 18px 40px -16px rgba(23, 23, 15, 0.6); }
.orb-brain { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; margin-bottom: 2px; background: radial-gradient(70% 70% at 50% 45%, rgba(79, 195, 255, 0.08), transparent 70%); }
.orb-eye--dark { padding: 10px 12px 0; border-top: 1px solid rgba(255, 255, 235, 0.12); color: rgba(255, 255, 255, 0.72); }
.orb-note { padding: 4px 12px 0; font: 400 15px/1.15 var(--orb-serif); color: #FFFFFF; }

/* -------------------------------------------------------------------- motion */
@keyframes orb-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes orb-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes orb-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--f-excited) 60%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }
@keyframes orb-fade { from { opacity: 0; } to { opacity: 1; } }
html.mo .orb-in { animation: orb-rise 1.1s cubic-bezier(0.19, 1, 0.22, 1) both; animation-delay: calc(0.1s + var(--i, 0) * 0.14s); }
html.mo .orb-up { animation: orb-up 0.9s var(--dt-ease-out) both; animation-delay: calc(0.35s + var(--i, 0) * 0.1s); }
html.mo .orb-face { animation: orb-fade 1.4s ease both 0.2s; }

/* the demo section that used to be the hero: same parts, below the fold */
.try-sec { padding-top: var(--dt-section); }
.try-h2 { margin-bottom: 8px; }

/* ---------------------------------------------------------------------- wide */
@media (min-width: 720px) {
  .nav-in { max-width: 860px; height: 60px; padding: 8px 8px 8px 22px; display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav-links { margin-right: 0; }
  .orb-sec { padding-top: 112px; }
  .orb-sub { max-width: none; font-size: 18px; margin-top: 22px; }
  .orb-acts { flex-direction: row; justify-content: center; }
  .orb-field { flex: 1; }
  .orb-btn--glass { height: 52px; padding: 0 22px; }
  .orb-sec .notice-box { width: min(100%, 640px); margin-top: 32px; }
  .orb-stage { --cw: 176px; height: clamp(480px, min(58vw, calc(100svh - 430px)), 720px); margin-top: -12px; }
  .orb-card { padding: 14px 15px 15px; border-radius: 20px; }
  .orb-card--words, .orb-card--saved { display: block; } .orb-card--chip { display: inline-block; }
  .orb-eye { font-size: 10.5px; }
  .orb-big { font-size: 58px; }
  .orb-vs { font-size: 12px; }
  .orb-mid { font-size: 38px; }
  .orb-u { font-size: 11px; }
  .orb-chip { height: 23px; font-size: 11.5px; }
  .orb-wave { height: 32px; }
  .orb-note { font-size: 18px; padding: 4px 15px 0; }
  .orb-eye--dark { padding: 11px 15px 0; }
  .orb-words span { font-size: 15px; height: 26px; }
  .try-sec { padding-top: var(--dt-section-wide); }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.mo) .orb-in, html:not(.mo) .orb-up, html:not(.mo) .orb-face { opacity: 1 !important; transform: none !important; }
}
