/* Torato — shared site styles */

:root {
  --ink: #262a3f;
  --ink-soft: #565b76;
  --paper: #faf8f2;
  --paper-raised: #ffffff;
  --navy: #2e3563;
  --navy-deep: #232949;
  --gold: #e8cf8e;
  --gold-deep: #b89a4e;
  --lavender: #a8aecb;
  --rule: #e3dfd2;
  --link: #3d477f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e6dd;
    --ink-soft: #a9adc4;
    --paper: #1b1f33;
    --paper-raised: #232949;
    --navy: #2e3563;
    --navy-deep: #171b2c;
    --gold: #e8cf8e;
    --gold-deep: #d4b76a;
    --rule: #363d5e;
    --link: #b3bce8;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Iowan Old Style", "Palatino Nova", Palatino, Georgia, "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
header.site {
  padding: 1.5rem 0;
}
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.brand span { font-size: 1.3rem; letter-spacing: 0.01em; }
nav.site a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 1.1rem;
}
nav.site a:hover { color: var(--ink); text-decoration: underline; }

/* Hero (index) */
.hero {
  background: radial-gradient(ellipse 120% 90% at 50% -10%, #3d4577 0%, var(--navy) 45%, var(--navy-deep) 100%);
  color: #f2f0e6;
  text-align: center;
  padding: 4.5rem 0 4rem;
}
.hero img.mark { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 40px rgba(0,0,0,0.35); }
.hero h1 {
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-top: 1.4rem;
}
.hero p.tag {
  color: var(--gold);
  font-style: italic;
  font-size: 1.15rem;
  margin-top: 0.5rem;
}
.hero p.sub {
  color: #c6cade;
  max-width: 34rem;
  margin: 1.2rem auto 0;
}
.hero .cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
}
.hero .cta:hover { background: rgba(232, 207, 142, 0.12); }

/* Feature sections (index) */
main.index section {
  padding: 2.6rem 0 0;
}
main.index section:last-of-type { padding-bottom: 3rem; }
h2 {
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.4rem 0 0.3rem;
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem;
  margin-top: 1.4rem;
}
.feature {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
}
.feature h3 { margin: 0 0 0.3rem; }
.feature p { color: var(--ink-soft); font-size: 0.97rem; }

/* Article pages (privacy, terms, support, licenses) */
main.article { padding: 1rem 0 3.5rem; }
main.article h1 {
  font-size: 2rem;
  font-weight: 600;
  margin: 1.2rem 0 0.3rem;
}
main.article p.updated {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 1.8rem;
}
main.article h2 { margin-top: 2.1rem; }
main.article p, main.article ul, main.article ol { margin-top: 0.7rem; }
main.article ul, main.article ol { padding-left: 1.4rem; }
main.article li { margin-top: 0.35rem; }
main.article .note {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold-deep);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-top: 1rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(40rem, calc(100% - 2rem));
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--navy-deep);
  color: #e8e6dd;
  border: 1px solid #3d4577;
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  z-index: 10;
}
.cookie-banner a { color: var(--gold); }
.cookie-banner button {
  font: inherit;
  flex-shrink: 0;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  cursor: pointer;
}
.cookie-banner button:hover { background: rgba(232, 207, 142, 0.12); }

/* Footer */
footer.site {
  border-top: 1px solid var(--rule);
  padding: 1.8rem 0 2.4rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  align-items: baseline;
}
footer.site a { color: var(--ink-soft); }
footer.site .copy { margin-right: auto; }

