/* ═══════════════════════════════════════════════════════════════
   Otto Education — Shared Stylesheet
   WCAG 2.2 AA verified colour tokens (see index.html for ratios)
═══════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

:root {
  --forest:        #2D6A4F;
  --forest-hover:  #1E4D38;
  --forest-light:  #74C69D;
  --sage-pale:     #EAF4EF;
  --sage-light:    #B7DECA;
  --teal-dark:     #1A4D4A;
  --teal-hover:    #0F3330;
  --teal-pale:     #E6F4F3;
  --teal-border:   #9ACFCC;
  --cream:         #F7F4EF;
  --ink:           #1C2B22;
  --ink-mid:       #3D5045;
  --mist:          #DDE8E1;
  --white:         #FDFCFB;
  /* Warm "honey" accent: decorative warmth for the portal redesign.
     --honey and --honey-pale are decorative only (never for text).
     --honey-deep on white/cream is 5.9:1, AA for normal text. */
  --honey:         #F0A44B;
  --honey-pale:    #FCF1E1;
  --honey-border:  #EDCFA0;
  --honey-deep:    #8A5A10;
  --font-serif:    'Lora', Georgia, serif;
  --font-sans:     'DM Sans', system-ui, sans-serif;
  --r:             16px;
  --r-sm:          8px;
  --r-xs:          6px;
}

/* ── Skip link ─────────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 9999;
  background: var(--forest); color: var(--white);
  padding: .75rem 1.5rem; border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 500; font-family: var(--font-sans); transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans); background: var(--cream);
  color: var(--ink); font-size: 16px; line-height: 1.7; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
p a, li a { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; border-radius: 3px; }
button, a.btn-primary, a.btn-secondary { min-height: 44px; display: inline-flex; align-items: center; }

/* ── Navigation ────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(247,244,239,0.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mist);
  height: 68px; padding: 0 5vw;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.nav-logo {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600;
  color: var(--ink); display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.nav-links { display: flex; gap: 2rem; list-style: none; font-size: .875rem; font-weight: 500; }
.nav-links a { color: var(--ink-mid); transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { font-weight: 600; border-bottom: 2px solid var(--forest); padding-bottom: 2px; }
.nav-cta {
  background: var(--forest); color: var(--white) !important;
  padding: .5rem 1.25rem; border-radius: 100px;
  font-size: .875rem; font-weight: 500; white-space: nowrap; transition: background .2s;
}
.nav-cta:hover { background: var(--forest-hover) !important; }
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: .5rem; min-height: 44px; min-width: 44px; justify-content: center; align-items: center;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile {
  display: none; position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
  background: var(--cream); z-index: 190; padding: 2rem 5vw;
  flex-direction: column; gap: .25rem; overflow-y: auto;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { font-size: 1.2rem; font-weight: 500; padding: .75rem 0; border-bottom: 1px solid var(--mist); color: var(--ink); }
.nav-mobile .nav-mobile-cta { margin-top: 1.5rem; background: var(--forest); color: var(--white) !important; padding: 1rem; border-radius: var(--r-sm); text-align: center; font-weight: 500; border-bottom: none; }

/* ── Page hero (inner pages) ───────────────────────────────────── */
.page-hero {
  background: var(--sage-pale); border-bottom: 1px solid var(--sage-light);
  padding: 4rem 5vw 3rem;
}
.page-hero-inner { max-width: 760px; }
.breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--ink-mid); margin-bottom: 1.25rem; flex-wrap: wrap;
}
.breadcrumb a { color: var(--forest); }
.breadcrumb-sep { color: var(--mist); }
.page-label {
  font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal-dark); margin-bottom: .75rem;
}
.page-title {
  font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600; line-height: 1.2; color: var(--ink); margin-bottom: 1rem;
}
.page-title em { font-style: italic; color: var(--teal-dark); }
.page-lead { font-size: 1.1rem; color: var(--ink-mid); max-width: 600px; line-height: 1.75; }

