/*
 * style.css — Portland Kinderschule
 *
 * COLOR SYSTEM (DaisyUI-inspired semantic tokens)
 * ─────────────────────────────────────────────────────────────
 * To retheme the site, update the values in :root below.
 * Every color in the site derives from these tokens.
 *
 *  --color-primary          Action color (CTA buttons)
 *  --color-primary-content  Text on primary-colored surfaces
 *  --color-accent           Brand accent (red — banners, eyebrows, logo)
 *  --color-accent-content   Text on accent-colored surfaces
 *  --color-secondary        Supporting color (soft blue)
 *  --color-secondary-content Text on secondary surfaces
 *  --color-neutral          Dark surfaces (footer, dark sections)
 *  --color-neutral-content  Text on neutral surfaces
 *  --color-base-100         Page background (cream)
 *  --color-base-200         Alternate section background (slightly darker)
 *  --color-base-300         Borders and dividers
 *  --color-base-content     Default body text
 *  --color-muted            Subdued/secondary text
 */

/* ── TOKENS ──────────────────────────────────────────────────── */
:root {
  --color-primary:           #F5C43A;
  --color-primary-content:   #1C1A18;
  --color-accent:            #E8142A;
  --color-accent-content:    #ffffff;
  --color-secondary:         #6A90C4;
  --color-secondary-content: #ffffff;
  --color-neutral:           #1A0408;
  --color-neutral-content:   #ffffff;
  --color-base-100:          #FAF8F3;
  --color-base-200:          #F0EDE5;
  --color-base-300:          #E0DDD5;
  --color-base-content:      #1C1A18;
  --color-muted:             #6A6460;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing scale */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  48px;
  --space-xl:  80px;

  /* Layout */
  --max-width:    1100px;
  --nav-height:   66px;
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --radius-pill:  999px;
  --radius-arch:  50% 50% 0 0;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-base-content);
  background: var(--color-base-100);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; }

ul { list-style: none; }

/* ── LAYOUT HELPERS ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-lg);
}

.section--alt {
  background: var(--color-base-200);
}

.section--dark {
  background: var(--color-neutral);
  color: var(--color-neutral-content);
  border-top: 4px solid var(--color-accent);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
}

h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }

h1 em, h2 em { font-style: italic; color: var(--color-muted); }

.lead {
  font-size: 16px;
  color: var(--color-muted);
  line-height: 1.7;
  max-width: 60ch;
}

.text-muted { color: var(--color-muted); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  padding: 13px 26px;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.btn:hover  { filter: brightness(0.92); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-primary-content);
  box-shadow: 0 3px 12px rgba(245, 196, 58, 0.35);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-accent-content);
}

.btn-ghost {
  background: transparent;
  color: var(--color-muted);
  padding-inline: 0;
  text-decoration: underline;
  font-size: 14px;
  font-weight: 500;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary-content);
  border: 2px solid var(--color-primary);
}

/* ── BANNER ──────────────────────────────────────────────────── */
.banner {
  background: var(--color-accent);
  color: var(--color-accent-content);
  text-align: center;
  padding: 9px var(--space-md);
  font-size: 13.5px;
  font-weight: 500;
}

.banner a {
  color: var(--color-primary);
  font-weight: 700;
  margin-left: var(--space-xs);
  text-decoration: underline;
}

/* ── NAV ─────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--color-base-100);
  border-bottom: 1px solid var(--color-base-300);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.nav__logo-mark {
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.nav__logo-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.2;
}

.nav__logo-text small {
  font-size: 10.5px;
  color: var(--color-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__links a {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-base-content);
  white-space: nowrap;
}

.nav__links a:hover { color: var(--color-muted); }

.nav__links a.nav-camp  { color: var(--color-accent); font-weight: 600; }
.nav__links a.nav-cta   { /* uses .btn .btn-primary */ }

/* Mobile hamburger — hidden on desktop */
.nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--color-base-content);
  padding: var(--space-xs);
}

/* Mobile nav drawer */
@media (max-width: 767px) {
  .nav__hamburger { display: block; }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--color-base-100);
    border-bottom: 1px solid var(--color-base-300);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: var(--space-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .nav__links.is-open { display: flex; }

  .nav__links a {
    padding: 12px var(--space-md);
    font-size: 16px;
  }

  .nav__links a.nav-cta {
    margin: var(--space-sm) var(--space-md);
    text-align: center;
    border-radius: var(--radius-pill);
    padding: 12px var(--space-md);
  }
}

/* ── HERO ─────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  padding-block: var(--space-lg);
  align-items: center;
  min-height: 440px;
}

.hero__left {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hero__sub {
  font-size: 15.5px;
  color: var(--color-muted);
  line-height: 1.7;
  max-width: 420px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-xs);
}

/* Hero photo collage */
.hero__photos {
  position: relative;
  min-height: 380px;
}

