/* =====================================================================
   Prantik Swain · DECA Coaching — site stylesheet
   Source of truth: Brand Essence Directions/ (tokens.css + components/bundle.css).
   Sections:
     1. Tokens            (copied from tokens.css)
     2. Base + layout     (page shell, sections, grids, hero)
     3. Components        (from components/bundle.css, prefix ps-)
     4. Site additions    (tables, lists, tooltip, prose, phones)
   Fonts (Commissioner + Source Sans 3) load from Google Fonts in each page <head>.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --paper: #faf6ef;
  --surface: #ffffff;
  --tint: #f1e8da;
  --tint-strong: #eadfcf;
  --border: #e7ded3;
  --border-strong: #d9cdbd;
  --divider: #efe7dc;
  --ink: #2a2420;
  --ink-soft: #4e433b;
  --muted: #66594f;
  --accent: #1d6a72;
  --accent-hover: #165860;
  --accent-press: #134b51;
  --accent-tint: #e3eeef;
  --on-accent: #ffffff;
  --neutral-bar: #8c7f73;
  --shadow-card: 0 1px 2px rgba(42,36,32,0.05), 0 8px 24px rgba(42,36,32,0.05);
  --shadow-raised: 0 2px 4px rgba(42,36,32,0.06), 0 12px 32px rgba(42,36,32,0.08);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-18: 72px;
  --space-30: 120px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-round: 50%;

  --content-max: 1160px;
  --text-max: 780px;
  --gutter: clamp(20px, 4vw, 48px);

  --font-display: Commissioner, "Source Sans 3", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- 2. Base + layout ---------- */
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body { margin: 0; }
.ps-root { font-family: var(--font-body); font-size: 18px; line-height: 1.65; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
.ps-root *, .ps-root *::before, .ps-root *::after { box-sizing: border-box; }
.ps-root p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

/* Visually hidden, still read by screen readers */
.ps-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Skip link: hidden until focused */
.ps-skip { position: absolute; left: 16px; top: -100px; z-index: 30; background: var(--surface); color: var(--accent); padding: 12px 16px; border-radius: var(--radius-md); font-weight: 700; }
.ps-skip:focus { top: 16px; outline: 3px solid var(--accent); outline-offset: 2px; }

/* Content width: 1160px of content inside the page gutter */
.ps-wrap { max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }

/* Section rhythm: 120px desktop, 72px phones. Two plain sections in a row share one gap. */
.ps-section { padding-block: var(--space-30); }
.ps-section--tint { background: var(--tint); }
.ps-section:not(.ps-section--tint) + .ps-section:not(.ps-section--tint) { padding-top: 0; }
.ps-section--hero { padding-top: var(--space-14); }

/* Section header to content: 40px */
.ps-stack { display: flex; flex-direction: column; gap: var(--space-10); }
.ps-text { max-width: var(--text-max); }

/* Card grids */
.ps-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.ps-grid--stats { gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.ps-grid--steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.ps-grid--quotes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

/* Hero: text and photo side by side on desktop, stacked on phones and tablets */
.ps-hero { display: grid; gap: var(--space-14); align-items: center; }
.ps-hero__text { display: flex; flex-direction: column; gap: var(--space-6); }
@media (min-width: 960px) {
  .ps-hero { grid-template-columns: 1fr 1.1fr; }
}
.ps-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) 28px; }
.ps-proof { font-size: 18px; color: var(--ink-soft); max-width: 520px; }
.ps-proof strong { color: var(--ink); }

/* ---------- 3. Components (from components/bundle.css) ---------- */

