/* Yaya Comocava — French Teaching Site
   Trilingual: EN/FR/ES
   Color: Crimson red (#c41e3a) + cream/ivory
*/
:root {
  --primary: #c41e3a;
  --primary-light: #e74c5c;
  --dark: #1a1a1a;
  --cream: #faf8f3;
  --mute: #666;
  --accent: #f4a460;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #ff6b7a;
    --dark: #faf8f3;
    --cream: #2a2a2a;
    --mute: #aaa;
  }
}

:root[data-theme="dark"] {
  --primary: #ff6b7a;
  --dark: #faf8f3;
  --cream: #2a2a2a;
  --mute: #aaa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--dark);
  font-family: -apple-system, BlinkMacSystemFont, "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 500; }
h2 { font-size: clamp(24px, 4vw, 42px); }
h3 { font-size: clamp(20px, 3vw, 32px); }
h4 { font-size: 1.3em; }

p { margin-bottom: 1em; }

a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

a:hover {
  border-bottom-color: var(--primary);
}

/* Header & Navigation */
header {
  background: var(--dark);
  color: var(--cream);
  padding: 1.5rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.masthead {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3em;
  font-weight: 600;
  font-family: "Julius Sans One", sans-serif;
}

.logo svg {
  flex-shrink: 0;
}

nav {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}

nav a {
  color: var(--cream);
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
  font-size: 0.95em;
}

nav a:hover {
  border-bottom-color: var(--primary);
}

.lang-switch {
  font-size: 0.85em;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-switch a {
  color: var(--cream);
  padding: 0.25rem 0.5rem;
  border-bottom: none;
}

.lang-switch a.on {
  color: var(--primary);
  font-weight: 600;
}

.lang-switch span {
  color: var(--mute);
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--cream);
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.footer-section a {
  color: var(--cream);
}

.copyright {
  text-align: center;
  font-size: 0.85em;
  color: var(--mute);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Layout */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 4rem 2rem;
}

.section.white {
  background: var(--cream);
}

.section.alt {
  background: rgba(196, 30, 58, 0.05);
}

/* Home Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--cream);
  padding: 6rem 2rem;
  text-align: center;
}

.hero h1 {
  color: var(--cream);
  margin-bottom: 1rem;
}

.hero .lede {
  font-size: 1.2em;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  background: var(--cream);
  color: var(--primary);
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  border-bottom: none;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-bottom: none;
}

/* Courses Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.course-card {
  background: var(--cream);
  border: 2px solid var(--primary);
  border-radius: 4px;
  padding: 2rem;
  text-align: center;
}

.course-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.course-card .level {
  font-size: 0.9em;
  color: var(--mute);
  font-style: italic;
  margin-bottom: 1rem;
}

/* Schedule Table */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  background: var(--cream);
}

.schedule-table th,
.schedule-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.schedule-table th {
  background: var(--primary);
  color: var(--cream);
  font-weight: 600;
}

.schedule-table tr:hover {
  background: rgba(196, 30, 58, 0.05);
}

/* Contact Form */
.contact-form {
  max-width: 500px;
  margin: 2rem auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1em;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  background: var(--primary);
  color: var(--cream);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.form-submit:hover {
  background: var(--primary-light);
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background: var(--cream);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.blog-card:hover {
  transform: translateY(-4px);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-size: 3em;
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-date {
  font-size: 0.85em;
  color: var(--mute);
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  /* Phone header: compact, and it scrolls away with the page instead of staying pinned */
  header {
    position: static;
    padding: 0.85rem 1rem 0.75rem;
  }

  .masthead {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.55rem 1rem;
  }

  .logo { font-size: 0.88em; gap: 0.45rem; }
  .logo svg { width: 26px; height: 26px; }

  .lang-switch {
    order: 2;
    width: auto;
    font-size: 0.8em;
    gap: 0.15rem;
  }
  .lang-switch a { padding: 0.2rem 0.3rem; }
  .lang-switch span { display: none; }

  nav {
    order: 3;
    flex: 1 0 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem 1.2rem;
  }

  nav a {
    font-size: 0.9em;
    padding: 0.1rem 0;
  }

  .post { scroll-margin-top: 1rem; }

  .hero {
    padding: 3rem 1rem;
  }

  .section {
    padding: 2rem 1rem;
  }
}

/* Photo hero + Discover France */
.hero.hero-photo {
  background: linear-gradient(180deg, rgba(20,20,20,0.35) 0%, rgba(20,20,20,0.55) 60%, rgba(196,30,58,0.65) 100%),
              url(images/hero-paris.jpg) center 35% / cover no-repeat;
  padding: 8rem 2rem 7rem;
}
.hero.hero-photo h1, .hero.hero-photo .lede { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.45); }

.section-sub { text-align: center; color: var(--mute); margin-bottom: 0; }
.section h2 { text-align: center; }

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}
.city-card {
  margin: 0;
  background: var(--cream);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  transition: transform 0.2s, box-shadow 0.2s;
}
.city-card:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(0,0,0,0.16); }
.city-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.city-card figcaption { padding: 1.25rem 1.5rem 1.5rem; }
.city-card h3 { color: var(--primary); margin-bottom: 0.15em; }
.city-card .place { font-size: 0.85em; color: var(--mute); font-style: italic; margin-bottom: 0.6rem; }

.photo-credits {
  max-width: 1200px; margin: 0 auto 1rem; text-align: center;
  font-size: 0.72em; color: var(--mute); line-height: 1.5;
}
.photo-credits a { color: var(--mute); text-decoration: underline; border-bottom: none; }

@media (max-width: 768px) {
  .hero.hero-photo { padding: 5rem 1rem 4.5rem; }
}

/* Inner pages */
a.logo { color: var(--cream); border-bottom: none; }
a.logo:hover { border-bottom: none; }
nav a.on { border-bottom-color: var(--primary); }

.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; text-align: center; padding: 4rem 2rem 3.5rem;
}
.page-hero h1 { color: #fff; margin-bottom: 0.5rem; }
.page-hero .lede { color: #fff; max-width: 680px; margin: 0 auto; font-size: 1.15em; opacity: 0.95; }

.prose { max-width: 780px; }
.prose h2 { text-align: left; margin-top: 1.5rem; }
.prose ul, .prose ol { margin: 0 0 1em 1.25em; }
.prose li { margin-bottom: 0.5rem; }

.level-card { text-align: left; }
.level-card h3, .level-card .level { text-align: center; }
.level-card .learn { font-weight: 600; margin-bottom: 0.4rem; }
.level-card ul { margin: 0 0 0 1.1rem; }
.level-card li { margin-bottom: 0.35rem; }

.format-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.format-card { background: var(--cream); border-top: 3px solid var(--primary); border-radius: 4px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.format-card h3 { color: var(--primary); font-size: 1.5em; }
.pricing { margin-top: 2rem; }

.faq details { border-bottom: 1px solid rgba(0,0,0,0.12); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05em; }
.faq details p { margin: 0.6rem 0 0; }

.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; padding: 0; margin: 0; }
.steps li { background: var(--cream); border-top: 3px solid var(--primary); border-radius: 4px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.steps li::before { counter-increment: step; content: counter(step); display: block; font-family: "Cormorant Garamond", serif; font-size: 2.4em; line-height: 1; color: var(--primary); margin-bottom: 0.4rem; }
.steps h3 { font-size: 1.4em; }

.contact-form select { background: #fff; color: #1a1a1a; }
.contact-form input, .contact-form textarea { color: #1a1a1a; background: #fff; }
.form-note { font-size: 0.85em; color: var(--mute); text-align: center; margin-top: 1rem; }

.post-index { background: rgba(196, 30, 58, 0.05); border-radius: 4px; padding: 1.25rem 1.5rem; margin-bottom: 2.5rem; }
.post-index h2 { margin-top: 0; font-size: 1.6em; }
.post-index ol { margin-bottom: 0; }
.post { padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid rgba(0,0,0,0.12); scroll-margin-top: 110px; }
.post:last-child { border-bottom: none; }
.vocab { margin: 1rem 0 1.25rem; }

.cta-band { text-align: center; }
.cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.cta-button.solid { background: var(--primary); color: #fff; }
.cta-button.ghost { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.cta-button.ghost:hover { border-bottom: 2px solid var(--primary); }
