/* ============================================================
   REALSEM EDTECH — placeholder site
   Editorial / document aesthetic. Pure CSS, no JS.
   ============================================================ */

:root {
  /* Type stacks — no external CDNs */
  --font-display: 'Iowan Old Style', Georgia, 'Palatino Linotype', Palatino, P052, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  /* Palette — derived from deck */
  --paper:        #fbfbf7;
  --paper-warm:   rgba(245, 124, 0, 0.04);
  --ink:          #1a1a1a;
  --grain:        #6b6b6b;
  --rule:         #d8d6d0;
  --rule-soft:    #ebe9e3;
  --brand-blue:   #0E3F9A;
  --brand-blue-d: #082961;
  --brand-orange: #F57C00;

  /* Spacing rhythm */
  --space-xs:  8px;
  --space-s:   16px;
  --space-m:   32px;
  --space-l:   64px;
  --space-xl:  96px;
  --space-xxl: 128px;
}

* { box-sizing: border-box; }

html {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Subtle paper warmth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 15% 0%, var(--paper-warm) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 90% 100%, rgba(14, 63, 154, 0.025) 0%, transparent 50%);
  z-index: -1;
}

/* ============================================================
   LAYOUT — A4-feel sheet
   ============================================================ */
.sheet {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 32px 64px;
  position: relative;
}

@media (min-width: 720px) {
  .sheet { padding: 64px 48px 96px; }
}

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-m);
  padding-bottom: var(--space-m);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 88px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--grain);
  animation: rise 0.6s ease-out both;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo {
  display: block;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.wordmark {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
  font-size: 11.5px;
}

.meta {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 559px) {
  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 56px;
  }
  .meta { text-align: left; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  margin-bottom: 96px;
  padding-top: var(--space-s);
}

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--grain);
  margin: 0 0 40px 0;
  animation: rise 0.6s 0.1s ease-out both;
}

.label .num {
  color: var(--brand-orange);
  font-weight: 600;
  margin-right: 6px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7.5vw, 5.25rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}

h1 .line {
  display: block;
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.85s ease-out forwards;
}

h1 .line:nth-child(1) { animation-delay: 0.20s; }
h1 .line:nth-child(2) { animation-delay: 0.35s; }
h1 .line:nth-child(3) { animation-delay: 0.50s; }

h1 em {
  font-style: italic;
  color: var(--brand-blue);
  font-feature-settings: "kern" 1, "liga" 1, "swsh" 1;
}

.hero-mark {
  position: absolute;
  right: -8px;
  bottom: -16px;
  width: 56px;
  height: 56px;
  opacity: 0;
  animation: rise 0.7s 0.65s ease-out forwards;
  transform: translateY(8px);
}

@media (max-width: 559px) {
  .hero { margin-bottom: 72px; padding-top: 0; }
  .label { margin-bottom: 28px; }
  .hero-mark {
    position: static;
    width: 40px;
    height: 40px;
    margin-top: 32px;
  }
}

/* ============================================================
   RULES — short section breaks
   ============================================================ */
hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 80px 0 56px;
  width: 64px;
  position: relative;
}

hr::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 16px;
  height: 3px;
  background: var(--brand-orange);
}

@media (max-width: 559px) {
  hr { margin: 56px 0 40px; }
}

/* ============================================================
   SECTIONS — prose
   ============================================================ */
.prose h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--grain);
  margin: 0 0 32px 0;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.prose h2 .num {
  color: var(--brand-orange);
}

.prose p {
  font-size: 18px;
  line-height: 1.62;
  max-width: 60ch;
  margin: 0 0 20px 0;
  color: #2a2a2a;
}

.prose p:last-child { margin-bottom: 0; }

.highlight {
  color: var(--brand-blue);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--brand-orange);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.prose {
  opacity: 0;
  animation: rise 0.7s ease-out forwards;
}

.prose:nth-of-type(1) { animation-delay: 0.4s; }
.prose:nth-of-type(2) { animation-delay: 0.55s; }

/* ============================================================
   CONTACT LIST
   ============================================================ */
.contact-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-list .row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  align-items: start;
}

.contact-list dt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--grain);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 7px;
  font-weight: 500;
}

.contact-list dd {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   LINKS
   ============================================================ */
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--brand-blue);
  text-decoration-color: var(--brand-orange);
  text-decoration-thickness: 1.5px;
}

a:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ============================================================
   COLOPHON / FOOTER
   ============================================================ */
.colophon {
  margin-top: 112px;
  padding-top: var(--space-m);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-m);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--grain);
  opacity: 0;
  animation: rise 0.6s 0.75s ease-out forwards;
}

.copyright { margin: 0; }

.footer-nav {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.footer-nav a {
  color: var(--grain);
  text-decoration-color: transparent;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--brand-blue);
  text-decoration-color: var(--brand-orange);
}

@media (max-width: 559px) {
  .colophon {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 80px;
  }
}

/* ============================================================
   LEGAL DOCS — privacy.html, terms.html
   ============================================================ */
.legal h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 8px 0 12px;
  letter-spacing: -0.02em;
}

.legal .updated {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--grain);
  margin: 0 0 64px 0;
  font-variant-numeric: tabular-nums;
}

.legal .doc {
  opacity: 0;
  animation: rise 0.6s 0.15s ease-out forwards;
}

.legal h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  text-transform: none;
  letter-spacing: -0.005em;
  margin: 56px 0 14px;
  display: block;
  line-height: 1.3;
}

.legal h2:first-of-type { margin-top: 0; }

.legal h2::before {
  content: "§ ";
  color: var(--brand-orange);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  margin-right: 6px;
  letter-spacing: 0;
  vertical-align: 1px;
}

.legal p {
  font-size: 16.5px;
  line-height: 1.7;
  max-width: 65ch;
  margin: 0 0 16px 0;
  color: #2a2a2a;
}

.legal ul {
  font-size: 16px;
  line-height: 1.7;
  max-width: 65ch;
  padding-left: 1.2em;
}

.legal ul li { margin-bottom: 6px; }

.legal .back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 72px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grain);
  text-decoration-color: transparent;
}

.legal .back:hover,
.legal .back:focus-visible {
  color: var(--brand-blue);
  text-decoration-color: var(--brand-orange);
}

.legal .back::before {
  content: "←";
  color: var(--brand-orange);
  font-family: var(--font-body);
  font-size: 14px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transform: none !important;
  }
  h1 .line,
  .prose,
  .hero-mark,
  .colophon,
  .legal .doc {
    opacity: 1 !important;
  }
}

/* ============================================================
   PRINT — make the document feel like paper
   ============================================================ */
@media print {
  body::before { display: none; }
  .sheet { max-width: none; padding: 24px; }
  .hero-mark { display: none; }
  h1 { font-size: 36pt; }
  a { color: var(--ink); text-decoration: none; }
}
