/*
Theme Name: ASKÖ Gmunden (Child)
Template: astra
Version: 1.0.0
Author: Schützenverein ASKÖ Gmunden
Description: Custom-Child-Theme für schuetzen-gmunden.at – volle HTML/CSS-Kontrolle, kein Page-Builder.
*/

:root {
  --color-red: #ED1D24;
  --color-black: #000000;
  --color-white: #FFFFFF;
  --color-dark: #181818;
  --color-anthracite: #2A2A2A;
  --color-light-gray: #EEEEEE;
  --color-text-gray: #555555;
  --color-muted-gray: #999999;

  --font-display: Arial, Helvetica, sans-serif;
  --font-body: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container-width: 1200px;
}

/* Base is dark — white/light-gray are deliberate accent sections, not the
   default. Keeps the whole site feeling like one continuous cinematic
   surface instead of a patchwork of light/dark blocks that all need seams
   smoothed between them. */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
  background: var(--color-dark);
}

body.askoe {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-white);
  background: var(--color-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

.askoe-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.askoe img { max-width: 100%; display: block; }

.askoe h1, .askoe h2, .askoe h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

.askoe h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); text-transform: uppercase; }
.askoe h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
.askoe h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

.askoe p { color: var(--color-white); }
.askoe section li { color: var(--color-white); margin-bottom: 10px; }
.askoe section.section-white li,
.askoe section.section-light-gray li { color: var(--color-black); }
.askoe section ul { padding-left: 1.2em; }

.askoe .container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Plain sections (no modifier) inherit the dark page background — that IS
   the site's base now. .section-dark is just an explicit alias for it and
   deliberately needs NO edge fades at all (it's the same color as its
   surroundings, so there is no seam to smooth). */
.askoe section { padding: 96px 0; position: relative; }
.askoe section.section-dark { color: var(--color-white); }
.askoe section > .container { position: relative; z-index: 1; }
.askoe section.section-dark h1,
.askoe section.section-dark h2,
.askoe section.section-dark h3 { color: var(--color-white); }
.askoe section.section-dark p { color: var(--color-white); }

/* Light accent sections — deliberate breaks from the dark base. Both fade
   from/to the dark base color at their own top+bottom edges (the fade
   belongs to whichever section is visually distinct from its surroundings —
   here that's the light one, since dark is now the default everywhere else). */
.askoe section.section-light-gray,
.askoe section.section-white {
  color: var(--color-black);
}
.askoe section.section-light-gray h1, .askoe section.section-light-gray h2, .askoe section.section-light-gray h3,
.askoe section.section-white h1, .askoe section.section-white h2, .askoe section.section-white h3 { color: var(--color-black); }
.askoe section.section-light-gray p,
.askoe section.section-white p { color: var(--color-black); }

.askoe section.section-light-gray { background: var(--color-light-gray); }
.askoe section.section-white { background: #ffffff; }

/* Light sections carry 90px fade bands at their edges — give the content
   generous clearance beyond that so text never sits inside the gradient. */
.askoe section.section-light-gray,
.askoe section.section-white { padding: 180px 0; }

.askoe section.section-light-gray::before,
.askoe section.section-white::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 90px;
  z-index: 0;
  pointer-events: none;
}
.askoe section.section-light-gray::before { background: linear-gradient(180deg, var(--color-dark) 0%, rgba(238,238,238,0) 100%); }
.askoe section.section-white::before { background: linear-gradient(180deg, var(--color-dark) 0%, rgba(255,255,255,0) 100%); }

/* Their own bottom fade back into the dark base. */
.askoe section.section-light-gray::after,
.askoe section.section-white::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 90px;
  z-index: 0;
  pointer-events: none;
}
.askoe section.section-light-gray::after { background: linear-gradient(180deg, rgba(238,238,238,0) 0%, var(--color-dark) 100%); }
.askoe section.section-white::after { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--color-dark) 100%); }

/* Every boundary has exactly ONE owner. When the adjacent cinematic already
   fades its media into this section's light color (via its --fade-* modifier),
   the light section must NOT paint its own dark fade at that shared edge —
   that duplicate is exactly what rendered as stray black bars. */
