/* ============================================================
   CONTACT.CSS — JEUNES SCOLARISÉS
   Page: Contact Us
   Aesthetic: Open doors · warm approachability · clear channels
   Fonts: Cormorant Garamond (display) + Outfit (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ────────────────────────────────────────────
   ROOT TOKENS
──────────────────────────────────────────── */
:root {
  --green-deep:   #1b4d30;
  --green-mid:    #276140;
  --green-vivid:  #34a058;
  --gold:         #c8860a;
  --gold-warm:    #e9a825;
  --amber:        #f5c842;
  --cream:        #faf6ef;
  --parchment:    #f0e9d8;
  --ink:          #161c18;
  --text-dark:    #1a1a1a;
  --text-body:    #2e2e2e;
  --text-muted:   #5a5a5a;
  --white:        #ffffff;
  --border:       rgba(27, 77, 48, 0.11);
  --border-gold:  rgba(200, 134, 10, 0.18);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', sans-serif;

  --radius:       18px;
  --radius-sm:    10px;
  --radius-pill:  50px;
  --shadow:       0 4px 28px rgba(27, 77, 48, 0.08);
  --shadow-hover: 0 18px 56px rgba(27, 77, 48, 0.17);
  --transition:   all 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ────────────────────────────────────────────
   BASE
──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font-body); color: var(--text-body); background: var(--cream); margin: 0; }

/* ════════════════════════════════════════════
   OUTER SECTION WRAPPER
════════════════════════════════════════════ */
.section {
  position: relative;
  padding: 100px 24px 130px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Curved arc rings (like signal waves) ── */
.section::before {
  content: '';
  position: fixed;
  bottom: -200px; left: -200px;
  width: 700px; height: 700px;
  border-radius: 50%;
  border: 1.5px solid rgba(52, 160, 88, 0.08);
  box-shadow:
    0 0 0 80px rgba(52, 160, 88, 0.04),
    0 0 0 160px rgba(233, 168, 37, 0.03),
    0 0 0 240px rgba(52, 160, 88, 0.02);
  pointer-events: none;
  z-index: 0;
}

/* ── Warm bloom top right ── */
.section::after {
  content: '';
  position: absolute;
  top: -80px; right: -140px;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 200, 66, 0.10) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.section > * { position: relative; z-index: 1; }

/* ════════════════════════════════════════════
   PAGE HEADER
════════════════════════════════════════════ */
.section > h1::before {
  content: 'WE\'D LOVE TO HEAR FROM YOU';
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}

.section > h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700; line-height: 1.05;
  color: var(--green-deep); letter-spacing: -0.01em;
  margin: 0 0 10px;
  animation: titleIn 0.88s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes titleIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section > p:first-of-type {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-muted); font-weight: 300; line-height: 1.85;
  max-width: 560px; margin: 0 0 68px;
  padding-left: 22px; border-left: 4px solid var(--gold-warm);
  animation: paraIn 0.88s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}
@keyframes paraIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════
   CONTACT INFO CARD GRID
════════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
  animation: gridIn 0.88s cubic-bezier(0.22, 1, 0.36, 1) 0.20s both;
}
@keyframes gridIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════
   CONTACT INFO CARD  (.card)
════════════════════════════════════════════ */
.card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 40px 32px 36px;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
}

