/* Confey Montessori — site styles
   Warm, natural Montessori-inspired palette */

:root {
  --cream: #f8f3ea;
  --cream-deep: #efe6d4;
  --sage: #8aa17b;
  --sage-deep: #5e7654;
  --terracotta: #c97b5d;
  --terracotta-deep: #a35e43;
  --ink: #3a342c;
  --ink-soft: #5a5346;
  --line: #e3d9c5;
  --shadow: 0 6px 24px rgba(58, 52, 44, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Georgia", "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--terracotta-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & nav */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(6px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  line-height: 0;
}

.brand-logo {
  height: 88px;
  width: auto;
  display: block;
}

@media (max-width: 640px) {
  .brand-logo {
    height: 72px;
  }
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav a {
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0.3px;
  position: relative;
  padding-bottom: 4px;
}

.nav a:hover {
  color: var(--terracotta-deep);
  text-decoration: none;
}

.nav a.active {
  color: var(--terracotta-deep);
}

.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--terracotta);
  border-radius: 2px;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -60px;
  width: 360px;
  height: 360px;
  background: var(--sage);
  opacity: 0.12;
  border-radius: 50%;
}

.hero::after {
  content: "";
  position: absolute;
  left: -80px;
  bottom: -100px;
  width: 240px;
  height: 240px;
  background: var(--terracotta);
  opacity: 0.1;
  border-radius: 50%;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: "Georgia", serif;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  font-weight: 600;
  color: var(--ink);
  max-width: 760px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 620px;
  margin-bottom: 32px;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0.4px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--terracotta);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--terracotta-deep);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
}

.btn + .btn {
  margin-left: 12px;
}

/* Page header (non-home pages) */
.page-header {
  background: var(--cream-deep);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
}

.page-header h1 {
  font-family: "Georgia", serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.page-header p {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 640px;
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-tight {
  padding: 48px 0;
}

.section-alt {
  background: var(--cream-deep);
}

.section h2 {
  font-family: "Georgia", serif;
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
  max-width: 760px;
}

.section h3 {
  font-family: "Georgia", serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.section p {
  color: var(--ink-soft);
  max-width: 720px;
  margin-bottom: 16px;
}

.section .lead {
  font-size: 19px;
  color: var(--ink);
}

/* Cards / grids */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(58, 52, 44, 0.12);
}

.card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--sage);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.card.terracotta .card-icon {
  background: var(--terracotta);
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 0;
}

.card .age-tag {
  display: inline-block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sage-deep);
  background: var(--cream);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* Two-column split */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 720px) {
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.split-image {
  aspect-ratio: 4 / 3;
  background: var(--cream-deep);
  border-radius: 16px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.split-image::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

/* Pull quote */
.quote {
  border-left: 4px solid var(--terracotta);
  padding: 16px 0 16px 28px;
  margin: 32px 0;
  max-width: 720px;
}

.quote p {
  font-size: 22px;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.5;
}

.quote cite {
  font-style: normal;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.3px;
}

/* Lists */
.section ul.checklist {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.section ul.checklist li {
  padding: 8px 0 8px 32px;
  position: relative;
  color: var(--ink-soft);
  max-width: 680px;
}

.section ul.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--sage-deep);
  font-weight: 700;
}

/* Steps (numbered) */
.steps {
  display: grid;
  gap: 20px;
  margin-top: 32px;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-family: "Georgia", serif;
  font-size: 20px;
  font-weight: 600;
}

.step h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.step p {
  font-size: 15px;
  margin-bottom: 0;
}

/* Contact / CTA banner */
.cta {
  background: var(--sage-deep);
  color: var(--cream);
  padding: 56px 0;
  text-align: center;
}

.cta h2 {
  color: var(--cream);
  margin: 0 auto 12px;
  text-align: center;
}

.cta p {
  color: rgba(248, 243, 234, 0.85);
  max-width: 560px;
  margin: 0 auto 24px;
}

.cta .btn-primary {
  background: var(--terracotta);
}

.cta .btn-primary:hover {
  background: var(--terracotta-deep);
}

.cta .btn-secondary {
  border-color: var(--cream);
  color: var(--cream);
}

.cta .btn-secondary:hover {
  background: var(--cream);
  color: var(--ink);
}

/* Info row (contact details on home) */
.info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.info-item {
  text-align: left;
}

.info-item .info-label {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 6px;
  display: block;
}

.info-item .info-value {
  font-family: "Georgia", serif;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.4;
}

.info-item a {
  color: var(--ink);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 48px 0 24px;
  margin-top: 0;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 720px) {
  .site-footer .container {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.site-footer h4 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(248, 243, 234, 0.6);
  margin-bottom: 14px;
}

.site-footer p,
.site-footer a {
  color: rgba(248, 243, 234, 0.85);
  font-size: 15px;
  line-height: 1.7;
}

.site-footer a:hover {
  color: var(--cream);
}

.site-footer ul {
  list-style: none;
}

.site-footer ul li {
  margin-bottom: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(248, 243, 234, 0.12);
  margin-top: 32px;
  padding-top: 18px;
  text-align: center;
  font-size: 13px;
  color: rgba(248, 243, 234, 0.5);
}

/* Mobile nav: simple stack */
@media (max-width: 640px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav {
    flex-wrap: wrap;
    gap: 16px 20px;
  }
  .hero {
    padding: 56px 0 64px;
  }
  .section {
    padding: 56px 0;
  }
}

/* Contact form */
.contact-form {
  display: grid;
  gap: 18px;
  max-width: 640px;
  margin-top: 28px;
}
.contact-form .form-row {
  display: grid;
  gap: 6px;
}
.contact-form label {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: "Georgia", "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #5b9bba;
  box-shadow: 0 0 0 3px rgba(91, 155, 186, 0.2);
}
.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}
.contact-form button[type="submit"] {
  justify-self: start;
  cursor: pointer;
  border: none;
  font-size: 15px;
  margin-top: 6px;
}

/* Embedded map */
.map-wrap {
  margin-top: 36px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--cream-deep);
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}

