/* ============================================================
   LawPrep Co. — Apple/iOS theme layer (apple-glass-ui)
   Loads AFTER styles.css and ios-glass.css. Override-only:
   restyles existing classes to the light-and-airy Apple look.
   Remove this <link> to revert instantly to the original design.
   ============================================================ */

:root {
  --brand: #8B1A1A;     /* LawPrep crimson */
  --brand-2: #C9A84C;   /* LawPrep gold   */
  /* Apple display/text font everywhere */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* One font everywhere — kill the serif so nothing looks out of place */
  --font-serif: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
/* Force the single font onto every element that referenced a serif */
body, h1, h2, h3, h4, h5, h6, p, blockquote, .serif,
.story-block__quote, .value-quote blockquote, .hero__badge-item strong {
  font-family: var(--font-sans) !important;
}

/* Brand name "LawPrep Co." keeps its original wordmark font (Playfair Display) */
.nav__logo, .footer__brand, .portal-login__brand {
  font-family: 'Playfair Display', Georgia, serif !important;
}

/* ---- Canvas & base ---- */
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
p { color: var(--ink-soft); }

/* Justified body copy: neat, even edges on desktop AND mobile.
   Auto-hyphenation prevents big word-gaps on narrow screens. Centred
   intros stay centred; hero leads stay left (justify looks gappy on
   large focal text). */
p, blockquote, .value-quote blockquote {
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: none;
  hyphens: none;        /* never break/hyphenate words */
}
.section-header--center p,
.cta-banner p {
  text-align: center;
  -webkit-hyphens: manual; hyphens: manual;
}
.hero__sub,
.page-hero p,
.story-block__quote {
  text-align: left;
  -webkit-hyphens: manual; hyphens: manual;
}

/* Apple-style display headings: sans, large, tight tracking */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  color: var(--ink);
  letter-spacing: -0.021em;
  line-height: 1.08;
}
h1 { font-weight: 700; font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-weight: 600; letter-spacing: -0.015em; }
.serif { font-family: var(--font-sans) !important; }

/* ---- More air ---- */
.section { padding: var(--sp-12) 0; }
.section--off { background: var(--surface); }      /* white panels on grey canvas */
.section-header { margin-bottom: var(--sp-8); }
.section-header p { color: var(--ink-soft); font-size: 1.12rem; }

/* ============================================================
   NAV — frosted glass
   ============================================================ */
.nav {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.nav.is-scrolled {
  background: var(--glass-bg-strong);
  border-bottom-color: var(--hairline);
  box-shadow: var(--shadow-sm);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: var(--glass-bg-strong); }
}
.nav__logo { color: var(--ink); display: flex; align-items: center; }
.nav__logo span { color: var(--brand); }
.nav__logo-img { height: 60px; width: auto; display: block; }
@media (max-width: 600px) { .nav__logo-img { height: 46px; } }
.footer__brand-img { height: 54px; width: auto; display: block; margin-bottom: 1rem; }

