/* Young Momins Learning Institute — minimal typographic system */

:root {
  --ink:        #1e1b2e; /* headings */
  --ink-soft:   #4a4560; /* body copy */
  --ink-mute:   #837da3;
  --bg:         #faf3ea; /* cream */
  --bg-raise:   #faf3ea;
  --rule:       #e9ddcc;
  --accent:     #3b3e9e; /* indigo — links */
  --accent-ink: #2c2e78;
  --button-bg:      #f0705a; /* coral */
  --button-bg-hover: #e35a42;
  --button-ink:     #ffffff;

  --measure: 34rem;
  --page:    46rem;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #ffffff; /* headings/primary text on indigo */
    --ink-soft:   #d6d3ea; /* body copy on indigo */
    --ink-mute:   #a29de0;
    --bg:         #3b3e9e; /* indigo replaces near-black */
    --bg-raise:   #34367f;
    --rule:       #54579c;
    --accent:     #ffb39f; /* light coral tint — plain indigo would vanish on the indigo bg */
    --accent-ink: #ffcfc2;
    --button-bg:      #f0705a; /* coral */
    --button-bg-hover: #ff8871;
    --button-ink:     #ffffff;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

main { display: block; }

section {
  padding-block: 4.5rem;
  border-top: 1px solid var(--rule);
}

section:first-of-type { border-top: 0; }

/* ---------- typography ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); }
h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  margin-bottom: 0.4em;
}

p { margin: 0 0 1.15rem; max-width: var(--measure); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink); }

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 1.25rem;
}

.muted { color: var(--ink-mute); }

ul { margin: 0 0 1.15rem; padding-left: 1.1rem; max-width: var(--measure); }
li { margin-bottom: 0.35rem; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand:hover { color: var(--ink); }
.brand img { display: block; width: 30px; height: 30px; }

.nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.9rem;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(4rem, 12vw, 7.5rem) 4.5rem; }
.hero h1 { margin-bottom: 0.5rem; }
.hero .lede { max-width: 32rem; }

/* ---------- app entries ---------- */

.app { border-top: 1px solid var(--rule); padding-block: 4.5rem; }

.app-title {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.app-title h2 { margin: 0; }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.badges li {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 0.25rem 0.7rem;
}

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem 2.5rem;
  margin-bottom: 1.5rem;
}

.cols ul, .cols p { max-width: none; }

/* ---------- links / actions ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--button-bg);
  border-radius: 999px;
  color: var(--button-ink);
  background: var(--button-bg);
  transition: background-color 0.15s ease;
}

.btn:hover { background: var(--button-bg-hover); border-color: var(--button-bg-hover); color: var(--button-ink); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-ghost:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }

.policy-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* ---------- policy pages ---------- */

.policy { padding-block: 3.5rem 4.5rem; }
.policy h2 { margin-top: 2.75rem; font-size: 1.35rem; }
.policy h2:first-of-type { margin-top: 2rem; }
.policy p, .policy ul { color: var(--ink-soft); }

.back-link { display: inline-block; margin-top: 3rem; font-size: 0.9rem; }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: 3rem;
  font-size: 0.9rem;
  color: var(--ink-mute);
}

.site-foot p { max-width: none; margin-bottom: 0.4rem; }

/* ---------- a11y ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
