/* Let Me Brave That For You — tokens from the Classical design system, set in Geist. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/geist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/geist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/fonts/geist-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/fonts/geist-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --color-bg: #f3f2f2;
  --color-text: #201f1d;
  --color-accent: #b68235;
  --color-accent-700: #7d5411;
  --color-accent-800: #5a3b0a;
  --color-neutral-700: #605d5d;
  --color-neutral-800: #444141;
  --color-divider: color-mix(in srgb, #201f1d 16%, transparent);
  --shadow-sm: 0 1px 2px color-mix(in srgb, #2d2b2b 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2d2b2b 16%, transparent);
  --ring: 0 0 0 4px color-mix(in srgb, var(--color-accent) 22%, transparent);
  --tint: color-mix(in srgb, var(--color-text) 6%, transparent);
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

@keyframes lmbtfy-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* — layout — */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.app[data-mode="make"] [data-show="play"],
.app[data-mode="play"] [data-show="make"] { display: none; }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 4vw, 36px);
}
.brand { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }

.main {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(48px, 16vh, 168px) 20px 48px;
}

.hero { text-align: center; }
.title, .caption {
  margin: 0;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.title { font-size: clamp(38px, 6.4vw, 64px); line-height: 1.02; }
.accent { color: var(--color-accent); }
.subtitle {
  margin: 14px 0 0;
  font-size: 17px;
  color: color-mix(in srgb, var(--color-text) 62%, transparent);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}
.caption {
  margin-top: 10px;
  min-height: 1.05em;
  font-size: clamp(32px, 5.6vw, 56px);
  line-height: 1.05;
}

.row { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.row.result { margin-top: 12px; }

.footer {
  padding: 24px 20px;
  text-align: center;
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

/* — pills — */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.pill.solid { border: 0; background: var(--color-text); color: var(--color-bg); }
.pill.solid:not(:disabled):hover { background: var(--color-neutral-800); }
.pill.ghost { border-color: var(--color-divider); background: transparent; color: var(--color-text); }
.pill.ghost:hover { background: var(--tint); }
.pill.small { height: 40px; padding: 0 16px; font-size: 14px; }
.bar .pill.small { height: 36px; }
a.pill.small { padding: 0 18px; }
.pill.tall { flex: 1 0 auto; height: 60px; padding: 0 28px; font-size: 16px; }
button.pill.tall:not(:disabled):active { transform: scale(0.98); }
.pill:disabled { opacity: 0.4; cursor: not-allowed; }
.pill[aria-busy="true"] { cursor: progress; }

/* — the link maker — */
.search { position: relative; flex: 999 1 300px; min-width: 0; display: block; }
.search-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  margin-top: -10px;
  pointer-events: none;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.search-input {
  width: 100%;
  height: 60px;
  padding: 0 22px 0 54px;
  border: 1px solid var(--color-divider);
  border-radius: 999px;
  background: #fff;
  color: var(--color-text);
  font: inherit;
  font-size: 17px;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus { border-color: var(--color-accent); box-shadow: var(--ring); }

.link-box {
  flex: 999 1 300px;
  min-width: 0;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 22px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-accent) 9%, transparent);
}
.link-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-accent-800);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
}
.pill.copy { flex: none; height: 40px; padding: 0 16px; font-size: 14px; }
.pill.preview { flex: 1 0 auto; height: 52px; padding: 0 22px; gap: 8px; font-size: 15px; }

/* — the playback — */
.field {
  flex: 999 1 300px;
  min-width: 0;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  border: 1px solid var(--color-divider);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 17px;
  cursor: text;
  transition: border-color .15s, box-shadow .15s;
}
.field.is-focused { border-color: var(--color-accent); box-shadow: var(--ring); }
.field-icon { flex: none; color: color-mix(in srgb, var(--color-text) 50%, transparent); }
.field-text {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: pre;
}
.typed, .placeholder { flex: none; }
.placeholder { color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.caret {
  flex: none;
  width: 2px;
  height: 22px;
  margin-left: 1px;
  border-radius: 1px;
  background: var(--color-accent);
  animation: lmbtfy-caret 1s step-end infinite;
}
.caret.is-typing { animation: none; }

.search-btn:hover, .search-btn.is-hover { background: var(--color-neutral-800); }
.search-btn.is-pressed { background: var(--color-neutral-700); transform: scale(0.97); }

.done {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}
.done-group { display: contents; }
.countdown { font-size: 15px; color: color-mix(in srgb, var(--color-text) 62%, transparent); }
.num { font-variant-numeric: tabular-nums; }

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 20;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
}
.cursor svg {
  position: absolute;
  left: -5px;
  top: -5px;
  display: block;
  overflow: visible;
  transform-origin: 5px 5px;
  fill: var(--color-text);
  stroke: #fff;
  stroke-width: 1.5;
  stroke-linejoin: round;
  filter: drop-shadow(var(--shadow-md));
}
.ripple {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 19;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}
