/* =========================
   RYDELL SERVICE SLIDER
   Full CSS (brand colors)
   ========================= */

:root{
  /* RYDELL PRIMARY PALETTE */
  --rydell-red: #F05151;
  --rydell-black: #24343A;
  --rydell-dark-red: #B12726;
  --rydell-light-red: #F26D6F;
  --rydell-lightest-red: #FCD5CC;
  --rydell-gray: #D6CECE;
  --rydell-white: #F1F1F1;

  /* IMAGE EDGE PALETTE (for background blending) */
  --edge-light: #C9B9C7;
  --edge-mid-1: #BDACB9;
  --edge-mid-2: #C2B1BE;
  --edge-dark: #B4A3B2;

  /* App theme mapping */
  --bg: var(--edge-light);
  --text: var(--rydell-black);
  --muted: rgba(36,52,58,.75);

  /* Slider + UI */
  --trackDark: rgba(36,52,58,.80);
  --trackLite: rgba(214,206,206,.90);
  --roadAsphalt: rgba(36,52,58,.75);
  --roadCenterLine: rgba(255,255,255,.85);

  --cardShadow: 0 18px 40px rgba(0,0,0,.12);
  --maxw: 880px;

  /* Radii */
  --radius: 4px;
}

*{ box-sizing:border-box; }

html, body { height: 100%; }

html{
  background-color: #cbb8c7;
  background-image:
    radial-gradient(620px 420px at 44% 42%,
      rgba(255,250,255,.98) 0%,
      rgba(255,250,255,.72) 22%,
      rgba(255,250,255,0) 62%),
    radial-gradient(1050px 720px at 44% 44%,
      rgba(245,236,243,.70) 0%,
      rgba(245,236,243,.28) 40%,
      rgba(245,236,243,0) 78%),
    radial-gradient(1600px 1050px at 50% 60%,
      rgba(216,201,213,.55) 0%,
      rgba(216,201,213,0) 76%),
    radial-gradient(1400px 900px at 50% -12%,
      rgba(155,143,154,.75) 0%,
      rgba(155,143,154,0) 74%),
    linear-gradient(to bottom left,
      rgba(155,143,154,.38) 0%,
      rgba(203,184,199,1) 55%,
      rgba(245,236,243,.88) 100%);
  background-repeat: no-repeat;
  background-size: cover;
}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: transparent;
  color: var(--text);
}

/* =========================
   Layout
   ========================= */
.wrap{
  min-height: 100svh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 8px 8px 12px;
}

.panel{
  width: min(var(--maxw), 100%);
  text-align:center;
  overflow: visible;
}

.headline{
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0;
  font-size: clamp(14px, 2vw, 40px);
  color: var(--text);
  line-height: 1.12;
  text-align: center;
}

.headlineLogo {
  height: 1.2em;
  vertical-align: -0.25em;
  margin-left: 0px;
}

.headlineNav{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  padding: 0;
  border: none;
  background: rgba(240, 81, 81, 0.10);
  color: var(--rydell-red);
  cursor: pointer;
  font-size: clamp(22px, 3.5vw, 32px);
  opacity: 1;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(240,81,81,.18);
}

.headlineNav:hover{
  background: rgba(240, 81, 81, 0.18);
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(240,81,81,.28);
}

.headlineNav:active{
  transform: scale(0.95);
}

.headlineNav:focus-visible{
  outline: 2px solid var(--rydell-red);
  outline-offset: 3px;
}

/* =========================
   3-card carousel
   ========================= */
.carousel{
  position: relative;
  width: 100%;
  max-width: 100%;
  /* Strong negative margins = headline + service copy sit much closer to PNG vertically */
  margin: -40px 0 -44px;
  padding: 0;
  box-sizing: border-box;
  overflow: visible; /* show full side PNGs */
}

.carouselTrack{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-width: 0;
}

.card{
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  will-change: transform, opacity, filter;
}

