/* assets/css/aboutus.css
   Advanced About Us styles for Funkenwelt
   - Centered layout
   - Matching Home background + aurora
   - Decorative orbs, shimmer edge, improved responsive spacing
   - Scoped with aw- prefix so it only affects About page
*/

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Inter:wght@300;400;600&display=swap');

/* ========================
   Core variables (site palette)
   ======================== */
:root {
  --gold: #E6C27A;
  --rose: #C18A6E;
  --cream: #FFF8EC;
  --peach: #F3D1B0;
  --brown: #3E1E1A;
  --bg-dark: #140E0C;

  --card-radius: 1.5rem;
  --card-max-width: 980px;
  --content-max-width: 60ch;
  --gutter: 1.25rem;

  --header-height: 74px;
  --header-offset: 0px;
}

/* ===== Reset within scope ===== */
.aw-root, .aw-root * { box-sizing: border-box; }

/* ===== Body + Aurora background (identical feel to Home) =====
   NOTE: This file should be enqueued only on the About page; therefore overriding
   body styles here is safe and intentional to reproduce the same backdrop.
*/
body {
  font-family: 'Inter', sans-serif;
  color: var(--cream);
  overflow-x: hidden;
  background: radial-gradient(circle at center, rgba(248,213,126,0.12), rgba(20,10,8,0.92) 90%);
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
}

/* aurora overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(80% 60% at 20% 30%, rgba(230,194,122,0.18), transparent),
              radial-gradient(80% 60% at 80% 70%, rgba(193,138,110,0.18), transparent);
  animation: aw-auroraMove 18s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}
@keyframes aw-auroraMove {
  0% { background-position: 0% 50%, 100% 50%; }
  50% { background-position: 100% 50%, 0% 50%; }
  100% { background-position: 0% 50%, 100% 50%; }
}

/* small extra vignette so side edges feel identical to home */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(1000px 300px at 50% 55%, rgba(0,0,0,0.06), transparent 35%);
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* ===== Root wrapper for About content (above the aurora) ===== */
.aw-root {
  position: relative;
  z-index: 2; /* ensure sits above body pseudo elements */
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;           /* vertical centering on tall viewports */
  justify-content: center;       /* horizontal centering */
  padding: clamp(1rem, 2.5vw, 3rem);
}

/* ===== The card (centered box) ===== */
.aw-card {
  position: relative;
  z-index: 3;
  width: min(94%, var(--card-max-width));
  border-radius: var(--card-radius);
  background: radial-gradient(circle at top center,
              rgba(230,194,122,0.05),
              rgba(193,138,110,0.08),
              rgba(20,10,8,0.85));
  border: 1px solid rgba(230,194,122,0.22);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  box-shadow:
    0 24px 60px rgba(20,10,8,0.85),
    0 10px 40px rgba(193,138,110,0.12),
    inset 0 0 40px rgba(230,194,122,0.03);
  backdrop-filter: blur(8px) saturate(1.05);
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center; /* center inner content horizontally */
  gap: 1.25rem;
  margin-inline: auto;
}

/* shimmer edge */
.aw-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--card-radius) + 2px);
  z-index: -1;
  background: linear-gradient(120deg, rgba(230,194,122,0.15), rgba(193,138,110,0.35), rgba(230,194,122,0.15));
  background-size: 300% 300%;
  animation: aw-shimmerEdge 10s ease-in-out infinite alternate;
}
@keyframes aw-shimmerEdge {
  0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; }
}

/* subtle bottom lift / stroke to match home */
.aw-card::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -18px;
  height: 28px;
  background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.55));
  filter: blur(18px);
  opacity: .7;
  z-index: -2;
  border-radius: 1rem;
}

