/* ─────────────────────────────────────────────────────────────
   Sunshine Naturfelle GmbH — under-construction page.
   System fonts only. No external dependencies. DSGVO-safe.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Brand palette */
  --cream:        #FEFCF7;
  --cream-warm:   #FAF6EE;
  --ink:          #2B1810;
  --brown-deep:   #5C3A1F;
  --brown-mid:    #6B4423;
  --gold-dust:    #8B6F3D;
  --gold:         #C4A35A;
  --gold-light:   #D4B788;
  --gold-glow:    #F5D77E;

  /* Type stacks (no Google Fonts) */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino,
           "Book Antiqua", Georgia, serif;
  --sans:  Arial, Helvetica, "Segoe UI", system-ui, sans-serif;

  /* Iridescent runtime vars (written by script.js every frame) */
  --sx: 50;
  --foilAngle: 110;
  --mx: 50; --my: 50; --rx: 0; --ry: 0;

  /* Iridescent geometry */
  --logo-size: clamp(190px, 38vw, 320px);
  --perspective: 1400px;

  /* Logo image (slight contrast to make foil/sheen read on cream) */
  --logo-brightness: 0.95;
  --logo-contrast: 1.20;

  /* Foil (luminance band) */
  --foil-opacity: 0.58;
  --foil-blend: overlay;
  --foil-sat: 1.30;

  /* Sheen (warm-gold highlight) */
  --sheen-opacity: 0.85;
  --sheen-angle: 110;
  --sheen-blend: overlay;

  /* Specular (only visible on hover) */
  --spec-opacity: 0.45;
  --spec-size: 70;
  --spec-blend: soft-light;

  /* Grain */
  --grain-opacity: 0.18;

  /* Glow (always visible at idle, brighter on hover) */
  --glow-blur: 50px;
  --glow-opacity-idle:  0.22;
  --glow-opacity-hover: 0.55;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--cream-warm) 0%, var(--cream) 60%);
}

/* ── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px; top: 0;
  background: var(--ink); color: var(--cream);
  padding: 10px 14px; text-decoration: none;
  font-family: var(--sans); font-size: 13px;
  border-radius: 2px;
}
.skip-link:focus { left: 8px; top: 8px; z-index: 1000; }

/* ── Decorative bands ──────────────────────────────────────── */
.band { width: 100%; flex: 0 0 auto; }
.band--top {
  height: 11px;
  background: linear-gradient(90deg,
    var(--brown-deep) 0%, var(--gold) 50%, var(--brown-deep) 100%);
}
.band--bottom {
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gold-light) 18%,
    var(--brown-deep) 50%,
    var(--gold-light) 82%,
    transparent 100%);
  margin-top: auto;
  opacity: 0.55;
}

@media (min-width: 720px) {
  .band--top { height: 13px; }
}

/* ── Language switch ───────────────────────────────────────── */
.lang {
  position: absolute;
  top: 22px; right: 28px;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.18em;
  z-index: 10;
}
.lang__link {
  color: var(--brown-mid); text-decoration: none;
  padding: 2px 0; transition: color 0.2s, border-color 0.2s;
}
.lang__link.is-active {
  color: var(--ink); font-weight: 700;
  border-bottom: 1.5px solid var(--gold);
}
.lang__link:hover { color: var(--ink); }
.lang__link:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 4px;
  border-radius: 2px;
}
.lang__sep { color: var(--gold-light); }

@media (max-width: 640px) {
  .lang {
    position: static; justify-content: center;
    padding: 14px 0 4px;
  }
}

/* ── Page column ───────────────────────────────────────────── */
.page {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(36px, 8vw, 72px) 24px 56px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  flex: 1 0 auto;
}

/* ─────────────────────────────────────────────────────────────
   IRIDESCENT LOGO — final, calibrated for cream background.

   Layer stack inside .clip (bottom → top):
     1. .logo-base  — the actual logo image
     2. .foil       — directional luminance band (the moving "shine")
     3. .sheen      — narrow warm-gold highlight band
     4. .specular   — soft ambient warmth that follows cursor on hover
     5. .grain      — subtle film noise to break up the gradients

   Behind the card:
     .glow          — warm aura, always present, brighter on hover

   Driving variables (written by script.js every frame):
     --sx           : 0..100, position of the moving light band
     --foilAngle    : degrees, rotation of the foil gradient
     --mx, --my     : 0..100, cursor position (specular + glow)
     --rx, --ry     : degrees, 3D tilt of the card on hover
   ───────────────────────────────────────────────────────────── */

.logo-wrap { margin-bottom: clamp(22px, 4vw, 32px); }

.scene {
  position: relative;
  width: var(--logo-size);
  height: var(--logo-size);
  perspective: var(--perspective);
}

.card {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--ry) * 1deg))
             rotateY(calc(var(--rx) * 1deg));
  transition: transform 0.18s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}

.clip {
  position: absolute; inset: 0;
  border-radius: 50%;
  overflow: hidden;
}

