/* Manhagna landing page. Korrasa (the product repo's docs/design/korrasa/DESIGN.md):
   every colour, font, space, radius and shadow is a token from tokens.css.
   Playful mode (DESIGN.md §5): 2px line borders and offset shadows. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

img,
svg {
  display: block;
}

a {
  color: var(--violet-ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* DESIGN.md §11: 3px violet-ink ring, 3px offset. */
:focus-visible {
  outline: 3px solid var(--violet-ink);
  outline-offset: 3px;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-16);
}

@media (min-width: 960px) {
  .wrap {
    padding-inline: var(--space-48);
  }
}

main {
  flex: 1;
}

.skip {
  position: absolute;
  inset-inline-start: var(--space-16);
  top: calc(-1 * var(--space-64));
  z-index: 1;
  padding: var(--space-12) var(--space-16);
  background: var(--surface);
  color: var(--ink);
  border: var(--border-playful);
  border-radius: var(--radius-control);
  font-weight: var(--type-label-weight);
}

.skip:focus {
  top: var(--space-16);
}

/* ---------- Logo (DESIGN.md §14) ---------- */

.site-header {
  padding-block: var(--space-16);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  min-height: var(--touch-min);
  /* Clear space: 25% of the 40px mark on every side. */
  padding: var(--space-8);
  margin: calc(-1 * var(--space-8));
  color: inherit;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: var(--type-h2);
  font-weight: var(--type-h2-weight);
  line-height: var(--type-h2-line);
}

.logo img {
  width: 40px;
  height: 40px;
}

.logo-word {
  white-space: nowrap;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: var(--space-24) var(--space-48);
}

.hero-grid {
  display: grid;
  gap: var(--space-32);
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-16);
}

h1 {
  font-family: var(--font-heading);
  font-size: var(--type-hero-phone);
  font-weight: var(--type-display-weight);
  line-height: var(--type-display-line);
}

/* The slogan's «…» (U+2026) sits in the Latin range: in Baloo it pulled
   Baloo's whole Latin file (35 KB) for one glyph. Tajawal 700's Latin file
   is already loaded (the support address), so it costs no request. */
.slogan-dots {
  font-family: var(--font-body);
  font-weight: var(--type-label-weight);
}

.lead {
  font-size: var(--type-h3);
  line-height: var(--type-body-line);
  color: var(--ink-2);
  max-width: 34em;
}

.hero-art {
  display: none;
}

@media (min-width: 720px) {
  h1 {
    font-size: var(--type-display);
  }
}

@media (min-width: 960px) {
  .hero {
    padding-block: var(--space-48) var(--space-64);
  }

  .hero-grid {
    grid-template-columns: 7fr 5fr;
    gap: var(--space-48);
  }

  h1 {
    font-size: var(--type-hero-desktop);
  }

  .hero-art {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: var(--space-48);
    background: var(--violet-soft);
    border: var(--border-playful);
    border-radius: var(--radius-sheet);
    box-shadow: var(--shadow-sheet);
  }

  .hero-art img {
    width: 100%;
    height: auto;
    max-width: 280px;
  }
}

/* ---------- Chips and stickers ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-4) var(--space-12);
  background: var(--sky);
  color: var(--on-fill);
  border: var(--border-playful);
  border-color: var(--on-fill);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-chip);
  font-size: var(--type-label);
  font-weight: var(--type-button-weight);
}

.chip svg {
  width: 20px;
  height: 20px;
}

.sticker {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--space-48);
  height: var(--space-48);
  color: var(--on-fill);
  border: var(--border-playful);
  border-color: var(--on-fill);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-chip);
  transform: rotate(-6deg);
}

.sticker svg {
  width: 24px;
  height: 24px;
}

.sticker--coral {
  background: var(--coral);
}

.sticker--sun {
  background: var(--sun);
}

.sticker--mint {
  background: var(--mint);
}

.sticker--sky {
  background: var(--sky);
}

.sticker--violet {
  background: var(--violet-soft);
  color: var(--ink);
  border-color: var(--line);
}

/* ---------- Buttons (DESIGN.md §7) ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
  padding-top: var(--space-8);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  min-height: var(--control-h);
  padding: var(--space-12) var(--space-24);
  border: var(--border-playful);
  border-radius: var(--radius-button);
  box-shadow: var(--shadow-button);
  font-size: var(--type-button);
  font-weight: var(--type-button-weight);
  line-height: var(--type-button-line);
  text-decoration: none;
  transition:
    transform var(--dur-press) var(--ease-spring),
    box-shadow var(--dur-press) var(--ease-spring);
}

.btn svg {
  width: 22px;
  height: 22px;
}

.btn:active {
  transform: var(--press-move);
  box-shadow: none;
}

.btn--primary {
  background: var(--violet);
  color: var(--on-violet);
  border-color: var(--line);
}

.btn--sun {
  background: var(--sun);
  color: var(--on-fill);
  border-color: var(--on-fill);
}

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

/* ---------- Sections ---------- */

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