/* Top sweep bar */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:nth-child(1)::before { background: linear-gradient(to right, var(--green-vivid), var(--gold-warm)); }
.card:nth-child(2)::before { background: linear-gradient(to right, var(--gold), var(--amber)); }
.card:nth-child(3)::before { background: linear-gradient(to right, #1a6b8a, var(--green-vivid)); }

.card:hover::before { transform: scaleX(1); }

/* Contact icon per card */
.card:nth-child(1) h3::before { content: '✉'; }
.card:nth-child(2) h3::before { content: '☎'; }
.card:nth-child(3) h3::before { content: '📍'; }

.card h3::before {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 14px;
  line-height: 1;
  font-style: normal;
}

/* Ghost circle watermark */
.card::after {
  content: '';
  position: absolute;
  bottom: -24px; right: -24px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: 0.06;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.card:nth-child(1)::after { background: var(--green-vivid); }
.card:nth-child(2)::after { background: var(--gold-warm); }
.card:nth-child(3)::after { background: #1a6b8a; }

.card:hover::after { opacity: 0.12; transform: scale(1.2); }

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-gold);
}

/* Card heading */
.card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  color: var(--green-deep); margin: 0 0 14px;
  line-height: 1.2; transition: color 0.3s ease;
  position: relative; z-index: 1;
}

.card:nth-child(1):hover h3 { color: var(--green-mid); }
.card:nth-child(2):hover h3 { color: var(--gold); }
.card:nth-child(3):hover h3 { color: #1a6b8a; }

/* Contact detail text */
.card p {
  font-size: 0.92rem;
  color: var(--text-body); line-height: 1.75;
  margin: 0; font-weight: 400;
  position: relative; z-index: 1;
  word-break: break-word;
}

/* Stagger entrance */
.card:nth-child(1) { animation: cardIn 0.68s cubic-bezier(0.22,1,0.36,1) 0.28s both; }
.card:nth-child(2) { animation: cardIn 0.68s cubic-bezier(0.22,1,0.36,1) 0.38s both; }
.card:nth-child(3) { animation: cardIn 0.68s cubic-bezier(0.22,1,0.36,1) 0.48s both; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ════════════════════════════════════════════
   MESSAGE FORM SECTION  (.section inside .section)
════════════════════════════════════════════ */
.section .section {
  position: relative;
  background: var(--green-deep);
  border-radius: var(--radius);
  padding: 56px 52px 52px;
  overflow: hidden;
  animation: formIn 0.88s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}
@keyframes formIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Remove inherited outer-section pseudo-elements */
.section .section::before,
.section .section::after { display: none !important; }

/* Interior glow */
.section .section {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(245, 200, 66, 0.09) 0%, transparent 50%),
    var(--green-deep);
  border: none;
  box-shadow: none;
}

/* Diagonal stripe texture */
.section .section > *:first-child::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -48deg,
    transparent, transparent 22px,
    rgba(255,255,255,0.018) 22px,
    rgba(255,255,255,0.018) 23px
  );
  pointer-events: none; z-index: 0; border-radius: var(--radius);
}

.section .section > * { position: relative; z-index: 1; }

/* "Message us" heading */
.section .section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--white);
  margin: 0 0 28px;
  line-height: 1.15;
}

.section .section h2::before {
  content: 'GET IN TOUCH';
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 10px;
}

/* Form placeholder card inside dark section */
.section .section .card {
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: none;
  border-radius: var(--radius-sm);
  padding: 32px 28px;
}

.section .section .card::before,
.section .section .card::after { display: none; }
.section .section .card:hover { transform: none; box-shadow: none; border-color: var(--border-gold); }

.section .section .card p {
  color: var(--text-muted) !important;
  font-style: italic;
  font-size: 0.95rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-form__field { min-width: 0; }

/* ── Form element defaults (for real Django forms) ── */
.section .section input,
.section .section textarea,
.section .section select {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-body);
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
  margin-bottom: 18px;
}

.section .section input::placeholder,
.section .section textarea::placeholder {
  color: var(--text-muted);
}

.contact-form__field textarea {
  min-height: 150px;
  resize: vertical;
}

.section .section input:focus,
.section .section textarea:focus {
  border-color: rgba(233, 168, 37, 0.55);
  background: #fffdf5;
}

.contact-form__error {
  color: #a53b2a;
  font-size: 0.78rem;
  line-height: 1.4;
  margin-top: 7px;
}

.section .section label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 6px;
}

.contact-form__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 4px;
}

.contact-form__submit {
  display: inline-flex;
  align-items: center; gap: 10px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700; font-size: 0.95rem;
  padding: 15px 40px;
  border-radius: var(--radius-pill);
  border: none; cursor: pointer;
  letter-spacing: 0.02em;
  transition: var(--transition);
  margin-top: 8px;
}

.contact-form__submit:hover,
.contact-form__submit:focus-visible {
  background: var(--gold-warm);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(233, 168, 37, 0.40);
}

.contact-form__note {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ════════════════════════════════════════════
   UTILITY
════════════════════════════════════════════ */
.mt-24 { margin-top: 24px !important; }
.mt-48 { margin-top: 56px !important; }
.center { text-align: center !important; }

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  .section { padding: 80px 24px 100px; }
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .section .section { padding: 44px 36px 40px; }
}

@media (max-width: 767.98px) {
  .section { padding: 64px 20px 80px; }
  .section > h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
  .section > p:first-of-type { margin-bottom: 48px; padding-left: 16px; border-left-width: 3px; }
  .card-grid { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 32px 24px 28px; }
  .section .section { padding: 36px 24px 32px; }
  .contact-form__row { grid-template-columns: 1fr; }
  .contact-form__actions { align-items: flex-start; flex-direction: column; }
  .contact-form__submit { width: 100%; justify-content: center; }
}

@media (max-width: 575.98px) {
  .card h3 { font-size: 1.35rem; }
}