/* Layer 1 — the logo image. */
.logo-base {
  position: absolute; inset: 0;
  background-image: url("./logo-seal.jpg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  filter: brightness(var(--logo-brightness))
          contrast(var(--logo-contrast));
}

/* Layer 2 — foil: directional luminance sweep (linear gradient
   along --foilAngle), with the bright peak position driven by --sx
   so it travels with the sheen. */
.foil {
  position: absolute; inset: 0;
  pointer-events: none;
  mix-blend-mode: var(--foil-blend);
  opacity: var(--foil-opacity);
  background:
    linear-gradient(
      calc(var(--foilAngle) * 1deg),
      rgba(0, 0, 0, 0.16)         0%,
      rgba(245, 215, 126, 0.45)   calc(var(--sx) * 1% - 18%),
      rgba(255, 235, 170, 0.75)   calc(var(--sx) * 1%),
      rgba(245, 215, 126, 0.45)   calc(var(--sx) * 1% + 18%),
      rgba(0, 0, 0, 0.16)         100%
    );
  filter: saturate(var(--foil-sat));
}

/* Layer 3 — sheen: narrow warm-gold highlight band travelling
   across the logo on top of the foil. */
.sheen {
  position: absolute; inset: 0;
  pointer-events: none;
  mix-blend-mode: var(--sheen-blend);
  opacity: var(--sheen-opacity);
  background:
    linear-gradient(
      calc(var(--sheen-angle) * 1deg),
      transparent                  calc(var(--sx) * 1% - 22%),
      rgba(245, 215, 126, 0.0)     calc(var(--sx) * 1% - 14%),
      rgba(255, 220, 130, 0.70)    calc(var(--sx) * 1%),
      rgba(245, 215, 126, 0.0)     calc(var(--sx) * 1% + 14%),
      transparent                  calc(var(--sx) * 1% + 22%)
    );
}

/* Layer 4 — specular: soft ambient warmth that tracks the cursor.
   Hidden by default; eased in on hover. Large radius + low peak +
   blur produces a diffuse glow rather than a hot spot. */
.specular {
  position: absolute; inset: 0;
  pointer-events: none;
  mix-blend-mode: var(--spec-blend);
  opacity: 0;
  transition: opacity 0.45s ease;
  background:
    radial-gradient(
      circle calc(var(--spec-size) * 1%)
      at calc(var(--mx) * 1%) calc(var(--my) * 1%),
      rgba(255, 230, 170, 0.30)  0%,
      rgba(255, 230, 170, 0.16) 25%,
      rgba(255, 230, 170, 0.06) 55%,
      rgba(255, 230, 170, 0.00) 100%
    );
  filter: blur(8px);
}
.scene.hover .specular { opacity: var(--spec-opacity); }

/* Layer 5 — grain: inline SVG fractal noise to break up bands. */
.grain {
  position: absolute; inset: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

/* Aura — warm glow behind the card; brighter on hover. */
.glow {
  position: absolute; inset: -20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(var(--glow-blur));
  opacity: var(--glow-opacity-idle);
  transition: opacity 0.45s ease;
  background:
    radial-gradient(
      60% 50% at calc(var(--mx) * 1%) calc(var(--my) * 1%),
      rgba(245, 215, 126, 0.65)  0%,
      rgba(196, 163,  90, 0.45) 35%,
      transparent               70%
    );
}
.scene.hover .glow { opacity: var(--glow-opacity-hover); }

/* ── Visually-hidden (a11y / SEO) ──────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Message ───────────────────────────────────────────────── */
.message {
  margin-top: clamp(28px, 6vw, 44px);
  margin-bottom: clamp(28px, 6vw, 44px);
}
.message__heading {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.35rem, 3.6vw, 1.8rem);
  line-height: 1.3; color: var(--ink);
  margin: 0 0 18px;
}
.message__body {
  font-family: var(--sans); color: var(--brown-mid);
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  line-height: 1.65; max-width: 460px;
  margin: 0 auto;
}

/* ── Dots vignette ─────────────────────────────────────────── */
.dots {
  display: flex; gap: 10px; justify-content: center;
  margin: 8px 0 clamp(22px, 5vw, 32px);
}
.dots span {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold);
}

/* ── Contact ───────────────────────────────────────────────── */
.contact { margin-bottom: clamp(36px, 7vw, 56px); }
.contact__label {
  font-family: var(--sans); font-size: 11px;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold-dust);
  margin: 0 0 10px;
}
.contact__email a {
  font-family: var(--serif); font-size: clamp(1rem, 2.4vw, 1.15rem);
  color: var(--brown-deep); text-decoration: none;
  border-bottom: 1px dotted var(--gold);
  padding-bottom: 2px;
  transition: border-bottom-color 0.2s, border-bottom-style 0.2s;
}
.contact__email a:hover {
  border-bottom: 1px solid var(--gold);
}
.contact__email a:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 4px;
  border-radius: 2px;
}

/* ── Footer ────────────────────────────────────────────────── */
.foot {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 16px 16px;
  text-align: center;
}
.foot__logo {
  max-width: 260px;
  width: 100%;
  height: auto;
  opacity: 0.92;
  display: block;
}
.foot__text {
  margin: 0;
  font-family: var(--sans); font-size: 10.5px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-dust);
}
.foot__text span { color: var(--gold); margin: 0 0.4rem; }

@media (min-width: 720px) {
  .foot__logo { max-width: 380px; }
  .foot { gap: 18px; padding: 16px 16px 18px; }
}

/* ── Page-load cascade ─────────────────────────────────────── */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.logo-wrap,
.message,
.dots,
.contact {
  opacity: 0;
  animation: riseIn 0.9s cubic-bezier(.2,.7,.2,1) forwards;
}
.logo-wrap{ animation-delay: 0.05s; }
.message  { animation-delay: 0.30s; }
.dots     { animation-delay: 0.55s; }
.contact  { animation-delay: 0.70s; }

/* ── Reduced motion: disable cascade, tilt, transitions ───── */
@media (prefers-reduced-motion: reduce) {
  .logo-wrap, .message, .dots, .contact {
    opacity: 1; animation: none;
  }
  .card { transition: none; transform: none !important; }
  .specular, .glow { transition: none; }
}

/* ── Print (bonus — caso alguém imprima a página) ─────────── */
@media print {
  body { background: #FFF; }
  .band, .lang, .skip-link { display: none; }
  .card { transform: none !important; }
  .glow, .foil, .sheen, .specular, .grain { display: none; }
}
