/* ==========================================================================
   Dr. Sahota Chemistry Tutoring — stylesheet
   Single file, no build step, no framework. Edit freely.
   ========================================================================== */

:root {
  --ink: #101820;
  --ink-2: #2b3742;
  --muted: #5a6672;
  --line: #e2e7ea;
  --bg: #ffffff;
  --bg-soft: #f5f8f7;
  --brand: #0f4c4a;
  --brand-dark: #093332;
  --brand-light: #e7f1f0;
  --accent: #9a4a12;
  --accent-light: #fdf3e9;
  --star: #b8860b;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .04), 0 8px 24px rgba(16, 24, 32, .06);
  --maxw: 1120px;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

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

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.05rem); margin-top: 2em; }
h3 { font-size: 1.22rem; margin-top: 1.6em; }
h4 { font-size: 1.05rem; margin-top: 1.4em; font-family: var(--font-sans); font-weight: 700; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* --- Skip link ----------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

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

/* --- Header -------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(150%) blur(6px);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 70px; }
.brand {
  font-family: var(--font-serif); font-weight: 600; font-size: 1.12rem;
  color: var(--ink); text-decoration: none; line-height: 1.15; flex-shrink: 0;
}
.brand span { display: block; font-family: var(--font-sans); font-size: .72rem;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-size: .93rem; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.header-cta { flex-shrink: 0; }

@media (max-width: 940px) {
  .site-nav { width: 100%; margin-left: 0; order: 3; border-top: 1px solid var(--line); padding: 8px 0; }
  .site-nav ul { gap: 14px; }
  .header-inner { flex-wrap: wrap; padding-top: 10px; }
  .site-header { position: static; }
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-block; padding: 13px 24px; border-radius: var(--radius);
  font-weight: 600; font-size: .98rem; text-decoration: none; text-align: center;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-sm { padding: 9px 16px; font-size: .88rem; }

/* --- Hero ---------------------------------------------------------------- */
.hero { background: linear-gradient(180deg, var(--brand-light) 0%, #fff 100%); padding: 64px 0 52px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .lede { font-size: 1.16rem; color: var(--ink-2); max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-portrait {
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
  background: #fff; border: 1px solid var(--line);
}
.portrait-placeholder {
  aspect-ratio: 4/5; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; background: var(--bg-soft); color: var(--muted);
  text-align: center; padding: 24px; font-size: .9rem;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-portrait { max-width: 320px; }
  .hero { padding: 40px 0 36px; }
}

/* --- Trust bar ----------------------------------------------------------- */
.trustbar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.trustbar ul {
  list-style: none; margin: 0; padding: 18px 0; display: grid;
  grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center;
}
.trustbar li { font-size: .9rem; color: var(--muted); }
.trustbar strong { display: block; font-family: var(--font-serif); font-size: 1.5rem; color: var(--brand); font-weight: 600; }
@media (max-width: 700px) { .trustbar ul { grid-template-columns: repeat(2, 1fr); } }

/* --- Sections ------------------------------------------------------------ */
section { scroll-margin-top: 90px; }
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.section > .wrap > h2:first-child { margin-top: 0; }
.eyebrow {
  font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 .6em;
}

/* --- Cards --------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card-link { font-weight: 600; text-decoration: none; }
.card-link::after { content: " \2192"; }

/* --- Lists --------------------------------------------------------------- */
.checklist { list-style: none; padding: 0; margin: 0 0 1.2em; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: .6em; }
.checklist li::before {
  content: ""; position: absolute; left: 6px; top: .55em; width: 7px; height: 12px;
  border-right: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand);
  transform: rotate(42deg);
}
.plain { list-style: none; padding: 0; margin: 0; }

/* --- Steps --------------------------------------------------------------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.steps li { position: relative; padding-left: 56px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 1rem; font-family: var(--font-sans);
}
.steps h3 { margin: 4px 0 .3em; font-size: 1.08rem; }

/* --- Testimonials -------------------------------------------------------- */
.quote {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius); padding: 22px 24px; margin: 0 0 20px;
}
.quote p { font-family: var(--font-serif); font-size: 1.06rem; color: var(--ink); margin-bottom: .7em; }
.quote footer { font-size: .87rem; color: var(--muted); }
.stars { color: var(--star); letter-spacing: 2px; font-size: .95rem; }