@media (min-width: 960px) {
  .section {
    padding-block: var(--space-48);
  }
}

.section-head {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  margin-bottom: var(--space-24);
}

h2 {
  font-family: var(--font-heading);
  font-size: var(--type-h1-phone);
  font-weight: var(--type-h1-weight);
  line-height: var(--type-h1-line);
}

@media (min-width: 960px) {
  h2 {
    font-size: var(--type-h1);
  }
}

h3 {
  font-family: var(--font-heading);
  font-size: var(--type-h3);
  font-weight: var(--type-h3-weight);
  line-height: var(--type-h3-line);
}

.cards {
  display: grid;
  gap: var(--space-16);
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-24);
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-16);
  background: var(--surface);
  border: var(--border-playful);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

@media (min-width: 960px) {
  .card {
    padding: var(--space-24);
  }
}

.card-icon {
  display: grid;
  place-items: center;
  width: var(--space-48);
  height: var(--space-48);
  margin-bottom: var(--space-4);
  background: var(--violet-soft);
  color: var(--ink);
  border-radius: var(--radius-control);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card p {
  color: var(--ink-2);
}

.join {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-16);
  margin-top: var(--space-24);
  padding: var(--space-16);
  background: var(--sun-soft);
  border: var(--border-playful);
  border-radius: var(--radius-card);
}

@media (min-width: 720px) {
  .join {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-24);
  }
}

.join p {
  font-weight: var(--type-label-weight);
}

.join .email {
  display: block;
  font-weight: var(--type-body-weight);
  color: var(--ink-2);
}

/* Parents and status: two tinted cards side by side on desktop. */
.pair {
  display: grid;
  gap: var(--space-24);
}

@media (min-width: 720px) {
  .pair {
    grid-template-columns: 1fr 1fr;
  }
}

.note {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  padding: var(--space-24);
  border: var(--border-playful);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.note .section-head {
  margin-bottom: 0;
}

.note--mint {
  background: var(--mint-soft);
}

.note--sky {
  background: var(--sky-soft);
}

/* ---------- Footer (plum in both themes, DESIGN.md §14) ---------- */

.site-footer {
  --footer-ink: var(--bg);
  --footer-ink-2: var(--surface-2);
  margin-top: var(--space-48);
  padding-block: var(--space-32) var(--space-48);
  background: var(--footer);
  color: var(--footer-ink);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .site-footer {
    --footer-ink: var(--ink);
    --footer-ink-2: var(--ink-2);
  }
}

:root[data-theme='dark'] .site-footer {
  --footer-ink: var(--ink);
  --footer-ink-2: var(--ink-2);
}

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

.site-footer :focus-visible {
  outline-color: var(--footer-ink);
}

.footer-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-12);
}

.footer-grid .logo {
  margin-bottom: var(--space-4);
}

.footer-line {
  color: var(--footer-ink-2);
  font-size: var(--type-label);
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  min-height: var(--touch-min);
  font-weight: var(--type-label-weight);
}

.footer-contact svg {
  width: 22px;
  height: 22px;
}

/* ---------- 404 ---------- */

.lost {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-16);
  padding-block: var(--space-48) var(--space-64);
  max-width: 36rem;
}

/* DESIGN.md §4: all motion stops with reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .btn:active {
    transition: none;
    transform: none;
  }

  .sticker {
    transform: none;
  }
}
