/* MZTT — direção Shu (朱). Tokens claro/escuro vindos do estudo de cores. */

:root {
  --bg: #F6F0E6;          /* washi */
  --surface: #FFFFFF;
  --ink: #1B1A18;         /* sumi */
  --muted: #5A554A;
  --accent: #B8281F;      /* shu */
  --accent-hover: #77120D;
  --on-accent: #FFFFFF;
  --border: #DBD7CF;
  --field-border: #8D8578;
  --placeholder: #726B5E;
  --sun: #FFE3C4;
  --dots: #C2BDB3;
  --card-last-bg: #1B1A18;
  --card-last-ink: #F6F0E6;
  --card-last-muted: #DBD7CF;
  --card-last-kanji: #F77464;

  --font-sans: "Plus Jakarta Sans", "Klee One", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Caveat", cursive;
  --font-kanji: "Klee One", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

/* Escuro: segue o sistema, a menos que o usuário tenha escolhido manualmente. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B1A18; --surface: #2C2822; --ink: #F6F0E6; --muted: #C2BDB3;
    --accent: #F77464; --accent-hover: #FEA294; --border: #443F37;
    --placeholder: #A7A195; --sun: #F6F0E6; --dots: #726B5E;
    --card-last-bg: #B8281F; --card-last-ink: #FFFFFF; --card-last-muted: #FFE3C4; --card-last-kanji: #FFE3C4;
  }
}
:root[data-theme="dark"] {
  --bg: #1B1A18; --surface: #2C2822; --ink: #F6F0E6; --muted: #C2BDB3;
  --accent: #F77464; --accent-hover: #FEA294; --border: #443F37;
  --placeholder: #A7A195; --sun: #F6F0E6; --dots: #726B5E;
  --card-last-bg: #B8281F; --card-last-ink: #FFFFFF; --card-last-muted: #FFE3C4; --card-last-kanji: #FFE3C4;
}
/* O botão "Avise-me" mantém o vermelho Shu em ambos os temas. */
:root { --button-bg: #B8281F; --button-hover: #9C1D16; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  transition: background-color .25s ease, color .25s ease;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.page {
  max-width: 1240px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 24px 0;
  display: flex;
  flex-direction: column;
}
.hand { font-family: var(--font-hand); font-weight: 700; color: var(--accent); }

/* Header */
.header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: -0.03em; }
.brand__tag { font-family: var(--font-hand); font-weight: 700; font-size: 19px; line-height: 1.1; color: var(--accent); }
.brand__mark--dark { display: none; }

.header__actions { display: flex; align-items: center; gap: 10px; }
.badge {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface); font-size: 13px; font-weight: 700;
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.theme-toggle {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); }
.theme-toggle__sun { display: none; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 64px 0 56px; }
.hero__copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero__eyebrow { font-size: 30px; line-height: 1.1; }
.eyebrow-dark { display: none; }
h1 { margin: 0; font-weight: 800; font-size: clamp(2.5rem, 5vw, 4.25rem); line-height: 1.04; letter-spacing: -0.03em; }
.hero__lead { margin: 0; font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 560px; }
.hero__art { flex: 1 1 340px; min-width: 0; display: flex; justify-content: center; }
.hero__art svg { width: 100%; max-width: 460px; height: auto; }
.art-sun { fill: var(--sun); }
.art-ground { stroke: var(--ink); }
.art-dots { stroke: var(--dots); }
.art-stars { display: none; }

/* Formulário */
.notify { max-width: 520px; display: flex; flex-direction: column; gap: 8px; }
.notify label { font-size: 14px; font-weight: 700; }
.notify__row { display: flex; flex-wrap: wrap; gap: 10px; }
.notify input {
  flex: 1 1 240px; min-height: 52px; padding: 0 20px;
  border: 1px solid var(--field-border, #8D8578); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px;
}
.notify input::placeholder { color: var(--placeholder); }
.notify button {
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--button-bg); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
}
.notify button:hover { background: var(--button-hover); }
.notify button:disabled { opacity: .6; cursor: wait; }
.notify__error { margin: 0; font-size: 14px; font-weight: 700; color: var(--accent); }
.notify-done {
  max-width: 520px; display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-radius: 20px; background: var(--surface); color: var(--ink);
  font-size: 16px; font-weight: 700;
}
.notify-done svg { flex: none; color: var(--accent); }
[hidden] { display: none !important; }

/* Pilares */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding-bottom: 56px; }
.card { background: var(--surface); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.card h2 { margin: 0; font-size: 19px; font-weight: 800; }
.card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.kanji { font-family: var(--font-kanji); font-weight: 600; font-size: 34px; line-height: 1; color: var(--accent); }
.card--accent { background: var(--card-last-bg); color: var(--card-last-ink); }
.card--accent p { color: var(--card-last-muted); }
.card--accent .kanji { color: var(--card-last-kanji); }

/* Footer */
.footer {
  margin-top: auto; border-top: 1px solid var(--border); padding: 22px 0 28px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--muted);
}
.footer__slogan { font-size: 22px; }
.footer a { font-weight: 700; }

/* Tema escuro: troca de elementos (logo em selo, lua, estrelas, texto) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__mark--light { display: none; }
  :root:not([data-theme="light"]) .brand__mark--dark { display: block; }
  :root:not([data-theme="light"]) .eyebrow-light { display: none; }
  :root:not([data-theme="light"]) .eyebrow-dark { display: inline; }
  :root:not([data-theme="light"]) .art-stars { display: block; }
  :root:not([data-theme="light"]) .art-ground { stroke: #F6F0E6; }
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
}
:root[data-theme="dark"] .brand__mark--light { display: none; }
:root[data-theme="dark"] .brand__mark--dark { display: block; }
:root[data-theme="dark"] .eyebrow-light { display: none; }
:root[data-theme="dark"] .eyebrow-dark { display: inline; }
:root[data-theme="dark"] .art-stars { display: block; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }

@media (max-width: 560px) {
  .page { padding: 24px 16px 0; }
  .hero { padding: 40px 0 40px; gap: 32px; }
  .footer { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .badge__dot { animation: none; }
  body { transition: none; }
}