/* ─────────────────────── Rainbow theme ─────────────────────── */

:root {
  --rb-red: #d8615f;
  --rb-orange: #e4a05d;
  --rb-yellow: #d9b660;
  --rb-green: #6cab8a;
  --rb-blue: #5b9bba;
  --rb-indigo: #6c6daa;
  --rb-violet: #9070ad;
  --rainbow: linear-gradient(to right,
    var(--rb-red), var(--rb-orange), var(--rb-yellow),
    var(--rb-green), var(--rb-blue), var(--rb-indigo), var(--rb-violet));

  /* Repoint legacy accent vars to rainbow palette */
  --sage: var(--rb-green);
  --sage-deep: #048a68;
  --terracotta: var(--rb-orange);
  --terracotta-deep: #cc7a00;
}

/* Hero: replace the soft circles with a rainbow stripe at the bottom */
.hero::before {
  top: auto;
  right: auto;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--rainbow);
  border-radius: 0;
  opacity: 1;
  z-index: 2;
}
.hero::after {
  display: none;
}

/* Page header: rainbow stripe at the bottom */
.page-header {
  position: relative;
}
.page-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--rainbow);
}

/* Alt section: rainbow stripe at the top */
.section-alt {
  position: relative;
}
.section-alt::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--rainbow);
}

/* Footer: rainbow stripe at the top */
.site-footer {
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--rainbow);
}

/* Primary button: animated rainbow gradient */
.btn-primary {
  background: var(--rainbow);
  background-size: 200% 100%;
  background-position: 0 0;
  color: #fff;
  transition: background-position 0.45s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  background-position: 100% 0;
}

/* CTA: rainbow background, white text */
.cta {
  background: var(--rainbow);
}
.cta h2,
.cta p {
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.cta .btn-primary {
  background: #fff;
  color: var(--ink);
}
.cta .btn-primary:hover {
  background: #fff;
  background-position: 0 0;
  transform: translateY(-1px);
}
.cta .btn-secondary {
  border-color: #fff;
  color: #fff;
}
.cta .btn-secondary:hover {
  background: #fff;
  color: var(--ink);
}

/* Card icons: rotate through the rainbow */
.grid > .card:nth-child(7n+1) .card-icon { background: var(--rb-red); color: #fff; }
.grid > .card:nth-child(7n+2) .card-icon { background: var(--rb-orange); color: #fff; }
.grid > .card:nth-child(7n+3) .card-icon { background: var(--rb-yellow); color: var(--ink); }
.grid > .card:nth-child(7n+4) .card-icon { background: var(--rb-green); color: #fff; }
.grid > .card:nth-child(7n+5) .card-icon { background: var(--rb-blue); color: #fff; }
.grid > .card:nth-child(7n+6) .card-icon { background: var(--rb-indigo); color: #fff; }
.grid > .card:nth-child(7n) .card-icon   { background: var(--rb-violet); color: #fff; }

/* Step numbers: rotate through the rainbow */
.steps .step:nth-child(7n+1) .step-num { background: var(--rb-red); }
.steps .step:nth-child(7n+2) .step-num { background: var(--rb-orange); color: var(--ink); }
.steps .step:nth-child(7n+3) .step-num { background: var(--rb-yellow); color: var(--ink); }
.steps .step:nth-child(7n+4) .step-num { background: var(--rb-green); }
.steps .step:nth-child(7n+5) .step-num { background: var(--rb-blue); }
.steps .step:nth-child(7n+6) .step-num { background: var(--rb-indigo); }
.steps .step:nth-child(7n)   .step-num { background: var(--rb-violet); }

/* Quote accent border */
.quote {
  border-left-color: var(--rb-orange);
}

/* Checklist tick mark colours rotate through rainbow */
.checklist li:nth-child(7n+1)::before { color: var(--rb-red); }
.checklist li:nth-child(7n+2)::before { color: var(--rb-orange); }
.checklist li:nth-child(7n+3)::before { color: #c79b00; }
.checklist li:nth-child(7n+4)::before { color: var(--rb-green); }
.checklist li:nth-child(7n+5)::before { color: var(--rb-blue); }
.checklist li:nth-child(7n+6)::before { color: var(--rb-indigo); }
.checklist li:nth-child(7n)::before   { color: var(--rb-violet); }
