/* ==========================================================================
   kanada.schleinzer.app — teaser page
   No external fonts, no frameworks, no tracking. System fonts only.
   ========================================================================== */

:root {
  /* -- palette -------------------------------------------------------- */
  --forest-950: #0d1712;   /* near-black forest, base of the overlay      */
  --forest-800: #17281f;   /* lighter forest, used in gradients           */
  --cream: #f3ede1;        /* warm cream white — primary text             */
  --cream-dim: rgba(243, 237, 225, 0.74);
  --cream-faint: rgba(243, 237, 225, 0.55);
  --maple: #b5432c;        /* small maple-red accent, used sparingly      */

  /* -- type ------------------------------------------------------------ */
  --font-display: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;

  color-scheme: dark;
}

/* -- reset / base -------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--forest-950); /* shows instantly, before hero.png loads */
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* -- hero ----------------------------------------------------------------
   Single full-viewport section. The dark overlay and the photo are two
   background layers on the same element, so the browser only ever
   composites one box — good for performance.
   -------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  background-image:
    linear-gradient(
      180deg,
      rgba(13, 23, 18, 0.62) 0%,
      rgba(13, 23, 18, 0.30) 42%,
      rgba(13, 23, 18, 0.40) 62%,
      rgba(9, 16, 12, 0.72) 100%
    ),
    radial-gradient(
      ellipse at 50% 45%,
      rgba(9, 16, 12, 0) 40%,
      rgba(9, 16, 12, 0.55) 100%
    ),
    url("assets/hero.png");
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-color: var(--forest-950);
}

/* subtle film-grain, drawn with an inline SVG noise filter — no image request */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* -- top label ------------------------------------------------------------ */
.hero-top {
  width: 100%;
  padding: clamp(1rem, 3vw, 1.75rem);
  position: relative;
  z-index: 1;
}

.brand {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--cream-dim);
  opacity: 0;
  animation: fadeIn 1.1s ease-out 0.15s forwards;
}

/* -- center block ---------------------------------------------------------- */
.hero-center {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  max-width: 40rem;
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 7rem);
  letter-spacing: 0.01em;
  color: var(--cream);
  opacity: 0;
  animation: fadeInUp 1.3s ease-out 0.3s forwards;
}

.subtitle {
  margin: 0.5rem 0 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(0.95rem, 2.6vw, 1.35rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: 0;
  animation: fadeInUp 1.3s ease-out 0.55s forwards;
}

.subtitle .accent {
  color: var(--cream);
  border-bottom: 1px solid rgba(181, 67, 44, 0.55);
  padding-bottom: 0.1em;
}

.tagline {
  margin: 1.25rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  color: var(--cream-faint);
  opacity: 0;
  animation: fadeInUp 1.3s ease-out 0.8s forwards;
}

/* -- bottom label ----------------------------------------------------------- */
.hero-bottom {
  width: 100%;
  padding: clamp(1rem, 3vw, 1.75rem);
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-bottom span {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--cream-faint);
  opacity: 0;
  animation: fadeIn 1.1s ease-out 1.05s forwards;
}

/* -- legal disclosure (§) ----------------------------------------------------
   Native <details>/<summary>, no JavaScript. The "§" is the only control:
   tapping it opens the panel, tapping it again (now shown as "×") closes it.
   -------------------------------------------------------------------- */
.legal {
  margin-top: 0.6rem;
}

.legal summary {
  position: relative;
  z-index: 31; /* stays above .legal-panel so it can also close it */
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--cream-faint);
  opacity: 0;
  animation: fadeIn 1.1s ease-out 1.2s forwards;
  transition: color 0.2s ease;
}

.legal summary::-webkit-details-marker {
  display: none;
}
.legal summary::marker {
  content: "";
}

.legal summary:hover {
  color: var(--cream);
}

.legal summary:focus-visible {
  outline: 1px solid var(--cream-dim);
  outline-offset: 3px;
}

.legal .mark-open {
  display: none;
}
.legal[open] .mark-closed {
  display: none;
}
.legal[open] .mark-open {
  display: inline;
}
.legal[open] summary {
  color: var(--cream);
}

/* full-viewport backdrop + centred panel — only rendered while open */
.legal-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(9, 16, 12, 0.84);
  animation: fadeIn 0.25s ease-out;
}

.legal-panel-inner {
  width: 100%;
  max-width: 32rem;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--forest-800);
  border: 1px solid rgba(243, 237, 225, 0.14);
  padding: 1.75rem 1.5rem;
  text-align: left;
}

.legal-panel-inner h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--cream);
}

.legal-panel-inner p {
  margin: 0 0 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--cream-dim);
}

.legal-panel-inner p:last-child {
  margin-bottom: 0;
}

.legal-panel-inner a {
  color: var(--cream);
  text-decoration-color: var(--maple);
}

.legal-panel-inner a:focus-visible {
  outline: 1px solid var(--cream-dim);
  outline-offset: 2px;
}

/* progressive enhancement: lock background scroll while the panel is open
   (no-op in browsers without :has() support — panel still works fine) */
body:has(.legal[open]) {
  overflow: hidden;
}

/* -- motion ------------------------------------------------------------------ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .brand, .title, .subtitle, .tagline, .hero-bottom span, .legal summary {
    animation: none;
    opacity: 1;
  }
  .legal-panel {
    animation: none;
  }
}

/* -- small screens ------------------------------------------------------------ */
@media (max-width: 420px) {
  .hero-center {
    padding: 1rem;
  }
}
