/* School365 landing — notebook page: ruled lines + red margin, pencil sketches on the right,
   logo colours as accents. One screen, no scroll on 1366x768 and up.
   Light only on purpose: the logo's eye whites are transparent and need a light page. */
:root {
  --blue:   #1b4ab9;
  --red:    #e0104e;
  --yellow: #fccc00;
  --pink:   #ff88b0;
  --ink:    #14214a;
  --muted:  #4d5875;
  --paper:  #fbfcff;
  --rule:   rgba(27, 74, 185, .09);
  --margin: rgba(224, 16, 78, .32);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --line: 34px;                         /* notebook line height */
  --margin-x: 72px;                     /* red margin line position */
  --h1: clamp(34px, 5.4vw, 64px);
  --logo: 400px;
  --gutter-r: max(24px, env(safe-area-inset-right));
  --gutter-l: max(calc(var(--margin-x) + 32px), env(safe-area-inset-left));
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent calc(var(--margin-x) - 1px), var(--margin) calc(var(--margin-x) - 1px),
                    var(--margin) calc(var(--margin-x) + 1px), transparent calc(var(--margin-x) + 1px)),
    repeating-linear-gradient(180deg, transparent 0 calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px) var(--line));
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ---------- pencil sketches ---------- */
.sketch {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .14;
}
.sketch-right {
  background: url("../img/doodles.svg") right 28px center / auto 92vh no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, transparent 42%, #000 68%);
          mask-image: linear-gradient(90deg, transparent 0, transparent 42%, #000 68%);
}
/* left side: between the red margin and the text; only where there is room */
.sketch-left {
  background: url("../img/doodles-left.svg") left calc(var(--margin-x) + 18px) center / auto 88vh no-repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 22%, transparent 34%);
          mask-image: linear-gradient(90deg, #000 0, #000 22%, transparent 34%);
  display: none;
}
@media (min-width: 1500px) { .sketch-left { display: block; } }

.page, .foot { position: relative; z-index: 1; }

.page {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 52px) var(--gutter-r) 24px var(--gutter-l);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(22px, 4vh, 40px);
}

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(12px, 2.2vh, 20px); }

.logo img {
  display: block;
  width: min(var(--logo), 100%);
  height: auto;
  animation: rise .7s ease-out both;
}

.headline {
  margin: 0;
  font-size: var(--h1);
  line-height: 1.02;
  text-wrap: balance;
}

h1 {
  display: inline;
  margin: 0;
  font-weight: 800;
  font-size: 1em;
  letter-spacing: -.02em;
  color: var(--blue);
}

.badge {
  /* follows "in one place." on the same line, centred on it; wraps below on narrow screens */
  margin: 0 0 0 .32em;
  vertical-align: .32em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
  animation: ping 2.2s ease-out infinite;
}

.lead {
  margin: 0;
  max-width: 60ch;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- features ---------- */
.features {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1.5px solid rgba(20, 33, 74, .10);
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 9px; height: 9px; border-radius: 3px;
  background: var(--blue);
}
.chip-red::before    { background: var(--red); }
.chip-yellow::before { background: var(--yellow); }

/* ---------- apps: parents | teachers ---------- */
.apps {
  border-top: 2px dashed rgba(27, 74, 185, .18);
  padding-top: clamp(16px, 2.6vh, 24px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 40px;
}
.app { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.app + .app { border-left: 2px dashed rgba(27, 74, 185, .18); padding-left: 40px; }
.apps h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--ink); }
.apps p  { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.apps strong { color: var(--ink); font-weight: 600; }

.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.store {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: transform .15s ease, background .15s ease;
}
.store:hover { background: var(--blue); transform: translateY(-1px); }
.store:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- footer ---------- */
.foot {
  padding: 12px var(--gutter-r) 18px var(--gutter-l);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  gap: 8px;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
}
.foot .sep { color: var(--pink); }

/* ---------- motion ---------- */
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(224, 16, 78, .45); }
  70%  { box-shadow: 0 0 0 9px rgba(224, 16, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 16, 78, 0); }
}
@keyframes rise { from { transform: translateY(8px); opacity: .001; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .badge .dot, .logo img { animation: none; }
  .store { transition: none; }
}

/* ---------- wide: all six features on one line ---------- */
@media (min-width: 1200px) {
  .features { display: flex; flex-wrap: nowrap; }
}

/* ---------- narrower: sketches move to the bottom corner ---------- */
@media (max-width: 1279px) {
  .sketch-right {
    background: url("../img/doodles-corner.svg") right 12px bottom 12px / min(340px, 55vw) auto no-repeat;
    opacity: .11;
    -webkit-mask-image: none;
            mask-image: none;
  }
}

/* ---------- short screens (laptops 768px tall and less) ---------- */
@media (max-height: 820px) and (min-width: 601px) {
  :root { --logo: 300px; --h1: clamp(30px, 4.4vw, 52px); }
  .page { gap: 20px; padding-top: 18px; padding-bottom: 14px; }
  .hero { gap: 12px; }
  .lead { font-size: 16.5px; line-height: 1.5; }
  .apps { padding-top: 14px; }
  .apps p { font-size: 15px; }
  .stores { margin-top: 2px; }
  .store { padding: 9px 16px; font-size: 14.5px; }
  .foot { padding-top: 6px; padding-bottom: 12px; }
}
@media (max-height: 660px) and (min-width: 601px) {
  :root { --logo: 240px; --h1: clamp(28px, 4vw, 44px); }
  .page { gap: 14px; }
}

/* ---------- phone ---------- */
@media (max-width: 600px) {
  :root { --margin-x: 22px; --line: 30px; --logo: 400px; --h1: clamp(34px, 9.4vw, 44px);
          --gutter-l: max(calc(var(--margin-x) + 20px), env(safe-area-inset-left));
          --gutter-r: max(16px, env(safe-area-inset-right)); }
  .sketch { display: none !important; }
  .apps { grid-template-columns: 1fr; }
  .app + .app { border-left: 0; padding-left: 0; border-top: 2px dashed rgba(27, 74, 185, .18); padding-top: 16px; }
  .page { justify-content: flex-start; padding-top: 32px; }
  .features { display: flex; flex-wrap: wrap; gap: 8px; }
  .chip { font-size: 13.5px; padding: 6px 10px; gap: 7px; }
  .badge { margin: 10px 0 0; vertical-align: 0; }
}