.hero__photo {
  position: absolute;
  border-radius: var(--radius-arch);
  overflow: hidden;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__photo--main {
  width: 195px; height: 245px;
  top: 10px; left: 20px;
  transform: rotate(-4deg);
}

.hero__photo--side {
  width: 165px; height: 210px;
  top: 4px; right: 20px;
  border-radius: var(--radius-md);
  transform: rotate(5deg);
}

.hero__photo--bottom {
  width: 190px; height: 150px;
  bottom: 0; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
}

/* Decorative geometric shapes */
.shape {
  position: absolute;
  pointer-events: none;
}

.shape--dot   { border-radius: 50%; }
.shape--sq    { border-radius: 3px; }

@media (max-width: 767px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .hero__photos { min-height: 280px; }

  .hero__photo--main  { width: 145px; height: 185px; left: 10px; }
  .hero__photo--side  { width: 125px; height: 160px; right: 10px; }
  .hero__photo--bottom { width: 150px; height: 120px; }
}

/* ── FILTER CARDS ────────────────────────────────────────────── */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 900px) {
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .filter-grid { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.card h3 {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.card p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.55;
}

/* ── CAMP CARDS ──────────────────────────────────────────────── */
.camps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 900px) {
  .camps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .camps-grid { grid-template-columns: 1fr; }
}

.camp-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  border-top: 4px solid var(--color-primary);
}

.camp-card__theme {
  font-size: 13px;
  color: var(--color-muted);
}

.camp-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
}

.camp-card__dates {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
}

.camp-card__blurb {
  font-size: 13.5px;
  color: var(--color-muted);
  line-height: 1.55;
  flex-grow: 1;
}

.camp-card__spots {
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-top: var(--space-xs);
}

.camp-card__spots--available { background: #EDF7ED; color: #2E7D32; }
.camp-card__spots--low       { background: #FFF3E0; color: #E65100; }
.camp-card__spots--full      { background: #FDECEA; color: #C62828; }

/* ── TUITION TABLE ───────────────────────────────────────────── */
.tuition-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.tuition-table th,
.tuition-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-base-300);
}

.tuition-table th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 600;
}

.tuition-table td:last-child { font-weight: 600; }

/* ── TWO-COLUMN CONTENT ──────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.two-col--text-first .two-col__text { order: 0; }
.two-col--text-first .two-col__media { order: 1; }

@media (max-width: 767px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.two-col__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.two-col__text p {
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.75;
}

.two-col__text a {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-base-content);
  text-decoration: underline;
}

/* ── MEDIA (arch photo + circle overlay) ─────────────────────── */
.media-arch {
  position: relative;
}

.media-arch__main {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-arch);
  overflow: hidden;
  background: var(--color-base-200);
}

.media-arch__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-arch__circle {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-base-100);
  background: var(--color-base-200);
}

.media-arch__circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-arch__dot-lg {
  position: absolute;
  top: -12px; left: -12px;
  width: 30px; height: 30px;
  background: var(--color-primary);
  border-radius: 50%;
}

.media-arch__dot-sm {
  position: absolute;
  top: 16px; left: -24px;
  width: 16px; height: 16px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* ── VIDEO ───────────────────────────────────────────────────── */
.video-wrap {
  max-width: 780px;
  margin-inline: auto;
  margin-top: var(--space-lg);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── GALLERY ─────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

.gallery-grid__item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--color-base-200);
}

.gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-grid__item:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: unset;
  border-radius: var(--radius-arch);
}

@media (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid__item:first-child {
    grid-column: span 2;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
  }
}

/* ── CTA DARK ────────────────────────────────────────────────── */
.cta-dark {
  text-align: center;
}

.cta-dark h2 { color: var(--color-neutral-content); margin-bottom: var(--space-sm); }
.cta-dark p  { color: rgba(255,255,255,0.55); margin-bottom: var(--space-md); }
.cta-dark .eyebrow { color: var(--color-accent); }

/* ── CONTACT FORM ────────────────────────────────────────────── */
.contact-form {
  max-width: 560px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13.5px;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px var(--space-sm);
  border: 1.5px solid var(--color-base-300);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-base-content);
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-secondary);
}

.form-group textarea { resize: vertical; min-height: 100px; }

/* ── SPONSORS ────────────────────────────────────────────────── */
.sponsors {
  padding-block: var(--space-lg);
  background: var(--color-base-200);
}

.sponsors__label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  text-align: center;
  margin-bottom: var(--space-md);
  opacity: 0.7;
}

.sponsors__row {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.sponsor-item {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-muted);
  opacity: 0.6;
}

.sponsor-item img {
  height: 32px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.5;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
  background: var(--color-base-200);
  border-top: 1px solid var(--color-base-300);
  padding-block: var(--space-md);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 12.5px;
  color: var(--color-muted);
}

.footer__links {
  display: flex;
  gap: var(--space-md);
}

.footer__links a {
  text-decoration: none;
  color: var(--color-muted);
}

.footer__links a:hover { color: var(--color-base-content); }

/* ── UTILITIES ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Alpine cloak — prevents flash of unrendered template */
[x-cloak] { display: none !important; }