/* ===== Decorative floating orbs (soft visual) =====
   three orbs as pseudo elements to the card container (non-interactive)
*/
.aw-orbs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.aw-orb {
  position: absolute;
  filter: blur(18px) saturate(.95);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform, opacity;
  animation: aw-orbFloat 9s ease-in-out infinite;
}
.aw-orb.orb-1 { width: 220px; height: 220px; left: -6%; top: 6%; background: radial-gradient(circle, rgba(230,194,122,0.12), transparent 45%); animation-duration: 14s; }
.aw-orb.orb-2 { width: 160px; height: 160px; right: -6%; top: 14%; background: radial-gradient(circle, rgba(193,138,110,0.10), transparent 45%); animation-duration: 11s; animation-delay: .6s; }
.aw-orb.orb-3 { width: 280px; height: 280px; left: 50%; bottom: -10%; background: radial-gradient(circle, rgba(230,194,122,0.08), transparent 40%); transform: translateX(-50%); animation-duration: 18s; animation-delay: .9s; }
@keyframes aw-orbFloat {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: .55; }
  50% { transform: translateY(-14px) translateX(6px) scale(1.02); opacity: .65; }
  100% { transform: translateY(0) translateX(0) scale(1); opacity: .55; }
}

/* ===== Title & hero area (centered) ===== */
.aw-header {
  width: 100%;
  text-align: center;
  margin-bottom: .25rem;
}
.aw-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  margin: 0;
  background: linear-gradient(90deg, var(--gold), var(--rose), #FFDFAF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding: .15rem .35rem;
}
.aw-sub {
  display:block;
  color: rgba(255,240,225,0.9);
  margin-top:.45rem;
  font-size: 1rem;
  opacity: .95;
}

/* hero image (centered) */
.aw-hero-media {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: .6rem;
}
.aw-magic-photo {
  width: clamp(180px, 36vw, 420px);
  border-radius: .9rem;
  border: 1px solid rgba(248,213,126,0.12);
  box-shadow: 0 18px 40px rgba(20,10,8,0.55);
  display: block;
  height: auto;
  object-fit: contain;
}

/* parallax overlay sits on top of hero image */
.aw-hero-parallax { position: absolute; inset:0; border-radius: .9rem; pointer-events:none; }

/* ===== Content wrapper: keep text centered but constrained for readability ===== */
.aw-content {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  text-align: center; /* center headings & body */
  padding: .6rem 0 1rem;
}

/* mission heading & copy */
.aw-heading {
  font-family: 'Playfair Display', serif;
  color: var(--cream);
  font-size: 1.15rem;
  margin-top: 1rem;
  margin-bottom: .6rem;
}
.aw-lead {
  color: rgba(255,240,225,0.92);
  line-height: 1.65;
  margin: 0 auto;
  font-size: 0.98rem;
}

/* values as centered stacked cards */
.aw-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: var(--gutter);
  margin-top: 1rem;
  align-items: start;
}
.aw-value {
  background: rgba(255,248,236,0.03);
  border: 1px solid rgba(248,213,126,0.08);
  padding: .9rem;
  border-radius: .8rem;
  text-align: center;
  min-height: 90px;
}
.aw-value-title { color: var(--gold); font-weight: 600; margin-bottom:.35rem; }

/* story section: keep centered single column for clarity */
.aw-story-grid {
  display: block;
  margin-top: 1.2rem;
  text-align: center;
}
.aw-story-visual { margin: 1rem auto 0; max-width: 380px; }
.aw-story-visual img { width:100%; border-radius:.8rem; box-shadow: 0 12px 28px rgba(20,10,8,0.5); }

/* timeline compact and centered */
.aw-timeline { list-style: none; padding: 0; margin-top:.8rem; color: rgba(255,240,225,0.9); text-align:left; display:inline-block; }
.aw-timeline li { padding:.35rem 0; border-left: 2px solid rgba(193,138,110,0.06); margin-left:.6rem; padding-left:.8rem; }

/* stats (centered) */
.aw-stats { margin-top:.9rem; display:flex; gap:1.2rem; justify-content:center; flex-wrap:wrap; }
.aw-stat { font-weight:700; color:var(--cream); }

/* team grid: center items and make portrait tiles balanced */
.aw-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
}
.aw-team-member {
  background: rgba(255,248,236,0.02);
  border: 1px solid rgba(248,213,126,0.06);
  padding: 1rem;
  border-radius: .8rem;
  text-align: center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.5rem;
}
.aw-team-member img { width:100%; height:160px; object-fit:cover; border-radius:.6rem; }

/* accordion toggle */
.aw-member-toggle {
  background: none;
  border: 1px solid rgba(230,194,122,0.08);
  padding: .45rem .7rem;
  border-radius: .6rem;
  cursor: pointer;
  color: var(--cream);
}

