/* ============================================================
   PTE Perfect 90 — Design tokens & global styles (dark theme)
   Edit tokens here; page content lives in each .html file.
   ============================================================ */

:root {
  /* Color — dark theme */
  --bg: #0b1220;          /* page background */
  --surface: #111c30;     /* cards, tables, tasks */
  --ink: #e9effa;         /* headings, strong text */
  --blue: #5b8df5;        /* primary accent on dark */
  --blue-deep: #1a56db;   /* solid buttons / gradients */
  --blue-bright: #93b4f8; /* link hover, template placeholders */
  --sky: #16233c;         /* tinted washes (dark equivalent of pale sky) */
  --sky-line: #2a4570;    /* borders on tinted surfaces */
  --white: #ffffff;       /* reserved: text on solid blue */
  --slate: #aab7cd;       /* body text */
  --slate-soft: #7e8ca6;  /* captions, meta */
  --gold: #ffb020;        /* reserved: the "90" marker only */
  --line: #1f2d49;        /* hairline borders */

  /* Type */
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Public Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;

  /* Layout */
  --container: 1120px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--slate);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-bright); }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Utility text ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--slate);
  max-width: 62ch;
}

.mono { font-family: var(--font-mono); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  white-space: nowrap;
}

.brand .brand-90 {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--white);
  background: var(--blue-deep);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover { background: var(--sky); color: var(--blue-bright); }

.nav-links a.active {
  background: var(--blue-deep);
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  font-size: 1.1rem;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.5rem 1rem 1rem;
    display: none;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 0.75rem; }
}

/* ---------- Score rail (signature element) ---------- */
.score-rail {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky) 0%, #3563b8 55%, var(--blue) 100%);
  margin: 2rem 0 0.75rem;
}

.score-rail .rail-marker {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(30%, -50%);
  background: var(--gold);
  color: #0a1f44;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.2em 0.5em;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.score-rail-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--slate-soft);
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(91, 141, 245, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--sky) 100%);
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}

.hero-inner { max-width: 780px; }

.hero .btn-row { margin-top: 1.75rem; }

/* Page hero (interior pages) */
.page-hero {
  background: linear-gradient(180deg, var(--bg), var(--sky));
  border-bottom: 1px solid var(--line);
  padding: 3rem 0 2.25rem;
}

.page-hero .lead { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--blue-deep);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: var(--surface);
  color: var(--blue);
  border-color: var(--sky-line);
}

.btn-ghost:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-tint { background: var(--sky); }
.section-head { max-width: 680px; margin-bottom: 2.25rem; }
.section-head p { margin-bottom: 0; }

/* ---------- Card grids ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

a.card { color: inherit; display: block; }

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--sky-line);
}

.card h3 { margin-bottom: 0.4rem; }
.card p { margin-bottom: 0; font-size: 0.94rem; }

.card .card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--sky);
  color: var(--blue);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.card .card-link {
  display: inline-block;
  margin-top: 0.9rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--blue);
}

/* ---------- Task blocks (module pages) ---------- */
.task {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: 90px;
}

.task-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.task-num {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--blue);
  background: var(--sky);
  border-radius: var(--radius-sm);
  padding: 0.35em 0.6em;
  margin-top: 0.2em;
}

.task-head h3 { font-size: 1.35rem; margin-bottom: 0.15rem; }

.task-skills {
  font-size: 0.85rem;
  color: var(--slate-soft);
  font-weight: 500;
}

/* Data strip — exam metadata in mono, the test's own vocabulary */
.data-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
  padding: 0;
  list-style: none;
}

.data-strip li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink);
  background: var(--sky);
  border: 1px solid var(--sky-line);
  border-radius: 6px;
  padding: 0.3em 0.65em;
  margin: 0;
}

.data-strip li strong { color: var(--blue); font-weight: 600; }

/* ---------- Callouts ---------- */
.template-box,
.tip-box,
.warning-box,
.example-box {
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin: 1.25rem 0;
}

.template-box {
  background: var(--sky);
  border: 1px solid var(--sky-line);
}

.template-box h4,
.tip-box h4,
.warning-box h4,
.example-box h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.template-box .placeholder {
  font-weight: 600;
  color: var(--blue-bright);
}

.tip-box {
  background: #0e2419;
  border: 1px solid #1e4632;
}

.tip-box h4 { color: #4cc98a; }

.warning-box {
  background: #2a2010;
  border: 1px solid #4a3a1a;
}

.warning-box h4 { color: #f0b95a; }

.example-box {
  background: var(--bg);
  border: 1px dashed var(--sky-line);
}

.template-box p:last-child,
.tip-box p:last-child,
.warning-box p:last-child,
.example-box p:last-child,
.template-box ul:last-child,
.tip-box ul:last-child,
.warning-box ul:last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table th {
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

.data-table td {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--line);
}

.data-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.025); }

.data-table td.num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
}

.data-table .hl { background: var(--sky); font-weight: 600; }

/* ---------- In-page task nav ---------- */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
}

.jump-nav a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35em 0.9em;
  color: var(--ink);
}

.jump-nav a:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Next/prev pager ---------- */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pager a {
  flex: 1 1 240px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pager a:hover { border-color: var(--blue); box-shadow: var(--shadow); }

.pager .pager-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate-soft);
  margin-bottom: 0.25rem;
}

.pager .pager-next { text-align: right; }

/* ---------- Stats band ---------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

.stat .stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  display: block;
}

.stat .stat-label {
  font-size: 0.85rem;
  color: var(--slate-soft);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, #0b2e7e, var(--blue-deep));
  color: var(--white);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  text-align: center;
}

.cta-band h2 { color: var(--white); }
.cta-band p { color: #d8e4fb; max-width: 56ch; margin: 0 auto 1.5rem; }
.cta-band .btn-primary { background: var(--white); color: #0b2e7e; }
.cta-band .btn-primary:hover { background: #dbe7fd; color: #0b2e7e; }

/* ---------- Footer ---------- */
.site-footer {
  background: #070e1c;
  color: #b9c6de;
  margin-top: 4rem;
  padding: 3rem 0 1.5rem;
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: #b9c6de; }
.site-footer a:hover { color: var(--white); }

.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--white); margin-bottom: 0.5rem; }
.footer-note { max-width: 40ch; font-size: 0.85rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .task { padding: 1.4rem; }
  .cta-band { padding: 2.25rem 1.5rem; }
}

/* ---------- Contact form ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 800px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-field { margin-bottom: 1.25rem; }

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91, 141, 245, 0.2);
}

.form-field textarea { resize: vertical; min-height: 140px; }

.form-note {
  font-size: 0.82rem;
  color: var(--slate-soft);
  margin-top: 1rem;
  margin-bottom: 0;
}

/* Honeypot field — hidden from humans, visible to bots */
.hp-field { display: none; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .pager a { transition: none; }
}