/* ---------- Landing film (index) ---------- */
body.film { background: var(--navy-deep); color: #f2f0e6; }
.film-nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  padding: 1.1rem 0;
  background: linear-gradient(rgba(20, 23, 40, 0.55), rgba(20, 23, 40, 0));
}
.film-nav .wrap { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.film-nav .brand { color: #f2f0e6; }
.film-nav nav.site { margin-left: auto; }
.film-nav nav.site a { color: #dfe2ef; }
.film-nav nav.site a:hover { color: #fff; }

.hero-film { position: relative; min-height: 78vh; overflow: hidden; background: var(--navy-deep); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-overlay {
  position: relative; z-index: 2; min-height: 78vh;
  display: flex; align-items: flex-end;
  background: linear-gradient(rgba(35, 41, 73, 0) 45%, rgba(35, 41, 73, 0.9) 100%);
  padding-bottom: 3rem;
}
.hero-overlay .wrap { max-width: 34rem; margin-left: max(1.25rem, calc((100% - 62rem) / 2)); }
.hero-overlay h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 600; letter-spacing: 0.01em; }
.hero-overlay .tag { color: var(--gold); font-style: italic; font-size: clamp(1.1rem, 2.2vw, 1.5rem); margin-top: 0.2rem; }
.hero-overlay .sub { color: #c6cade; max-width: 34rem; margin-top: 0.9rem; font-size: 1.05rem; }
.hero-overlay .cta {
  display: inline-block; margin-top: 1.6rem; padding: 0.7rem 1.5rem;
  border: 1px solid var(--gold); border-radius: 999px; color: var(--gold);
  text-decoration: none; font-size: 0.98rem; letter-spacing: 0.03em;
}
.hero-overlay .cta:hover { background: rgba(232, 207, 142, 0.12); }
.video-toggle {
  position: absolute; right: 1rem; bottom: 1rem; z-index: 3;
  font: inherit; font-size: 0.82rem; color: #dfe2ef;
  background: rgba(20, 23, 40, 0.6); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px; padding: 0.35rem 0.9rem; cursor: pointer;
}
.video-desc { background: var(--navy-deep); padding: 0.9rem 0; }
.video-desc details { color: #c6cade; font-size: 0.92rem; }
.video-desc summary { cursor: pointer; color: #dfe2ef; }
.video-desc p { margin-top: 0.7rem; line-height: 1.6; max-width: 60rem; }

.film-main { background: var(--paper); color: var(--ink); }
.beat { padding: 4.5rem 0; }
.beat:nth-of-type(even) { background: var(--paper-raised); }
.beat .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
.beat.flip .wrap figure { order: 2; }
.beat figure { margin: 0; }
.beat img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 18px 50px rgba(35, 41, 73, 0.18); display: block; }
.beat h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -0.01em; }
.beat p { color: var(--ink-soft); margin-top: 0.8rem; font-size: 1.05rem; }
.beat-text { padding: 4rem 0; background: var(--navy); color: #e8e6dd; }
.beat-text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
.beat-text p { margin-top: 0.8rem; max-width: 46rem; color: #c6cade; font-size: 1.05rem; }
.beta { padding: 4.5rem 0 5rem; background: var(--paper); }
.beta h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 600; }
.beta .lead { color: var(--ink-soft); max-width: 40rem; margin-top: 0.7rem; font-size: 1.05rem; }
body.film footer.site { background: var(--paper); }
@media (max-width: 760px) {
  .beat .wrap { grid-template-columns: 1fr; gap: 1.4rem; }
  .beat.flip .wrap figure { order: 0; }
  .hero-film, .hero-overlay { min-height: 62vh; }
}

/* ---------- Forms (contact + beta) ---------- */
.torato-form { margin-top: 1.4rem; max-width: 40rem; }
.torato-form .row { margin-top: 1rem; }
.torato-form label, .torato-form legend { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; }
.torato-form .opt { font-weight: 400; color: var(--ink-soft); }
.torato-form input[type=text], .torato-form input[type=email], .torato-form select, .torato-form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 10px;
  padding: 0.65rem 0.8rem;
}
.torato-form textarea { resize: vertical; min-height: 9rem; }
.torato-form input:focus, .torato-form select:focus, .torato-form textarea:focus { outline: 2px solid var(--gold-deep); outline-offset: 1px; border-color: var(--gold-deep); }
.torato-form fieldset { border: 0; padding: 0; }
.torato-form .choice { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 400; margin: 0.2rem 1.3rem 0 0; }
.torato-form .consent { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; margin-top: 1.1rem; font-size: 0.95rem; color: var(--ink-soft); }
.torato-form .consent input { margin-top: 0.25rem; }
.torato-form .actions { margin-top: 1.3rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.torato-form button.primary {
  font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 0.7rem 1.5rem;
}
.torato-form button.primary:hover { background: var(--navy-deep); }
.torato-form button.primary:disabled { opacity: 0.6; cursor: default; }
.form-status { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.form-status.ok { color: #2e7d4f; }
.form-status.err { color: #a23b3b; }
/* honeypot: off-screen for people, present for bots */
.torato-form .hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* phone: the 16:9 film sits above the copy instead of being cropped beneath it */
@media (max-width: 760px) {
  .film-nav { position: static; background: var(--navy-deep); padding: 0.9rem 0; }
  .hero-film { min-height: 0; }
  .hero-video { position: relative; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #232949; }
  .hero-overlay { min-height: 0; background: none; padding: 1.4rem 0 2.2rem; }
  .hero-overlay .wrap { margin-left: auto; }
  .video-toggle { top: auto; bottom: auto; right: 1rem; margin-top: -2.6rem; position: relative; float: right; }
}
