/* Dobbie home. Legal pages keep using styles.css. */
:root {
  color-scheme: light;
  --paper: oklch(96.5% 0.018 85);
  --ink: oklch(21% 0.02 60);
  --ink-soft: oklch(42% 0.03 65);
  --kraft: oklch(76% 0.075 72);
  --kraft-light: oklch(84% 0.06 78);
  --kraft-deep: oklch(52% 0.075 62);
  --bubble: oklch(90.5% 0.018 80);
  --blue: oklch(60% 0.2 255);
  --display: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --body: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: max(clamp(1rem, 5vw, 3.5rem), calc((100vw - 1160px) / 2));
}
html:lang(ja) { --display: "Zen Maru Gothic", sans-serif; --body: "Zen Maru Gothic", sans-serif; }
html:lang(ko) { --display: "Jua", sans-serif; --body: "Gowun Dodum", sans-serif; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font: 800 1.35rem/1 var(--display);
  text-decoration: none;
}
.brand img { border-radius: 9px; border: 2px solid var(--ink); }
.langs { display: flex; gap: .15rem; }
.langs button {
  min-height: 44px;
  padding: 0 .6rem;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: 500 .9rem/1 var(--body);
  cursor: pointer;
}
.langs button[aria-pressed="true"] { color: var(--ink); text-decoration: underline 2px; text-underline-offset: 6px; }

/* ── Hero ─────────────────────────────── */
.hero {
  display: grid;
  gap: clamp(1.75rem, 5vw, 3rem);
  padding: clamp(1.5rem, 6vw, 5rem) var(--gutter) clamp(3.5rem, 9vw, 7rem);
}
h1 {
  max-width: 11ch;
  font: 800 clamp(3rem, 13vw, 6.5rem)/.95 var(--display);
  letter-spacing: -.035em;
  text-wrap: balance;
}
html:lang(ja) h1, html:lang(ko) h1 { max-width: 9em; font-size: clamp(2.4rem, 10vw, 5rem); line-height: 1.15; letter-spacing: 0; word-break: keep-all; }
html:lang(ko) h1 { font-weight: 400; }
.sub { max-width: 30ch; margin-top: 1.25rem; color: var(--ink-soft); font-size: clamp(1.1rem, 2.6vw, 1.3rem); line-height: 1.45; }

.scene { position: relative; max-width: 30rem; padding-bottom: .5rem; }
.thread { display: grid; gap: .5rem; }
.bubble {
  max-width: 68%;
  padding: .6rem .95rem;
  border-radius: 1.3rem;
  background: var(--bubble);
  font-size: 1.0625rem;
  line-height: 1.35;
  justify-self: start;
  border-bottom-left-radius: .35rem;
  animation: pop .7s var(--ease) both;
}
.bubble.me { justify-self: end; background: var(--blue); color: oklch(99% 0.01 255); border-radius: 1.3rem; border-bottom-right-radius: .35rem; }
.bubble:nth-child(1) { animation-delay: .25s; }
.bubble:nth-child(2) { animation-delay: 1s; }
.bubble:nth-child(3) { animation-delay: 1.8s; max-width: 58%; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.94); } }