.askoe .askoe-cinematic--fade-white + section.section-white::before,
.askoe .askoe-cinematic--fade-bottom-white + section.section-white::before,
.askoe .askoe-cinematic--fade-light + section.section-light-gray::before,
.askoe .askoe-cinematic--fade-bottom-light + section.section-light-gray::before { content: none; }
.askoe section.section-white:has(+ .askoe-cinematic--fade-top-white)::after,
.askoe section.section-light-gray:has(+ .askoe-cinematic--fade-top-light)::after { content: none; }

/* ---- Header ---- */
.askoe-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 4px solid var(--color-red);
}
.askoe-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.askoe-logo { display: flex; align-items: center; text-decoration: none; }
.askoe-logo img { height: 56px; width: auto; }
.askoe-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.askoe-nav a {
  color: var(--color-anthracite);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.85;
}
.askoe-nav a:hover, .askoe-nav a[aria-current="page"] { opacity: 1; color: var(--color-red); }
.askoe-nav-toggle { display: none; }

@media (max-width: 860px) {
  .askoe-nav { display: none; }
}

/* ---- Buttons ---- */
.askoe-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 26px;
  background: var(--color-red);
  color: var(--color-white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 980px;
  border: 1px solid var(--color-red);
  transition: background 0.2s, color 0.2s, opacity 0.2s, transform 0.15s;
}
.askoe-btn::after {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
  flex-shrink: 0;
}
.askoe-btn:hover { background: #ff3b30; border-color: #ff3b30; opacity: 0.92; }
.askoe-btn:active { transform: scale(0.97); }
.askoe-btn.askoe-btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.6);
}
.askoe-btn.askoe-btn-outline:hover { background: var(--color-white); color: var(--color-dark); opacity: 1; }

/* ---- Footer ---- */
/* Footer shares the site's base color — same tone as every plain section,
   so there is simply no seam to smooth (the old approach of fading every
   section's bottom into #000 painted stray black bars all over the page). */
.askoe-footer {
  background: var(--color-dark);
  color: var(--color-white);
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 56px 0 24px;
  font-size: 0.9rem;
}
.askoe-footer a { color: var(--color-white); }
.askoe-footer .askoe-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.askoe-footer h4 { color: var(--color-white); font-family: var(--font-display); margin: 0 0 12px; }
.askoe-footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: #777;
}

/* ---- Scroll reveal (Apple-style fade/slide-up) ----
   CRITICAL: a section's BACKGROUND must never participate in the reveal.
   Fading a whole section to opacity 0 lets the dark page base show through
   where a light background belongs — every neighboring gradient that fades
   toward that light color then ends against dark instead, which looks like
   a broken hard edge at certain scroll positions. So: sections keep their
   background always painted, and only their inner .container animates.
   (Cinematic sections animate their media/content via .is-visible rules of
   their own and are likewise never opacity-animated as a whole.) */
.askoe-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.askoe-reveal.is-visible { opacity: 1; transform: none; }

.askoe section.askoe-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}
.askoe section.askoe-reveal > .container {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.askoe section.askoe-reveal.is-visible > .container { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .askoe-reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
  .askoe-cinematic img, .askoe-cinematic video, .askoe-cinematic-content {
    transition: none !important; opacity: 1 !important; transform: none !important;
  }
}

/* ---- Cinematic full-bleed media section ----
   The section itself (and its gradient overlays) is ALWAYS solid/opaque —
   never part of the fade animation. Only the media + text fade/scale in.
   This avoids a flash-of-wrong-background while the video is still loading. */
.askoe-cinematic {
  position: relative;
  min-height: 78vh;
  min-height: 78svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-dark);
  isolation: isolate;
}

.askoe-cinematic img,
.askoe-cinematic video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  will-change: transform;
  opacity: 0;
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.askoe-cinematic.is-visible img,
.askoe-cinematic.is-visible video { opacity: 1; }

.askoe-cinematic-content {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}
.askoe-cinematic.is-visible .askoe-cinematic-content { opacity: 1; transform: none; }

/* Transparency, not hardcoded destination colors. Two independent pieces:
   1) ::after is ALWAYS just a black vignette (for text legibility) that
      fades to fully transparent at the edges — pure alpha, no color
      assumptions, so it looks correct no matter what's behind/around it.
   2) Where a section genuinely needs to reveal a light canvas (not the
      dark base), the section's own real `background` is set to that
      color, and the img/video is masked (not overlaid) to fade to
      transparent near that edge — so the true flat background shows
      through the image itself, instead of painting a fake solid patch
      over the video. */