/* ── Prose content ─────────────────────────────────────────────── */
.prose {
  max-width: 720px; padding: 4rem 5vw;
}
.prose h2 {
  font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600;
  color: var(--ink); margin: 2.5rem 0 .75rem; line-height: 1.3;
}
.prose h3 {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600;
  color: var(--ink); margin: 2rem 0 .5rem;
}
.prose p { margin-bottom: 1.1rem; color: var(--ink-mid); }
.prose p strong { color: var(--ink); }
.prose ul, .prose ol { margin: .75rem 0 1.25rem 1.5rem; color: var(--ink-mid); }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--forest); font-weight: 500; }
.prose a:hover { color: var(--teal-dark); }
.prose blockquote {
  font-family: var(--font-serif); font-style: italic; font-size: 1.15rem;
  color: var(--teal-dark); border-left: 3px solid var(--teal-border);
  padding-left: 1.25rem; margin: 2rem 0;
}
.prose .last-updated {
  font-size: .8rem; color: var(--ink-mid); opacity: .7; margin-top: 3rem;
  padding-top: 1.5rem; border-top: 1px solid var(--mist);
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn-primary {
  background: var(--forest); color: var(--white);
  padding: .85rem 2rem; border-radius: 100px;
  font-weight: 500; font-size: .95rem; border: none; cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--forest-hover); transform: translateY(-1px); }
.btn-secondary {
  background: transparent; color: var(--ink);
  padding: .85rem 2rem; border-radius: 100px;
  font-weight: 500; font-size: .95rem;
  border: 2px solid var(--ink-mid); cursor: pointer; transition: all .2s;
}
.btn-secondary:hover { background: var(--ink); color: var(--white); }

/* ── Section base ──────────────────────────────────────────────── */
section { padding: 5rem 5vw; }
.section-label { font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: .75rem; }
.section-title { font-family: var(--font-serif); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; line-height: 1.25; color: var(--ink); margin-bottom: 1rem; }
.section-title em { font-style: italic; color: var(--teal-dark); }
.section-intro { font-size: 1.05rem; color: var(--ink-mid); max-width: 580px; line-height: 1.75; }

/* ── Footer ────────────────────────────────────────────────────── */
footer {
  background: var(--ink); color: rgba(255,255,255,.6);
  padding: 4rem 5vw;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem;
}
.footer-brand { font-family: var(--font-serif); font-size: 1.2rem; color: var(--white); margin-bottom: .75rem; display: flex; align-items: center; gap: 10px; }
footer p { font-size: .85rem; line-height: 1.65; }
footer h4 { color: var(--white); font-size: .8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; }
footer ul { list-style: none; font-size: .85rem; }
footer ul li { margin-bottom: .5rem; }
footer ul a { color: rgba(255,255,255,.6); transition: color .2s; }
footer ul a:hover { color: var(--white); }
.footer-bottom { background: rgba(0,0,0,.25); padding: 1.25rem 5vw; font-size: .78rem; color: rgba(255,255,255,.35); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* ── Fade-in ───────────────────────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════════════════
   Portal design layer: warm, hand-drawn accents shared by all pages
═══════════════════════════════════════════════════════════════ */

/* Hand-drawn squiggle underline for key words (decorative) */
.squiggle {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='6' viewBox='0 0 24 6'%3E%3Cpath d='M0 3 Q3 0.5 6 3 T12 3 T18 3 T24 3' fill='none' stroke='%23F0A44B' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: 0 100%;
  background-size: 24px 6px;
  padding-bottom: 6px;
}

/* Gently tilted tag, straightens on hover */
.tag-tilt {
  display: inline-block; transform: rotate(-2deg);
  transition: transform .2s;
}
.tag-tilt:hover { transform: rotate(0deg); }

/* Numbered step flow (the engagement journey) */
.step-flow {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem; margin-top: 3rem;
  counter-reset: step;
}
.step-item {
  background: var(--white); border: 1px solid var(--mist);
  border-radius: var(--r); padding: 2rem;
  position: relative; counter-increment: step;
  transition: box-shadow .2s, transform .2s;
}
.step-item:hover { box-shadow: 0 8px 32px rgba(28,43,34,.09); transform: translateY(-3px) rotate(-.4deg); }
.step-item::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--honey-pale); border: 2px solid var(--honey);
  color: var(--honey-deep); font-weight: 600; font-size: 1.15rem;
  font-family: var(--font-serif);
  margin-bottom: 1.1rem; transform: rotate(-4deg);
}
.step-item h3 { font-family: var(--font-serif); font-size: 1.08rem; font-weight: 600; color: var(--ink); margin-bottom: .5rem; }
.step-item p { font-size: .9rem; color: var(--ink-mid); line-height: 1.65; }
.step-item .step-hint { display: inline-block; margin-top: .9rem; font-size: .78rem; color: var(--honey-deep); background: var(--honey-pale); border: 1px solid var(--honey-border); border-radius: 100px; padding: .2rem .75rem; font-weight: 500; }