/* % is of .carouselTrack width — flex-basis locks main size so the center actually grows */
.card-center{
  flex: 0 0 135%;
  width: 135%;
  max-width: none;
  border-radius: 3px;
  aspect-ratio: 27 / 17;
  opacity: 1;
  filter: blur(0);
  z-index: 2;
  position: relative;
  cursor: pointer;
}

/* Peek slots — large % + scale > 1 so side PNGs read much bigger */
.card-prev,
.card-next{
  flex: 0 0 48%;
  width: 48%;
  aspect-ratio: 27 / 17;
  transform: scale(1.06);
  opacity: 0.5;
  filter: blur(1.5px);
  z-index: 1;
  position: relative;
  cursor: pointer;
}

.card-prev:hover,
.card-next:hover{
  opacity: 0.7;
}

/* Same size as above — negative margin pulls peek cards toward center (no width/scale change) */
.card-prev{
  margin-right: clamp(-102px, -5vw, -32px);
}
.card-next{
  margin-left: clamp(-102px, -5vw, -32px);
}

.cardImg{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================
   Service headline + description + nav arrows
   ========================= */
.serviceRow{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(4px, 1.5vw, 10px);
  width: 100%;
  margin: -6px 0 4px;
}

.serviceCopy{
  min-width: 0;
  text-align: center;
}

.label{
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0 0 2px;
  font-size: clamp(22px, 6vw, 42px);
  line-height: 1;
  color: var(--text);
}

.serviceCopy .desc{
  margin-left: auto;
  margin-right: auto;
}

.desc{
  margin: 0 auto 0;
  max-width: 380px;
  font-size: clamp(14px, 1.55vw, 18px);
  line-height: 1.35;
  color: var(--muted);
}

/* =========================
   Optional: subtle Rydell accent underline under headline
   ========================= */
.headline::after{
  content:"";
  display:block;
  width: 84px;
  height: 2px;
  margin: 0 auto -10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rydell-red), var(--rydell-light-red));
  opacity: .9;
}

/* =========================
   Swipe hint (mobile only)
   ========================= */
.swipeHint{
  display: none;
}

/* =========================
   Mobile tweaks
   ========================= */
@media (max-width: 640px){
  .wrap{ padding: 8px 8px 12px; }

  /* Midway between default (clamp 14px / 2vw / 40px) and larger 2-line mobile headline */
  .headline{
    font-size: clamp(18px, 4.9vw, 37px);
    line-height: 1.12;
    margin: 0 auto 0;
    padding: 0 6px;
    max-width: min(24rem, calc(100% - 12px));
  }

  /* Clip side cards on mobile — swipe replaces peek navigation */
  /* Bleed into wrap horizontal padding so the PNG is wider (near full viewport) */
  .carousel{
    margin-top: -28px;
    margin-bottom: -36px;
    overflow: hidden;
    margin-left: -8px;
    margin-right: -8px;
    width: calc(100% + 16px);
    max-width: none;
    padding: 0;
  }

  .card-prev,
  .card-next{
    display: none;
  }

  .card-center{
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }

  /* Hide buttons — replaced by swipe on mobile */
  .headlineNav{ display: none; }

  /* Collapse the button columns in the service row */
  .serviceRow{
    grid-template-columns: minmax(0, 1fr);
    margin-top: -22px;
  }
  .serviceRow .headlineNav{ display: none; }

  /* Swipe hint */
  .swipeHint{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: .5px;
    opacity: 1;
    transition: opacity 0.6s ease;
  }

  .swipeHint i{
    font-size: 11px;
    animation: swipeNudge 1.8s ease-in-out infinite;
  }

  .swipeHint i:first-child{
    animation-direction: reverse;
  }

  .swipeHint.hidden{
    opacity: 0;
    pointer-events: none;
  }

  @keyframes swipeNudge{
    0%, 100% { transform: translateX(0); }
    50%       { transform: translateX(4px); }
  }
}