/* --- FAQ ----------------------------------------------------------------- */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px;
  margin-bottom: 12px; background: #fff;
}
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--ink); padding: 16px 0;
  font-size: 1.02rem; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > *:not(summary) { padding-bottom: 4px; }

/* --- Tables -------------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; color: var(--ink); background: var(--bg-soft); }

/* --- Pricing ------------------------------------------------------------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.price-card { text-align: center; }
.price-card .price {
  font-family: var(--font-serif); font-size: 2.4rem; color: var(--brand);
  display: block; margin: .2em 0 0; font-weight: 600;
}
.price-card .per { color: var(--muted); font-size: .9rem; display: block; margin-bottom: 1em; }

/* --- Callout ------------------------------------------------------------- */
.callout {
  background: var(--accent-light); border: 1px solid #f0dcc4; border-radius: var(--radius);
  padding: 18px 22px; margin: 1.6em 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent); }

/* --- CTA band ------------------------------------------------------------ */
.cta-band { background: var(--brand); color: #fff; padding: 52px 0; text-align: center; }
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: #d5e6e4; max-width: 46em; margin-left: auto; margin-right: auto; }
.cta-band .btn-primary { background: #fff; color: var(--brand-dark); }
.cta-band .btn-primary:hover { background: #e7f1f0; color: var(--brand-dark); }

/* --- Forms --------------------------------------------------------------- */
.form { display: grid; gap: 16px; max-width: 560px; }
.field label { display: block; font-weight: 600; font-size: .92rem; color: var(--ink); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #cdd6da; border-radius: var(--radius);
  font: inherit; font-size: .97rem; background: #fff; color: var(--ink);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.hp { position: absolute; left: -9999px; }

/* --- Breadcrumbs --------------------------------------------------------- */
.crumbs { font-size: .85rem; color: var(--muted); padding: 16px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; }

/* --- Article ------------------------------------------------------------- */
.article-meta { color: var(--muted); font-size: .88rem; margin-bottom: 2em; }
.article-body h2 { margin-top: 1.8em; }
.article-body ul, .article-body ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.article-body li { margin-bottom: .5em; }
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; }
.post-list li { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.post-list li:last-child { border-bottom: 0; }
.post-list h3 { margin: 0 0 .35em; }
.post-list a { text-decoration: none; }
.post-list a:hover { text-decoration: underline; }

/* --- Local page chips ---------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 1.4em; }
.chips li {
  background: var(--brand-light); color: var(--brand-dark); border-radius: 999px;
  padding: 5px 14px; font-size: .87rem; font-weight: 500;
}

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #b9c3cb; padding: 48px 0 28px; margin-top: 0; font-size: .93rem; }
.site-footer h2, .site-footer h3 { color: #fff; font-size: 1rem; font-family: var(--font-sans); margin: 0 0 .8em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer a { color: #d7dfe5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5em; }
.footer-bottom {
  border-top: 1px solid #2a3540; margin-top: 34px; padding-top: 20px;
  font-size: .84rem; color: #8a97a2; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }

/* --- Utility ------------------------------------------------------------- */
.mb0 { margin-bottom: 0; }
.mt0 { margin-top: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.editnote {
  background: #fff8e1; border: 1px dashed #d9a441; border-radius: var(--radius);
  padding: 14px 18px; margin: 1.4em 0; font-size: .9rem; color: #6b5010;
}
.editnote strong { color: #8a6410; }

@media print {
  .site-header, .site-footer, .cta-band, .hero-actions { display: none; }
}

/* --- Two-up card grid (used where there are exactly four cards) ---------- */
.cards.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .cards.two { grid-template-columns: 1fr; } }

/* --- Portrait ------------------------------------------------------------ */
.hero-portrait { margin: 0; position: relative; }
.hero-portrait img {
  display: block; width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover;
}
.hero-portrait figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.62) 100%);
  color: #fff; font-size: .88rem; text-align: center; letter-spacing: .01em;
}
.about-intro {
  display: grid; grid-template-columns: 150px 1fr; gap: 26px;
  align-items: start; margin: 1.2em 0 1.8em;
}
.about-intro .lede { margin-top: 0; }
.portrait-round {
  width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; box-shadow: var(--shadow);
}
@media (max-width: 640px) {
  .about-intro { grid-template-columns: 1fr; justify-items: center; text-align: left; }
}