.cat { position: absolute; right: -.5rem; bottom: -2.6rem; width: clamp(7.5rem, 36vw, 11rem); overflow: visible; animation: rise .9s var(--ease) 2.3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.cat .fur, .cat .ink { fill: var(--ink); }
.cat .tail, .cat .line { fill: none; stroke: var(--ink); stroke-linecap: round; }
.cat .tail { stroke-width: 10; transform-origin: 174px 142px; animation: sway 3.6s ease-in-out infinite alternate; }
.cat .line { stroke-width: 3.5; }
.cat .eyes { fill: var(--paper); transform-origin: 125px 80px; animation: blink 5s infinite; }
.cat .box, .cat .flap { stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.cat .box { fill: var(--kraft); }
.cat .flap { fill: var(--kraft-light); }
@keyframes sway { to { transform: rotate(-12deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.08); } }

/* The CTA is drawn as the iMessage compose bar: the whole bar is the link. */
.cta { position: relative; max-width: 30rem; }
.composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 3.75rem;
  padding: .45rem .45rem .45rem 1.3rem;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: oklch(99% 0.008 85);
  box-shadow: 0 5px 0 var(--ink);
  font-size: 1.15rem;
  text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.composer:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.composer:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.composer-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.send { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--blue); }
.send svg { width: 1.4rem; fill: none; stroke: oklch(99% 0.01 255); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hint { margin-top: 1rem; color: var(--ink-soft); font-size: .95rem; }
.hint.blocked { color: var(--ink); font-weight: 600; }
.app-link { display: inline-block; margin-top: .6rem; padding: .6rem 0; font-weight: 600; text-underline-offset: 5px; }

/* Android has no iMessage: the store button takes over. */
[data-os="android"] :is(.composer, #hint) { display: none; }
[data-os="android"] .app-link {
  margin: 0;
  padding: 1rem 1.6rem;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 1.15rem;
}

/* ── Steps ────────────────────────────── */
.steps { padding: 0 var(--gutter) clamp(4rem, 10vw, 8rem); }
h2 { font: 800 clamp(1.9rem, 6vw, 3.25rem)/1.05 var(--display); letter-spacing: -.02em; text-wrap: balance; }
html:lang(ja) h2, html:lang(ko) h2 { line-height: 1.25; letter-spacing: 0; word-break: keep-all; }
html:lang(ko) h2 { font-weight: 400; }
.steps ol { counter-reset: step; display: grid; gap: 1.5rem; margin-top: clamp(1.75rem, 5vw, 3rem); }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  align-items: baseline;
  max-width: 34ch;
  font-size: 1.15rem;
  line-height: 1.4;
}
.steps li::before { content: counter(step); font: 800 2.75rem/1 var(--display); color: var(--kraft-deep); }

/* ── Creed ────────────────────────────── */
.creed { padding: clamp(3.5rem, 10vw, 7rem) var(--gutter); background: var(--ink); color: var(--paper); }
.creed p { text-wrap: balance; font: 800 clamp(2rem, 8.5vw, 5rem)/1.08 var(--display); letter-spacing: -.03em; color: oklch(62% 0.03 70); }
.creed p:last-child { color: var(--paper); }
html:lang(ja) .creed p, html:lang(ko) .creed p { font-size: clamp(1.6rem, 6.5vw, 3.75rem); line-height: 1.35; letter-spacing: 0; word-break: keep-all; }
html:lang(ko) .creed p { font-weight: 400; }

/* ── App ──────────────────────────────── */
.app { padding: clamp(3.5rem, 9vw, 6rem) var(--gutter); background: var(--kraft); border-block: 2.5px solid var(--ink); }
.app p { margin-top: .75rem; color: oklch(30% 0.045 62); font-size: 1.15rem; }
.app-button {
  display: block;
  width: fit-content;
  margin-top: 1.75rem;
  padding: 1rem 1.7rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .18s var(--ease);
}
.app-button:hover { transform: translateY(-2px); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding: 1.75rem var(--gutter) calc(1.75rem + env(safe-area-inset-bottom));
  color: var(--ink-soft);
  font-size: .9rem;
}
.foot nav { display: flex; gap: 1.5rem; }

@media (min-width: 860px) {
  .hero { grid-template-columns: 1.15fr 1fr; grid-template-areas: "copy scene" "cta scene"; align-items: start; column-gap: clamp(2rem, 6vw, 6rem); }
  .hero-copy { grid-area: copy; }
  .cta { grid-area: cta; }
  .scene { grid-area: scene; align-self: center; width: 100%; padding-bottom: 6rem; }
  .bubble { font-size: 1.2rem; }
  .cat { right: 0; bottom: -1rem; width: 13rem; }
  .steps ol { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
  .steps li { grid-template-columns: 1fr; gap: .5rem; }
  .steps li::before { font-size: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