/* Headings */
.ps-eyebrow { margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.4; font-weight: 700; color: var(--accent); }
.ps-chip { display: inline-block; margin: 0; background: var(--tint); color: var(--ink-soft); border-radius: var(--radius-sm); padding: 4px 12px; font-size: 15px; font-weight: 600; }
.ps-h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 4.8vw, 66px); line-height: 1.1; letter-spacing: -0.015em; }
.ps-h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.15; }
.ps-h2--panel { font-size: clamp(28px, 3vw, 36px); }
.ps-h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.3; }
.ps-lead { margin: 0; font-size: 20px; line-height: 1.6; color: var(--ink-soft); }
.ps-section-head { display: flex; flex-direction: column; gap: var(--space-2); }
.ps-section-head .ps-lead { max-width: 560px; }
.ps-section-head--center { align-items: center; text-align: center; }

/* Button */
.ps-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 20px; border-radius: var(--radius-md); border: 1.5px solid transparent; font-family: var(--font-body); font-size: 17px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.ps-btn--lg { padding: 18px 28px; font-size: 18px; }
.ps-btn--primary { background: var(--accent); color: var(--on-accent); }
.ps-btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.ps-btn--primary:active { background: var(--accent-press); }
.ps-btn--secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.ps-btn--secondary:hover { background: var(--accent-tint); color: var(--accent-press); }
.ps-btn--secondary:active { background: #d3e4e6; color: var(--accent-press); }
.ps-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.ps-btn[aria-disabled="true"], .ps-btn:disabled { background: var(--border-strong); border-color: var(--border-strong); color: var(--muted); cursor: not-allowed; }

/* Text link with arrow */
.ps-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(29,106,114,.35); transition: color .15s ease, text-decoration-color .15s ease; }
.ps-link:hover { color: var(--accent-press); text-decoration-color: currentColor; }
.ps-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Nav: wordmark left, three links and the booking button right.
   Floating header: stays at the top while the page scrolls, so booking is always one click away. */
.ps-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--border); padding-block: var(--space-4); }
html { scroll-padding-top: 104px; }
.ps-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) 26px; }
/* Logo: the Case Simplified wordmark file, used as-is (never redrawn or recoloured) */
.ps-wordmark { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 44px; text-decoration: none; margin-right: auto; }
.ps-wordmark img { display: block; height: 28px; width: auto; }
.ps-wordmark span { font-size: 15px; line-height: 1.2; color: var(--muted); }
.ps-wordmark:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.ps-nav__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; }
.ps-navlink { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: 17px; font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; transition: color .15s ease, border-color .15s ease; }
.ps-navlink:hover { color: var(--accent); }
.ps-navlink[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.ps-navlink:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Phones: two lines, never a hamburger. Line 1: wordmark + booking button. Line 2: the three links. */
@media (max-width: 720px) {
  .ps-header { padding-block: var(--space-2); }
  html { scroll-padding-top: 124px; }
  .ps-nav { gap: 0 10px; }
  .ps-wordmark { gap: 4px; }
  .ps-wordmark img { height: 24px; }
  .ps-wordmark span { font-size: 13px; }
  .ps-nav__cta { order: 2; padding: 12px; font-size: 15px; }
  .ps-nav__links { order: 3; flex-basis: 100%; gap: 0 22px; }
  .ps-navlink { font-size: 16px; }
}
/* Narrowest phones: logo at 22px (still above its 120px minimum width) so logo and button share a line */
@media (max-width: 374px) {
  .ps-nav { gap: 0 8px; }
  .ps-wordmark img { height: 22px; }
  .ps-nav__cta { padding: 10px; font-size: 14px; }
}

/* Cards and panels */
.ps-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: var(--space-8); }
.ps-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-2xl); box-shadow: var(--shadow-card); padding: clamp(24px, 3.5vw, 44px); }
@media (max-width: 480px) { .ps-card { padding: var(--space-6); } }