/* ===== Exam-prep timetable — responsive (no horizontal scroll on mobile) ===== */
.ep-table { width: 100%; }
.ep-row { display: flex; align-items: center; border-bottom: 1px solid var(--hairline, #e3e3e8); }
.ep-row:last-child { border-bottom: none; }
.ep-head { background: var(--off-white, #faf7f2); font-size: 0.72rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--grey-mid); font-weight: 700; }
.ep-c { padding: 0.85rem 0.5rem; }
.ep-time { flex: 0 0 92px; padding-left: 1.25rem; font-weight: 600; font-size: 0.82rem; }
.ep-subj { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 0.92rem; }
.ep-unisa { flex: 0 0 96px; text-align: center; font-weight: 700; color: var(--brand); font-size: 0.82rem; white-space: nowrap; }
.ep-contact { flex: 0 0 138px; text-align: center; padding-right: 1.25rem; color: var(--grey-mid); font-size: 0.82rem; white-space: nowrap; }
.ep-head .ep-time, .ep-head .ep-subj { padding-top: 0.6rem; padding-bottom: 0.6rem; }

@media (max-width: 640px) {
  .ep-head { display: none; }
  .ep-row { flex-wrap: wrap; padding: 0.95rem 1.15rem; align-items: baseline; }
  .ep-c { padding: 0; }
  .ep-time { flex: 0 0 100%; order: 1; padding-left: 0; font-size: 0.78rem; color: var(--grey-mid); }
  .ep-subj { flex: 0 0 100%; order: 2; font-size: 1rem; margin: 0.12rem 0 0.4rem; }
  .ep-unisa { flex: 0 0 auto; order: 3; text-align: left; margin-right: 1.5rem; }
  .ep-contact { flex: 0 0 auto; order: 4; text-align: left; padding-right: 0; }
  .ep-unisa::before { content: "UNISA "; color: var(--grey-mid); font-weight: 600; }
  .ep-contact::before { content: "Contact "; color: var(--grey-mid); font-weight: 600; }
}
.nav__links a { color: var(--ink-soft); text-transform: none; letter-spacing: 0; font-size: 0.95rem; }
.nav__links a:hover, .nav__links a.active { color: var(--brand); }
.nav__toggle span { background: var(--ink); }

/* ============================================================
   BUTTONS — Apple pills
   ============================================================ */
.btn {
  border-radius: var(--r-pill);
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 1rem;
  padding: 0.78rem 1.6rem;
  border-width: 1px;
  transition: transform var(--dur-fast) var(--ease-spring),
              box-shadow var(--dur) var(--ease-out),
              filter var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--gold {
  background: var(--brand-2); border-color: var(--brand-2); color: #3A2E00;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand-2) 35%, transparent);
}
.btn--gold:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn--red, .btn--navy {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn--red:hover, .btn--navy:hover { filter: brightness(1.08); transform: translateY(-1px); background: var(--brand); }
/* On the now-light hero, the old white-outline button becomes a soft secondary */
.btn--outline {
  background: rgba(0,0,0,0.05); color: var(--ink); border-color: transparent;
}
.btn--outline:hover { background: rgba(0,0,0,0.09); color: var(--ink); }

/* ============================================================
   HERO — light & airy
   ============================================================ */
.hero {
  background:
    radial-gradient(70% 90% at 78% -10%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 60%),
    radial-gradient(50% 70% at 8% 0%, color-mix(in srgb, var(--brand-2) 14%, transparent), transparent 55%),
    var(--canvas);
  padding: var(--sp-16) 0 var(--sp-12);
}
.hero::before { display: none; }
.hero::after { background: var(--hairline); height: 1px; }
.hero h1 { color: var(--ink); }
.hero__sub { color: var(--ink-soft); font-size: 1.2rem; line-height: 1.55; }
.hero__eyebrow { color: var(--brand); }
.hero__eyebrow::before { background: var(--brand); }
.hero__badge-item strong { color: var(--brand); font-family: var(--font-sans); font-weight: 700; }
.hero__badge-item span { color: var(--ink-faint); text-transform: none; letter-spacing: 0; }

/* Split hero with video */
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-8);
  align-items: center;
}
.hero__media { display: flex; justify-content: center; }
.hero__videowrap { position: relative; width: 100%; max-width: 360px; }
.hero__video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  display: block;
}
.hero__unmute {
  position: absolute;
  bottom: 14px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 0.4em;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  padding: 0.45em 1em;
  font: inherit; font-size: 0.82rem; font-weight: 600;
  color: var(--ink); cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast);
}
.hero__unmute:active { transform: translateX(-50%) scale(0.96); }
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .hero__videowrap { max-width: 280px; }
}

/* Inner-page hero */
.page-hero {
  background:
    radial-gradient(60% 90% at 85% -20%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 60%),
    var(--canvas);
  border-bottom: 1px solid var(--hairline);
  padding: var(--sp-12) 0 var(--sp-8);
}
.page-hero .eyebrow { color: var(--brand); }
.page-hero h1 { color: var(--ink); }
.page-hero p { color: var(--ink-soft); }

/* ---- Eyebrow / divider accents ---- */
.eyebrow { color: var(--brand); letter-spacing: 0.08em; }
.divider { background: var(--brand); height: 3px; border-radius: 2px; }

/* ============================================================
   CARDS — rounded, soft shadow, hover lift
   ============================================================ */
.pillar-card,
.programme-card,
.value-card,
.this-sem-card {
  border: 1px solid var(--hairline);
  border-top: 1px solid var(--hairline);   /* drop the hard red top edge */
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-spring),
              box-shadow var(--dur) var(--ease-out);
}
.pillar-card:hover,
.programme-card:hover,
.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.programme-card--featured { border-color: color-mix(in srgb, var(--brand) 35%, var(--hairline)); }
.programme-card__tag { border-radius: var(--r-pill); }

/* Module tags / pills get soft rounding */
.module-tag { border-radius: var(--r-sm) !important; }
.module-tag code { border-radius: var(--r-xs); }

/* Pricing calculator + basket surfaces */
.calc, .calc__result, .basket, .calc__pill {
  border-radius: var(--r-lg);
}
.calc__pill { border-radius: var(--r-pill); }
.calc__result { box-shadow: var(--shadow-md); }

/* Generic dark accent panels (inline background:var(--navy)) — round them softly */
[style*="var(--navy)"] { border-radius: var(--r-lg); }
.timetable-row [style*="var(--navy)"],
.timetable-row [style*="var(--gold)"] { border-radius: 0; }  /* keep timetable cells crisp */

/* ============================================================
   PANELS — wrap flat content blocks into floating glass cards
   ("glass houses"). Apply .ag-panel to content groups that
   otherwise sit flat on the canvas.
   ============================================================ */
.ag-panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: transform var(--dur) var(--ease-spring),
              box-shadow var(--dur) var(--ease-out);
}
.ag-panel:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Keep currency + amount together (never split "R" onto its own line) */
.value-table td:last-child { white-space: nowrap; text-align: right; }
.price-item__price,
.calc__result-total,
.this-sem-card__code { white-space: nowrap; }

/* ============================================================
   FORMS — iOS field style (register, contact)
   ============================================================ */
input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], input[type="password"], input[type="search"],
input[type="date"], select, textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;          /* same height for EVERY field incl. password */
  font-size: 0.95rem;
  line-height: 1.4;
  border-radius: var(--r-md) !important;
  border: 1px solid var(--hairline-strong) !important;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
/* Match base specificity so password padding is never lost to the base rule */
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="search"] {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent) !important;
}

/* ============================================================
   FOOTER — soften the hard edges, keep it as a dark anchor
   ============================================================ */
.footer { border-top: 1px solid rgba(255,255,255,0.10); }

/* ============================================================
   MOTION — scroll reveal (tagged by ios-enhance.js)
   ============================================================ */
.ag-reveal { opacity: 0; transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.ag-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .ag-reveal { opacity: 1 !important; transform: none !important; }
}