/* ONE overlay (::after), in CONTAINER coordinates, that fades to FULLY
   OPAQUE target color at each edge. Three hard-won rules baked in here:
   1. Never split the job across two layers (vignette + separate fade):
      their stops drift apart and paint seams/streaks.
   2. Never end an edge at partial alpha: "video + 50% black" is not the
      same tone as the neighbor's flat color → reads as a hard cut. The
      gradient must end 100% opaque in the neighbor's exact color.
   3. Never attach the fade to the media element (mask-image on img/video):
      parallax transforms the media, so a mask in media coordinates drifts
      away from the section edge and leaves a hard cut at certain scroll
      positions. ::after on the section never moves — the fade always ends
      exactly at the boundary.
   Long ramps (~22-25% of section height) keep it soft ("schön"), and the
   modifier classes only swap the target color at one edge. */
.askoe-cinematic {
  --edge-top: var(--color-dark);
  --edge-bottom: var(--color-dark);
}
.askoe-cinematic--fade-bottom-white,
.askoe-cinematic--fade-white {
  padding-bottom: 160px;
  --edge-bottom: #ffffff;
}
.askoe-cinematic--fade-bottom-light,
.askoe-cinematic--fade-light {
  padding-bottom: 160px;
  --edge-bottom: var(--color-light-gray);
}
.askoe-cinematic--fade-top-white { --edge-top: #ffffff; }
.askoe-cinematic--fade-top-light { --edge-top: var(--color-light-gray); }

.askoe-cinematic::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg,
                var(--edge-top) 0%,
                transparent 25%,
                transparent 68%,
                var(--edge-bottom) 100%),
              linear-gradient(90deg, rgba(237,29,36,0.18) 0%, rgba(0,0,0,0) 40%);
}
.askoe-cinematic-content { position: relative; z-index: 1; }

/* Section content must always render above the decorative fade overlays above. */
.askoe section > .container { position: relative; z-index: 2; }
.askoe-cinematic-content {
  position: relative;
  z-index: 1;
  padding: 56px 24px;
  max-width: var(--container-width);
  margin: 0 auto;
  width: 100%;
  color: var(--color-white);
}
.askoe-cinematic-content h1, .askoe-cinematic-content h2, .askoe-cinematic-content h3 { color: var(--color-white); }
.askoe-cinematic-content p { color: var(--color-white); max-width: 560px; }

