@font-face {
  font-family: "Cormorant";
  src: url("fonts/Cormorant_600SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant";
  src: url("fonts/Cormorant_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant";
  src: url("fonts/Cormorant_600SemiBold_Italic.ttf") format("truetype");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

:root {
  --canvas: #f5f3ef;
  --surface: #fbf9f5;
  --muted: #f0ece6;
  --soft: #ede4dc;
  --line: #e3ddd5;
  --ink: #251f1b;
  --secondary: #5c564e;
  --espresso: #4a3127;
  --cocoa: #75594b;
  --bean: #8b5e3c;
  --honey: #b78950;
  --sage: #687461;
  --serif: "Cormorant", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  background: var(--canvas);
  color: var(--ink);
}

img { max-width: 100%; }

a { color: var(--espresso); }

h1, h2, .serif {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.03em;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 12vw, 5.4rem);
  line-height: 0.9;
  font-weight: 600;
}

h1 em {
  font-style: italic;
  font-weight: 600;
  color: var(--espresso);
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(2.15rem, 6vw, 3.25rem);
  line-height: 0.95;
  text-wrap: balance;
}

p { margin: 0; }

button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid var(--espresso);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--espresso);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  z-index: 20;
}

.skip:focus { top: 12px; }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(10px, env(safe-area-inset-top)) 20px 10px;
  background: rgba(245, 243, 239, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand img { width: 32px; height: 32px; display: block; }

.lang {
  display: flex;
  padding: 3px;
  background: var(--muted);
  border-radius: 999px;
}

.lang button {
  min-width: 44px;
  min-height: 40px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
}

html[data-lang="es"] [data-set-lang="es"],
html[data-lang="en"] [data-set-lang="en"] {
  background: var(--espresso);
  color: #fff;
}

.hero, .feature, .close {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 18px 0 8px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--cocoa);
  font-size: 15px;
}

.lead {
  margin-top: 16px;
  max-width: 38rem;
  color: var(--secondary);
  font-size: 1.05rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 22px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--espresso);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.button:active { transform: scale(0.97); }

.fine {
  margin-top: 10px;
  color: var(--secondary);
  font-size: 13px;
}

.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 0;
}

.cap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(37, 31, 27, 0.04);
}

.cap[aria-pressed="true"] {
  background: var(--espresso);
  color: #fff;
}

.feature {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 72px 0;
  scroll-margin-top: 76px;
}

.hero { scroll-margin-top: 76px; }

.device {
  width: min(100%, 360px);
  margin-inline: auto;
  padding: 10px;
  background: var(--soft);
  border-radius: 40px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.device-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  padding-bottom: 84px;
  overflow: hidden;
  background: var(--canvas);
  border-radius: 32px;
}

.screen-body {
  flex: 1;
  padding: 18px 16px 8px;
}

.chrome {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  height: 58px;
}

.tabbar {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 4px;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(16px);
}

.tab {
  flex: 1;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--secondary);
  border-radius: 16px;
}

.tab.is-on {
  color: var(--bean);
  background: rgba(255, 255, 255, 0.72);
}

.icon { width: 22px; height: 22px; display: block; }

.bria-bubble {
  width: 58px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 22px 15px 24px 18px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(16px);
}

.bria-bubble img { width: 30px; height: 30px; }

.bria-bubble.is-open { box-shadow: 0 0 0 2px var(--bean), 0 6px 14px rgba(0, 0, 0, 0.1); }

.screen-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.screen-head img { width: 32px; height: 32px; }

.screen-title {
  font-size: 16px;
  font-weight: 700;
}

.screen-sub, .eyebrow, .meta, .why, .ref-note, .group-label {
  color: var(--secondary);
  font-size: 12px;
}

.greet {
  margin: 18px 0 12px;
  color: var(--cocoa);
}

.ask {
  margin: 0 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 999px;
  color: var(--secondary);
}

.user, .reply {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 16px;
}

.user {
  margin-left: auto;
  background: var(--soft);
  border-bottom-right-radius: 6px;
}

.reply {
  margin-top: 8px;
  background: var(--surface);
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.answer { font-weight: 600; }

.why { margin-top: 8px; }

.why strong {
  color: var(--cocoa);
  font-weight: 600;
}

.next-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--espresso);
  font-size: 12px;
  font-weight: 600;
}

.chip.is-on { background: var(--espresso); color: #fff; }

.bag {
  width: 132px;
  height: 118px;
  margin: 14px auto 12px;
  position: relative;
  display: grid;
  place-items: center;
  background: var(--espresso);
  border-radius: 16px 16px 12px 12px;
}

.bag::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: var(--cocoa);
  border-radius: 16px 16px 0 0;
}

.bag-label {
  width: 96px;
  padding: 8px 6px 6px;
  background: var(--surface);
  border-radius: 8px;
  text-align: center;
}