/* Stat */
.ps-stat { background: var(--paper); border-radius: var(--radius-lg); padding: var(--space-6); display: flex; flex-direction: column; gap: 6px; }
.ps-stat__num { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 1; color: var(--accent); font-variant-numeric: lining-nums tabular-nums; }
.ps-stat__label { margin: 4px 0 0; font-weight: 600; }
.ps-stat__context { margin: 0; font-size: 16px; color: var(--muted); }
.ps-compare { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.ps-compare__row { display: flex; align-items: center; gap: 10px; }
.ps-compare__row > span:first-child { flex: 0 0 92px; }
.ps-bar { flex: 1 1 auto; height: 8px; border-radius: 4px; background: var(--border); display: flex; overflow: hidden; }
.ps-bar > i { display: block; border-radius: 4px; background: var(--accent); }
.ps-bar--neutral > i { background: var(--neutral-bar); }

/* Timeline: oldest first, one key item */
.ps-timeline { list-style: none; margin: 0; padding: 14px 0 0; display: flex; flex-wrap: wrap; row-gap: 48px; }
.ps-tl { flex: 1 1 170px; position: relative; border-top: 3px solid #e0d3c2; padding: 32px 20px 0 0; display: flex; flex-direction: column; gap: 4px; }
.ps-tl::before { content: ""; position: absolute; top: -10px; left: 0; width: 17px; height: 17px; border-radius: var(--radius-round); background: var(--paper); border: 3px solid var(--accent); box-sizing: border-box; }
.ps-tl__date { font-size: 15px; font-weight: 600; color: var(--muted); }
.ps-tl__place { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.2; }
.ps-tl__event { font-size: 16px; color: var(--ink-soft); }
.ps-tl--key { flex: 1.3 1 210px; border-top-color: var(--accent); padding-top: 24px; }
.ps-tl--key::before { top: -14px; width: 25px; height: 25px; background: var(--accent); border: 5px solid var(--paper); box-shadow: 0 0 0 2px var(--accent); }
.ps-tl--key .ps-tl__date, .ps-tl--key .ps-tl__place { color: var(--accent); }
.ps-tl--key .ps-tl__place { font-size: 32px; line-height: 1.15; }

/* Step */
.ps-step { background: var(--surface); border-radius: var(--radius-xl); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.ps-step__num { width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--accent-tint); color: var(--accent); font-family: var(--font-display); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ps-step p { margin: 0; color: var(--ink-soft); }

/* Price */
.ps-price { display: flex; flex-direction: column; gap: 16px; }
.ps-price__amount { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 48px; line-height: 1; font-variant-numeric: lining-nums; }
.ps-price__amount small { font-family: var(--font-body); font-weight: 400; font-size: 18px; color: var(--muted); }
.ps-price__for { margin: 0; color: var(--ink-soft); }
.ps-price ul { margin: 0; padding-left: 20px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 6px; }
.ps-price__more { border-top: 1px solid var(--divider); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }

/* Testimonial */
.ps-quote { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.ps-quote blockquote { margin: 0; font-size: 22px; line-height: 1.5; }
.ps-quote figcaption { display: flex; flex-direction: column; gap: 2px; }
.ps-quote figcaption span { font-size: 16px; color: var(--muted); }
.ps-journey { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; }
.ps-journey li { flex: 1 1 120px; background: var(--paper); border-radius: var(--radius-md); padding: 12px 14px; }
.ps-journey li b { display: block; }
.ps-journey li:last-child { background: var(--accent-tint); color: var(--accent-press); }

/* Photo */
.ps-photo { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ps-photo__frame { border-radius: var(--radius-2xl); background: var(--tint-strong); overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: 15px; }
.ps-photo__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-photo__frame--3x2 { aspect-ratio: 3 / 2; }
.ps-photo figcaption { font-size: 15px; color: var(--muted); padding-left: 4px; }

/* Footer */
.ps-footer { border-top: 1px solid var(--border); padding-block: var(--space-6); }
.ps-footer__in { display: flex; flex-wrap: wrap; gap: 0 32px; justify-content: space-between; font-size: 16px; color: var(--muted); }
.ps-footer__in p { padding-block: 4px; }
.ps-footer a { color: var(--ink); display: inline-block; padding-block: 10px; }
.ps-footer a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ps-footer__note { flex-basis: 100%; }
.ps-footer__brand { display: flex; align-items: center; gap: 10px; }
.ps-footer__brand img { flex: none; height: 24px; width: auto; }

/* ---------- 4. Site additions ---------- */

/* Long-form paragraphs (Why DECA, Beyond DECA): body-l in a reading column */
.ps-prose { max-width: var(--text-max); font-size: 20px; line-height: 1.6; color: var(--ink-soft); }
@media (max-width: 640px) { .ps-prose { font-size: 18px; line-height: 1.65; } }

/* Info tooltip on a stat: hover or focus on desktop, tap on touch (js/main.js) */
.ps-info-wrap { position: relative; display: flex; align-items: center; gap: var(--space-2); }
.ps-info { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -6px 0; padding: 0; border: 0; background: transparent; cursor: pointer; color: var(--accent); }
.ps-info span { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 2px solid currentColor; border-radius: 50%; font-family: Georgia, serif; font-size: 15px; font-weight: 700; font-style: italic; line-height: 1; transition: background-color .15s ease, color .15s ease; }
.ps-info:hover span, .ps-info[aria-expanded="true"] span { background: var(--accent); color: var(--on-accent); }
.ps-info:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; border-radius: var(--radius-md); }
.ps-tip { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 10; width: min(360px, calc(100vw - 2 * var(--gutter))); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); padding: var(--space-4) var(--space-5); font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.ps-info-wrap.is-open .ps-tip, .ps-info:focus-visible + .ps-tip { display: block; }
@media (hover: hover) { .ps-info:hover + .ps-tip, .ps-tip:hover { display: block; } }
/* Phones: the tip spans the stat card instead of running off the screen */
@media (max-width: 640px) {
  .ps-stat { position: relative; }
  .ps-info-wrap { position: static; }
  .ps-tip { top: 76px; left: var(--space-3); right: var(--space-3); width: auto; }
}

/* Small helpers */
.ps-plain-list { list-style: none; margin: 0; padding: 0; }
.ps-center { text-align: center; }
.ps-card--flush { padding: 0; overflow: hidden; }

/* Inclusion list inside a card: rows split by dividers */
.ps-list { list-style: none; margin: 0; padding: 0; }
.ps-list li { padding-block: var(--space-4); border-top: 1px solid var(--divider); color: var(--ink-soft); }
.ps-list li:first-child { border-top: 0; padding-top: 0; }
.ps-list li:last-child { padding-bottom: 0; }

/* Compare table: scrolls sideways on phones */
.ps-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-xl); }
.ps-table-wrap:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.ps-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 17px; }
.ps-table th, .ps-table td { text-align: left; vertical-align: top; padding: 16px 20px; border-top: 1px solid var(--divider); }
.ps-table thead th { border-top: 0; font-family: var(--font-display); font-size: 20px; line-height: 1.3; }
.ps-table tbody th { font-weight: 600; color: var(--ink); width: 26%; }
.ps-table td { color: var(--ink-soft); }
.ps-table .ps-table__price { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--ink); }
.ps-table .ps-table__none { color: var(--muted); }

/* For schools panel: text left, proof right */
.ps-schools { display: grid; gap: var(--space-10); align-items: center; }
.ps-schools__text { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
@media (min-width: 900px) { .ps-schools { grid-template-columns: 1.5fr 1fr; } }

/* Final booking band */
.ps-cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-6); max-width: var(--text-max); margin: 0 auto; }


/* Phones */
@media (max-width: 640px) {
  .ps-section { padding-block: var(--space-18); }
  .ps-section--hero { padding-top: var(--space-6); }
  .ps-hero { gap: var(--space-10); }
  .ps-stat__num { font-size: 44px; }
  .ps-tl--key .ps-tl__place { font-size: 28px; }
  .ps-quote blockquote { font-size: 20px; }
  .ps-btn--lg { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ps-root *, .ps-root *::before, .ps-root *::after { transition: none !important; }
}