/* FAQ accordion (native details/summary) */
.faq-list { max-width: 760px; margin-top: 2.5rem; }
.faq-item {
  background: var(--white); border: 1px solid var(--mist);
  border-radius: var(--r-sm); margin-bottom: .75rem;
  overflow: hidden; transition: border-color .2s;
}
.faq-item[open] { border-color: var(--sage-light); }
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 1.1rem 1.4rem;
  font-weight: 500; color: var(--ink); font-size: .98rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-family: var(--font-serif); font-size: 1.4rem;
  color: var(--forest); flex-shrink: 0; line-height: 1;
  transition: transform .25s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--forest); }
.faq-answer { padding: 0 1.4rem 1.25rem; font-size: .92rem; color: var(--ink-mid); line-height: 1.7; }
.faq-answer a { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }

/* Callout: warm note box */
.callout {
  background: var(--honey-pale); border: 1px solid var(--honey-border);
  border-radius: var(--r); padding: 1.5rem 1.75rem;
  font-size: .92rem; color: var(--ink); line-height: 1.7;
}
.callout strong { color: var(--honey-deep); }

/* Resource cards (shared by home + resources hub) */
.resources-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.75rem; }
.resource-card {
  background: var(--cream); border-radius: var(--r); border: 1px solid var(--mist);
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s; overflow: hidden;
}
.resource-card:hover { box-shadow: 0 8px 40px rgba(28,43,34,.1); transform: translateY(-3px); }
.resource-card-thumb { height: 140px; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.resource-card-thumb.green { background: var(--sage-pale); }
.resource-card-thumb.teal  { background: var(--teal-pale); }
.resource-card-thumb.honey { background: var(--honey-pale); }
.resource-card-thumb.dark  { background: var(--ink); }
.resource-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.resource-tag {
  display: inline-block; font-size: .72rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--forest); background: var(--sage-pale); border: 1px solid var(--sage-light);
  padding: .2rem .7rem; border-radius: 100px;
  margin-bottom: .75rem; align-self: flex-start;
}
.resource-tag.teal { color: var(--teal-dark); background: var(--teal-pale); border-color: var(--teal-border); }
.resource-tag.honey { color: var(--honey-deep); background: var(--honey-pale); border-color: var(--honey-border); }
.resource-card h3 { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; color: var(--ink); line-height: 1.35; margin-bottom: .6rem; }
.resource-card p { font-size: .88rem; color: var(--ink-mid); line-height: 1.6; flex: 1; }
.resource-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--mist);
  font-size: .8rem; color: var(--ink-mid);
}
.resource-read-link { color: var(--forest); font-weight: 500; font-size: .85rem; display: flex; align-items: center; gap: 4px; transition: gap .2s; }
.resource-card:hover .resource-read-link { gap: 8px; }

/* Signposting cards (useful organisations) */
.link-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.link-card {
  display: block; background: var(--white); border: 1px solid var(--mist);
  border-radius: var(--r-sm); padding: 1.25rem 1.5rem;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.link-card:hover { box-shadow: 0 6px 24px rgba(28,43,34,.08); transform: translateY(-2px); border-color: var(--sage-light); }
.link-card h3 { font-family: var(--font-serif); font-size: 1rem; font-weight: 600; color: var(--forest); margin-bottom: .3rem; }
.link-card p { font-size: .84rem; color: var(--ink-mid); line-height: 1.55; }
.link-card .link-domain { display: block; margin-top: .6rem; font-size: .75rem; color: var(--honey-deep); font-weight: 500; }

/* Sparse decorative doodles (leaf / star), hidden from AT and on small screens */
.doodle { position: absolute; pointer-events: none; opacity: .5; }
@media (max-width: 768px) { .doodle { display: none; } }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  section { padding: 3.5rem 5vw; }
  footer { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 5vw; }
  footer > div:first-child { grid-column: auto; }
  .prose { padding: 2.5rem 5vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
