/* ============================================================
   AAGU — Design tokens + base styles
   ============================================================ */

/* ---------- Corporate S Pro (CD-mandated typeface, local OTF) ---------- */
@font-face { font-family: "Corporate S Pro"; font-weight: 300; font-style: normal; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro_Light.otf") format("opentype"); }
@font-face { font-family: "Corporate S Pro"; font-weight: 300; font-style: italic; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro_Light_Italic.otf") format("opentype"); }
@font-face { font-family: "Corporate S Pro"; font-weight: 400; font-style: normal; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro.otf") format("opentype"); }
@font-face { font-family: "Corporate S Pro"; font-weight: 400; font-style: italic; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro_Regular_Italic.otf") format("opentype"); }
@font-face { font-family: "Corporate S Pro"; font-weight: 500; font-style: normal; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro_Medium.otf") format("opentype"); }
@font-face { font-family: "Corporate S Pro"; font-weight: 500; font-style: italic; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro_Medium_Italic.otf") format("opentype"); }
@font-face { font-family: "Corporate S Pro"; font-weight: 600; font-style: normal; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro_Demi.otf") format("opentype"); }
@font-face { font-family: "Corporate S Pro"; font-weight: 600; font-style: italic; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro_Demi_Italic.otf") format("opentype"); }
@font-face { font-family: "Corporate S Pro"; font-weight: 700; font-style: normal; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro_Bold.otf") format("opentype"); }
@font-face { font-family: "Corporate S Pro"; font-weight: 700; font-style: italic; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro_Bold_Italic.otf") format("opentype"); }
@font-face { font-family: "Corporate S Pro"; font-weight: 800; font-style: normal; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro_ExtraBold.otf") format("opentype"); }
@font-face { font-family: "Corporate S Pro"; font-weight: 800; font-style: italic; font-display: swap; src: url("uploads/Corporate_S_Pro/Corporate_S_Pro_ExtraBold_Italic.otf") format("opentype"); }

/* Hide BLOCK meta strips when toggled off via Tweaks panel */
body[data-meta-visible="0"] .block-meta { display: none !important; }

/* Focus mode — hide sections that don't match. data-focus="all" shows everything. */
body[data-focus="foundation"] [data-dc-section]:not([data-dc-section="foundation"]) { display: none !important; }
body[data-focus="chrome"] [data-dc-section]:not([data-dc-section="chrome"]) { display: none !important; }
body[data-focus="widgets"] [data-dc-section]:not([data-dc-section="widgets"]) { display: none !important; }
/* All block sections share the `blocks-*` prefix */
body[data-focus="blocks"] [data-dc-section]:not([data-dc-section^="blocks-"]) { display: none !important; }
body[data-focus="pages"] [data-dc-section]:not([data-dc-section="pages"]) { display: none !important; }

:root {
  /* Brand — from AAGU CD Lookbook Mai 2024 */
  --brand-orange: #F18E00;       /* Logo Orange: RGB 241/142/0 · Pantone 021 · CMYK 0/50/100/0 */
  --brand-orange-dark: #C57400;
  --brand-orange-soft: #FFA033;
  --brand-orange-tint: #FFF1DE;
  --brand-orange-cream: #FBEED9;
  --brand-orange-signature: #FF5D29; /* RGB 255/93/41 — accent used in email-signature names */

  /* Bus line colors — official CD palette */
  --line-401: #E3000F; /* Flüelen – Göschenen — rot */
  --line-402: #00427D; /* Attinghausen – Bürglen — dunkelblau */
  --line-403: #7BB028; /* Seedorf – Bürglen — hellgrün */
  --line-405: #650243; /* Schattdorf – Isenthal — dunkellila */
  --line-407: #5B2483; /* Amsteg – Bristen — violett */
  --line-408: #4CC2F1; /* Attinghausen – Linthal — hellblau */
  --line-411: #6BBB81; /* Göschenen – Göscheneralp — Meeresgrün */
  --line-412: #E89600; /* Altdorf – Amsteg — orange */
  --line-413: #A61380; /* Flüelen – Altdorf — magenta */
  --line-493: #000000; /* Altdorf – Luzern — schwarz */
  --line-postauto: #FFDF00; /* PostAuto — gelb */

  /* Neutrals — Tailwind gray scale */
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1F2937;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50:  #F9FAFB;
  --line:   #E5E7EB;   /* gray-200 */
  --line-2: #F3F4F6;   /* gray-100 */
  --surface: #FFFFFF;
  --bg: #FFFFFF;
  --bg-warm: #F9FAFB;  /* gray-50 */

  /* Semantic — Tailwind */
  --success: #16A34A;  /* green-600 */
  --info:    #2563EB;  /* blue-600 */
  --warning: #D97706;  /* amber-600 */
  --danger:  #DC2626;  /* red-600 */

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 22, 35, 0.06), 0 1px 1px rgba(15, 22, 35, 0.04);
  --shadow-md: 0 6px 16px rgba(15, 22, 35, 0.08), 0 2px 4px rgba(15, 22, 35, 0.04);
  --shadow-lg: 0 18px 40px rgba(15, 22, 35, 0.12), 0 4px 12px rgba(15, 22, 35, 0.06);
  --shadow-card: 0 2px 6px rgba(15, 22, 35, 0.05);

  /* Type — Corporate S Pro (CD-mandated), loaded locally above */
  --font-display: "Corporate S Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body: "Corporate S Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  /* CD weight roles */
  --fw-title: 700;    /* Title — Bold */
  --fw-heading: 500;  /* Heading — Medium */
  --fw-text: 400;     /* Text — Regular */
}

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }

/* Container that holds the rendered page mockups inside artboards.
   Everything inside .page-frame uses these defaults — keeps DC chrome unaffected. */
.page-frame {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  height: 100%;
}

/* When MobileBlock-wrapped blocks are stacked inside an assembled page,
   the inner .page-frame must not inherit 100% height (which would stretch
   each block to fill the viewport and create huge gaps between them). */
.page-frame .page-frame { height: auto; }
/* Small breathing room between stacked MobileBlocks in assembled pages */
.page-frame + .page-frame { margin-top: 2rem; }
/* Section header sits flush with the preceding block (typically a hero) */
.page-frame + .page-frame[data-mblock="section header"] { margin-top: 0; }

.page-frame * { box-sizing: border-box; }
.page-frame p { margin: 0; font-weight: var(--fw-text); }
.page-frame h1, .page-frame h2, .page-frame h3, .page-frame h4 { margin: 0; font-family: var(--font-display); letter-spacing: -0.01em; }
/* CD weight roles — enforce regardless of inline weight choices in components */
.page-frame h1 { font-weight: var(--fw-title) !important; }
.page-frame h2, .page-frame h3, .page-frame h4 { font-weight: var(--fw-heading) !important; }
.page-frame blockquote { font-weight: var(--fw-heading); }
.page-frame button { font: inherit; cursor: pointer; }

/* ---------- Common atoms ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  border: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--brand-orange); color: white; }
.btn-primary:hover { background: var(--brand-orange-dark); }
.btn-ghost { background: transparent; color: var(--gray-900); border: 1.5px solid var(--gray-900); }
.btn-ghost:hover { background: var(--gray-900); color: white; }
.btn-ghost-light { background: rgba(255,255,255,0.12); color: white; border: 1.5px solid rgba(255,255,255,0.45); backdrop-filter: blur(8px); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.22); }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.btn-lg { padding: 18px 28px; font-size: 17px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-orange-dark);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
}
.link-arrow svg { transition: transform .15s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* Section labels */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-orange-dark);
}

/* Block frame — used inside design canvas to wrap any block with its metadata strip */
.block-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: #F1ECDB;
  border-bottom: 1px dashed rgba(60, 50, 40, 0.25);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  color: #5a4a2a;
  letter-spacing: 0.04em;
}
.block-meta .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #fef4a8;
  border-radius: 4px;
  font-weight: 600;
  color: #5a4a2a;
}
.block-meta .meta-name { font-weight: 700; }

/* ---------- IMAGE PLACEHOLDER ----------
   Every "bg-*" class previously rendered a colourful CSS-painted scene.
   They're now unified into a single neutral photo-placeholder treatment:
   light gray surface · diagonal hatch · centered camera icon · [IMAGE] label.
   Real photos drop in by replacing the .bg-* class with a background-image. */

.img-ph,
.bg-alps, .bg-mountain-sunset, .bg-mountain-day,
.bg-bus-night, .bg-ski, .bg-lake {
  background:
    /* subtle diagonal hatch */
    repeating-linear-gradient(45deg,
      rgba(15, 22, 35, 0.035) 0 1px,
      transparent 1px 14px),
    /* base */
    linear-gradient(135deg, #E3E6EC 0%, #C9CED7 100%);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Centered camera glyph + small "IMAGE" label */
.img-ph::before,
.bg-alps::before, .bg-mountain-sunset::before, .bg-mountain-day::before,
.bg-bus-night::before, .bg-ski::before, .bg-lake::before {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 56px 56px;
  /* camera icon, stroke #4B5468 */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237B8497' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M3 8a2 2 0 0 1 2-2h2.2l1.6-2h6.4l1.6 2H19a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z'/><circle cx='12' cy='13' r='4'/></svg>");
  opacity: 0.65;
  z-index: 0;
}
.img-ph::after,
.bg-alps::after, .bg-mountain-sunset::after, .bg-mountain-day::after,
.bg-bus-night::after, .bg-ski::after, .bg-lake::after {
  content: "IMAGE";
  position: absolute;
  left: 50%;
  top: calc(50% + 36px);
  transform: translateX(-50%);
  font: 600 10px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.18em;
  color: #5B6678;
  background: rgba(255, 255, 255, 0.55);
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 0;
  pointer-events: none;
}

.img-ph .img-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font: 11px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: rgba(15, 22, 35, 0.6);
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 1;
}

/* All previously-colored bg-* fills are unified above into a single
   image-placeholder treatment. Keep this section empty so any future
   variant override slots in here. */

/* ---------- REAL PHOTO HEROES ----------
   Actual AAGU photography used in assembled-page heroes. These override the
   placeholder treatment: real background image, cover-fit, no camera glyph. */
.bg-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.bg-photo::before, .bg-photo::after { content: none !important; }
.bg-photo-sunset      { background-image: url("images/hero-sunset.jpg");      background-position: center 42%; }
.bg-photo-klausenpass { background-image: url("images/hero-klausenpass.jpg"); background-position: center 48%; }
.bg-photo-winter      { background-image: url("images/hero-winter.jpg");      background-position: center 55%; }
.bg-photo-skifamily   { background-image: url("images/bus-skifamily.jpg");    background-position: center 30%; }

/* Logo lockup — official AAGU SVG (header) + inverted variant (footer) */
.logo { display: inline-flex; align-items: center; }
.logo img { display: block; width: auto; }
.logo--invert img { filter: brightness(0) invert(1); }

/* ---------- Block container ---------- */
.block {
  background: var(--surface);
}
.block-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 80px 56px;
}
.block-inner-tight {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 56px;
}

/* Scrollable column inside an artboard, so blocks above their natural height get a peek */
.artboard-scroll {
  height: 100%;
  overflow: hidden;
}

/* ============================================================
   Homepage scroll rail — public-transit style scroll tracker
   ============================================================ */
.scroll-rail {
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  /* Sits BELOW the hero so the rail is tucked behind it and only emerges
     from the hero's bottom edge as the page scrolls. Still paints above
     the regular (static-flow) content blocks further down the page. */
  z-index: 5;
  font-family: var(--font-display);
  pointer-events: none;
}

/* Hero module covers the top of the rail: opaque + higher z-index than the
   rail, so at the top of the page the rail is hidden and "pops out" the
   bottom of the hero once the user scrolls down. */
.page-frame.with-rail > [data-station-id="start"] {
  position: relative;
  z-index: 6;
  background: var(--bg);
}

/* Indent homepage content so the rail sits in a clear left gutter */
.page-frame.with-rail .block-inner,
.page-frame.with-rail .block-inner-tight {
  padding-left: 112px;
}

/* vertical line — faded base + travelled fill */
.scroll-rail__track,
.scroll-rail__fill {
  position: absolute;
  left: 44px;
  width: 5px;
  border-radius: 5px;
  transform: translateX(-50%);
}
.scroll-rail__track { background: rgba(123, 132, 151, 0.30); }
.scroll-rail__fill {
  background: var(--brand-orange);
  box-shadow: 0 0 10px rgba(241, 142, 0, 0.40);
  transition: height 0.14s linear;
}

/* static station dots */
.scroll-rail__stop {
  position: absolute;
  left: 44px;
  width: 15px;
  height: 15px;
  margin: -7.5px 0 0 -7.5px;
  padding: 0;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid rgba(123, 132, 151, 0.55);
  box-shadow: 0 1px 3px rgba(15, 22, 35, 0.12);
  pointer-events: auto;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.2s ease;
}
.scroll-rail__stop:hover { transform: scale(1.3); }
.scroll-rail__stop.is-passed {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
}

/* the vehicle — a glowing dot with a white core */
.scroll-rail__veh {
  position: absolute;
  left: 44px;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92), 0 4px 14px rgba(241, 142, 0, 0.55);
  transition: top 0.14s linear;
  z-index: 3;
}
.scroll-rail__veh::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
}

/* arrival pulse ring */
.scroll-rail__pulse {
  position: absolute;
  left: 44px;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2.5px solid var(--brand-orange);
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-rail__pulse.is-arriving { animation: railPulse 0.9s ease-out forwards; }
}
@keyframes railPulse {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0;   transform: scale(2.7); }
}

/* Hide the rail + gutter indent on narrow viewports */
@media (max-width: 720px) {
  .scroll-rail { display: none; }
  .page-frame.with-rail .block-inner,
  .page-frame.with-rail .block-inner-tight { padding-left: 56px; }
}

/* ---------- Metro form (iterations) — real interactive inputs ---------- */
.mf-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--gray-900);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mf-input::placeholder { color: var(--gray-500); }
.mf-input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(241, 142, 0, 0.16);
}
textarea.mf-input { resize: vertical; min-height: 104px; line-height: 1.5; }
select.mf-input {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%237B8497' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.mf-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
}
.mf-checkbox {
  width: 20px; height: 20px; border-radius: 5px;
  border: 1.5px solid var(--gray-400);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer; background: #fff;
  transition: background .15s ease, border-color .15s ease;
}
.mf-checkbox.is-on { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