.bag-brand {
  display: block;
  color: var(--bean);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bag-name, .coffee, .recipe-name, .place-name, .wordmark {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.bag-name { font-size: 16px; }

.fields, .recipes, .groups { list-style: none; margin: 10px 0 0; padding: 0; }

.fields {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
}

.fields li, .eq-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
}

.fields li + li, .eq-row + .eq-row { box-shadow: inset 0 1px 0 var(--line); }

.fields span, .eq-row span { color: var(--secondary); }

.fields b, .eq-row b { font-weight: 600; text-align: right; }

.ref {
  margin-top: 10px;
  padding: 12px;
  background: var(--muted);
  border-radius: 16px;
}

.ref-main {
  margin-top: 4px;
  font-weight: 700;
}

.ref-sub { margin-top: 2px; }

.ref-note { margin-top: 6px; }

.num { font-variant-numeric: tabular-nums; }

.home-top, .stock, .place, .recipe-top, .eq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wordmark { font-size: 28px; font-weight: 700; }

.mark-dot {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--muted);
  border-radius: 50%;
}

.mark-dot img { width: 20px; height: 20px; }

.hello { margin: 14px 0 16px; font-size: 15px; color: var(--secondary); }

.coffee { font-size: 32px; margin: 4px 0; }

.spec { color: var(--secondary); }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 12px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--espresso);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.stock {
  margin-top: 22px;
  padding: 12px;
  background: var(--muted);
  border-radius: 16px;
}

.swatch {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background:
    linear-gradient(160deg, transparent 0 42%, #fbf9f5 42% 58%, transparent 58%),
    var(--espresso);
  flex: none;
}

.stock .coffee { font-size: 20px; margin: 0; flex: 1; }

.timer-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 390px;
  text-align: center;
}

.phase {
  color: var(--cocoa);
  font-size: 13px;
  font-weight: 600;
}

.time {
  margin: 8px 0;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.target { color: var(--secondary); }

.bar {
  height: 8px;
  margin: 18px 28px 12px;
  overflow: hidden;
  background: var(--muted);
  border-radius: 999px;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--honey);
  transform: scaleX(0.6);
  transform-origin: left center;
}

.nextphase { color: var(--secondary); font-size: 13px; }

.search {
  margin-top: 12px;
  padding: 11px 12px;
  background: var(--muted);
  border-radius: 12px;
  color: var(--secondary);
}

.recipes { display: grid; gap: 8px; }

.recipe, .group {
  padding: 12px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.recipe-name { font-size: 24px; margin: 8px 0 6px; }

.groups { display: grid; gap: 8px; }

.group { padding: 0 0 2px; }

.group-label {
  padding: 10px 12px 0;
  font-weight: 600;
}

.screen-label {
  font-size: 22px;
  font-weight: 700;
}

.filters { display: flex; gap: 6px; margin: 10px 0; }

.map-wrap {
  position: relative;
  flex: 1;
  min-height: 250px;
  margin: 0 0 8px;
  overflow: hidden;
  border-radius: 18px;
}

.map-screen .screen-body {
  display: flex;
  flex-direction: column;
}

.streets {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pin {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  background: var(--espresso);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(251, 249, 245, 0.92);
}

.pin.is-active {
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  background: var(--bean);
}

.pin-name {
  position: absolute;
  left: 18px;
  top: -7px;
  padding: 4px 8px;
  background: var(--surface);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.place {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 12px;
  background: rgba(251, 249, 245, 0.94);
  border-radius: 16px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.place-name { font-size: 22px; }

.heart {
  width: 28px;
  height: 28px;
  color: var(--bean);
  flex: none;
}

.close {
  padding: 24px 0 72px;
  text-align: center;
}

.close .lead, .close .fine { margin-inline: auto; }

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--secondary);
  font-size: 14px;
}

.footer nav, .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer a { color: var(--cocoa); text-decoration: none; }

.footer a:hover { text-decoration: underline; }

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

html[data-lang="es"] .l-en { display: none !important; }
html[data-lang="en"] .l-es { display: none !important; }

html.will-animate [data-reveal] .rise {
  opacity: 0;
  transform: translateY(8px);
}

html.will-animate [data-reveal].is-in .rise {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

html.will-animate [data-reveal] .bar > span { transform: scaleX(0); }

html.will-animate [data-reveal].is-in .bar > span {
  animation: fill 1.15s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.thread.enter .reply { animation: fade 0.22s ease-out; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fill { to { transform: scaleX(0.6); } }
@keyframes fade { from { opacity: 0; } }

@media (hover: hover) {
  .button:hover { opacity: 0.92; }
  .cap:not([aria-pressed="true"]):hover { background: var(--muted); }
}

@media (min-width: 900px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 64px;
    row-gap: 28px;
    min-height: calc(100svh - 72px);
    padding-top: 36px;
  }

  .hero .stage {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .cap-grid { grid-column: 1; }

  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    padding: 96px 0;
  }

  .feature.flip .copy { order: 2; }

  .stage { display: flex; }

  .feature:not(.flip) .stage { justify-content: flex-end; }
  .feature.flip .stage { justify-content: flex-start; }
}

@media (max-width: 380px) {
  .time { font-size: 56px; }
  .cap { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button:active { transform: none; }
  html.will-animate [data-reveal] .rise,
  html.will-animate [data-reveal] .bar > span,
  .thread.enter .reply {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