/* For bright/light-toned photos where white text loses contrast. */
.askoe-cinematic--dark-text .askoe-cinematic-content,
.askoe-cinematic--dark-text .askoe-cinematic-content h1,
.askoe-cinematic--dark-text .askoe-cinematic-content h2,
.askoe-cinematic--dark-text .askoe-cinematic-content h3,
.askoe-cinematic--dark-text .askoe-cinematic-content p { color: var(--color-black); }
.askoe-cinematic-eyebrow {
  display: inline-block;
  color: var(--color-red);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

/* ---- Forms ---- */
.grecaptcha-badge { visibility: hidden; }
.askoe-recaptcha-notice {
  font-size: 0.78rem;
  color: #888;
  margin-top: 10px;
  max-width: 440px;
}
.askoe-recaptcha-notice a { color: #aaa; }
.askoe-form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
  max-width: 440px;
}
.askoe-form input[type="text"],
.askoe-form input[type="email"],
.askoe-form input[type="tel"],
.askoe-form textarea {
  padding: 14px;
  border: 1px solid #444;
  background: #111;
  color: var(--color-white);
  font-family: inherit;
  font-size: 1rem;
}
.askoe-form input::placeholder, .askoe-form textarea::placeholder { color: #888; }
.askoe-form input:focus, .askoe-form textarea:focus { outline: none; border-color: var(--color-red); }

/* ---- Cookie / consent banner ---- */
.askoe-consent {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  max-width: 560px;
  margin: 0 auto;
  background: var(--color-dark);
  color: var(--color-white);
  padding: 28px;
  border-top: 3px solid var(--color-red);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.askoe-consent strong {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  color: var(--color-red);
  margin-bottom: 10px;
}
.askoe-consent p { color: #ccc; font-size: 0.9rem; margin: 0; }
.askoe-consent a { color: var(--color-white); text-decoration: underline; }
.askoe-consent-actions { display: flex; gap: 12px; margin-top: 20px; }
.askoe-consent-actions button {
  border: 2px solid var(--color-white);
  background: transparent;
  color: var(--color-white);
  padding: 12px 24px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.askoe-consent-actions button:hover { background: var(--color-white); color: var(--color-dark); }
.askoe-consent-actions .askoe-btn { border-color: var(--color-red); }

/* ---- Eyebrow / status tag ---- */
.askoe-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--color-red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 0 0 14px;
  border-left: 3px solid var(--color-red);
  margin-bottom: 24px;
}

/* ---- Divided facts list (replaces boxed card grids) ----
   Fixed 3 columns (not auto-fit) so rows always fill evenly — a leftover
   item just starts a fresh row of the same grid, never an orphaned
   partial-width border. One top rule for the whole block, vertical
   dividers between columns instead of fragile per-row top borders. */
/* Defaults assume a dark surrounding section (the site's base now);
   .section-light-gray/.section-white flip the divider + text colors back
   to dark-on-light. */
.askoe-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,0.18);
}
.section-light-gray .askoe-facts,
.section-white .askoe-facts { border-top-color: rgba(0,0,0,0.12); }
.askoe-facts > div {
  padding: 28px;
  border-left: 1px solid rgba(255,255,255,0.18);
}
.askoe-facts > div:nth-child(3n+1) { border-left: none; padding-left: 0; }
.section-light-gray .askoe-facts > div,
.section-white .askoe-facts > div { border-left-color: rgba(0,0,0,0.12); }
.askoe-facts h3 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 10px;
}
.askoe-facts p { margin: 0; font-size: 1.1rem; color: var(--color-white); }
.section-light-gray .askoe-facts p,
.section-white .askoe-facts p { color: var(--color-anthracite); }

@media (max-width: 860px) {
  .askoe-facts { grid-template-columns: repeat(2, 1fr); }
  .askoe-facts > div:nth-child(3n+1) { border-left: 1px solid rgba(255,255,255,0.18); padding-left: 28px; }
  .section-light-gray .askoe-facts > div:nth-child(3n+1),
  .section-white .askoe-facts > div:nth-child(3n+1) { border-left-color: rgba(0,0,0,0.12); }
  .askoe-facts > div:nth-child(2n+1) { border-left: none; padding-left: 0; }
}
@media (max-width: 560px) {
  .askoe-facts { grid-template-columns: 1fr; }
  .askoe-facts > div { border-left: none !important; padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.18); }
  .section-light-gray .askoe-facts > div,
  .section-white .askoe-facts > div { border-top-color: rgba(0,0,0,0.12); }
  .askoe-facts > div:first-child { border-top: none; }
}

/* ---- Team grid ---- */
.askoe-team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.askoe-team-member {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-dark);
}
.askoe-team-member img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Normalizes uneven exposure/lighting across portraits shot at different times. */
  filter: contrast(1.08) brightness(1.05) saturate(0.92);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.askoe-team-member:hover img { transform: scale(1.05); }
.askoe-team-member::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.05) 55%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
  pointer-events: none;
}
.askoe-team-member-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 20px;
}
.askoe-team-member-role {
  display: block;
  color: var(--color-red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.askoe-team-member-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-white);
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .askoe section { padding: 56px 0; }
  .askoe-logo img { height: 40px; }
  .askoe-cinematic-content { padding: 32px 20px; }
  .askoe-cinematic { min-height: 70vh; min-height: 70svh; }
  /* Fixed-pixel fade bands eat a much bigger share of a short mobile
     viewport — shrink them (and the reserved gap) so they never creep up
     into the flex-end text and wash it out. */
  .askoe-cinematic--fade-bottom-white,
  .askoe-cinematic--fade-white,
  .askoe-cinematic--fade-bottom-light,
  .askoe-cinematic--fade-light { padding-bottom: 60px; }
  .askoe-facts > div { padding: 20px 0; }
  .askoe-consent { left: 12px; right: 12px; bottom: 12px; padding: 20px; }
  .askoe-footer-bottom { flex-direction: column; }
}