/* CTA centered */
.aw-cta { margin-top: 1.2rem; text-align:center; width:100%; }
.aw-glow-btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  color: #fffaf3;
  border-radius: .9rem;
  padding: .95rem 1.6rem;
  text-decoration: none;
  font-weight: 600;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 0 12px rgba(248,213,126,0.25);
}
.aw-glow-btn:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(230,194,122,0.45); }

/* small note */
.aw-note { margin-top:.4rem; font-size:.9rem; color: rgba(255,248,236,0.78); }

/* in-view reveal helpers */
.aw-inview { transform: translateY(0); opacity: 1; transition: transform 700ms cubic-bezier(.2,.9,.2,1), opacity 700ms ease; }
.aw-value, .aw-team-member, .aw-story-text, .aw-story-visual { transform: translateY(12px); opacity: 0; }

/* accessibility: focus outlines */
.aw-member-toggle:focus, .aw-glow-btn:focus {
  outline: 3px solid rgba(230,194,122,0.22);
  outline-offset: 3px;
  border-radius: .65rem;
}

/* ===== Small screens: tighten spacing and keep things centered ===== */
@media (max-width: 900px) {
  .aw-root { align-items: flex-start; padding-top: calc(var(--header-height) + 1rem); }
  .aw-card { margin: 3rem auto; padding: 1.1rem; width: 96%; }
  .aw-title { font-size: 1.8rem; }
  .aw-magic-photo { width: min(58vw, 360px); height: auto; object-fit: contain; }
  .aw-team-grid { grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); }
  .aw-orb { display: none; } /* hide heavy visuals on small screens for perf */
}

/* ===== Larger screens: center card with larger margins ===== */
@media (min-width: 1200px) {
  .aw-card { margin: 8rem auto; padding: clamp(2rem, 3.2vw, 3rem); width: 70%; max-width: 1100px; }
  .aw-header { margin-bottom: .75rem; }
  .aw-title { font-size: 3.4rem; }
}

/* ===== Utility: visually-hidden for SR only content if needed ===== */
.aw-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ===========================================================
   IMAGE STRETCH FIXES (ADDED) — strong, specific overrides
   Ensures hero & atelier & team images are NOT stretched horizontally,
   and keeps full image visible (no unwanted cropping).
   =========================================================== */

/* Generic safe image reset for content images inside cards */
.aw-card img,
.aw-card picture img,
.aw-magic-photo,
.aw-atelier-photo,
.aw-team-member img,
.aw-story-visual img {
  display: block;
  max-width: 100%;
  width: auto !important;    /* do not force width to 100% of container */
  height: auto !important;   /* preserve aspect ratio */
  object-fit: contain !important; /* show whole image, no cropping */
}

/* If a wrapper (visual frame) is used, let the wrapper control width and keep image contained */
.aw-hero-media,
.aw-story-visual,
.hero-photo {
  width: clamp(180px, 36vw, 520px); /* responsive, caps max desktop size */
  max-width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* Ensure hero image fills wrapper width but preserves original aspect */
.aw-hero-media img,
.aw-story-visual img,
.aw-magic-photo,
.aw-atelier-photo {
  width: 100%;
  height: auto;
  object-fit: contain !important; /* visible fully, no crop */
  display: block;
}

/* Team tiles: make thumbnail fully visible (no stretch). If you prefer cropping, set object-fit:cover */
.aw-team-member img {
  width: 100%;
  height: auto;           /* show full image, no forced crop */
  object-fit: contain !important;
  border-radius: .6rem;
}

/* Desktop cap: prevent hero image from growing too large on very wide screens */
@media (min-width: 1000px) {
  .aw-hero-media,
  .aw-story-visual,
  .hero-photo {
    width: min(520px, 42vw);
    max-width: 520px;
  }
}

/* Mobile: shrink nicely and keep full image visible */
@media (max-width: 520px) {
  .aw-hero-media,
  .aw-story-visual,
  .hero-photo {
    width: min(92%, 360px);
    height: auto;
  }
  .aw-hero-media img,
  .aw-story-visual img {
    object-fit: contain !important;
  }
}

/* Specific high-specificity safety net: neutralize inline height/width forcing if present */
.aw-card img[width][height],
.aw-card img[src],
.aw-hero-media img[src],
.aw-story-visual img[src] {
  height: auto !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
}
