/* ==========================================================
   Naman Tandon · IB Tutoring
   Palette is taken from the handwritten notes: warm paper,
   navy/blue ink, green and orange highlighter.
   ========================================================== */

:root {
  --paper: #fbf8f1;
  --paper-tint: #f4efe3;
  --card: #ffffff;
  --ink: #1d2540;
  --ink-soft: #4a5270;
  --line: #e4ddcd;

  --blue: #2f4fb8;
  --blue-wash: #e3e8fb;
  --green: #2f8a4c;
  --green-wash: #dff1e3;
  --orange: #e8892b;
  --orange-wash: #fde9d3;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 37, 64, .06), 0 8px 24px rgba(29, 37, 64, .06);
  --max: 1120px;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-hand: "Caveat", "Comic Sans MS", cursive;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Safety net: nothing may ever push the page sideways on a phone.
     'clip' (unlike 'hidden') keeps the sticky header working. */
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}

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

.hidden { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  font: 600 16px/1 var(--font-body);
  padding: 15px 24px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--blue); border-color: var(--blue); transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.btn-small { padding: 10px 18px; font-size: 15px; white-space: nowrap; }
.btn-full { width: 100%; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 248, 241, .9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}
.brand-tag {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--orange);
  font-weight: 700;
}

.site-header nav { margin-left: auto; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.nav-links a:hover { color: var(--ink); }

/* ---------- Hero ---------- */

.hero { padding: 72px 0 48px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 16px;
}

h1 { font-size: clamp(36px, 5vw, 56px); }

/* highlighter effect, like the notes */
.mark {
  background: linear-gradient(transparent 58%, var(--orange-wash) 58%, var(--orange-wash) 92%, transparent 92%);
  padding: 0 .1em;
}

.lead {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 0 32px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-photo {
  position: relative;
  margin: 0;
}
.hero-photo img {
  border-radius: 24px;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transform: rotate(1.5deg);
  border: 8px solid #fff;
}
.scribble {
  position: absolute;
  left: -48px;
  bottom: 40px;
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 700;
  color: var(--orange);
  background: var(--paper);
  padding: 4px 14px;
  border: 2px solid var(--orange);
  border-radius: 12px;
  transform: rotate(-4deg);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 56px 0 0;
}
.stats > div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.stats dt {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 500;
}
.stats dd {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
}
.stats small { font-size: 18px; color: var(--ink-soft); }
.stats dd.dd-text { font-size: 21px; line-height: 1.25; margin-top: 8px; }

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section-tint { background: var(--paper-tint); }

.section-title { font-size: clamp(30px, 4vw, 40px); }

.section-lead {
  color: var(--ink-soft);
  font-size: 18px;
  max-width: 38em;
  margin: 0 0 40px;
}

/* ---------- Subjects ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.card h3 { font-size: 24px; margin: 0; }

.pill {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}
.pill-blue { background: var(--blue-wash); color: var(--blue); }
.pill-green { background: var(--green-wash); color: var(--green); }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li {
  position: relative;
  padding: 8px 0 8px 30px;
  border-top: 1px dashed var(--line);
}
.ticks li:first-child { border-top: 0; }
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  top: 7px;
  font-family: var(--font-hand);
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.steps li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--green);
  border-radius: 50%;
  font-family: var(--font-hand);
  font-size: 26px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 16px;
}
.steps h3 { font-size: 22px; }
.steps p { margin: 0; color: var(--ink-soft); }

/* ---------- Notes ---------- */

.notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
}
.notes figure { margin: 0; }
.note-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform .2s ease;
}
.notes figure:nth-child(1) .note-thumb { transform: rotate(-1.2deg); }
.notes figure:nth-child(2) .note-thumb { transform: rotate(1.2deg); }
.notes .note-thumb:hover { transform: rotate(0) scale(1.02); }
.note-thumb:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.notes figcaption {
  margin-top: 16px;
  text-align: center;
  color: var(--ink-soft);
}
.notes figcaption strong { color: var(--ink); }

/* ---------- Lightbox ---------- */

#lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 760px);
  max-height: 92vh;
}
#lightbox::backdrop { background: rgba(20, 24, 40, .8); }
#lightbox img {
  max-height: 90vh;
  width: auto;
  border-radius: 10px;
}
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 64px;
  align-items: start;
}
.about-photo {
  order: 2; /* photo on the right, so Naman faces the text */
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 8px solid #fff;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  position: sticky;
  top: 100px;
}
.about-copy > p { color: var(--ink-soft); }

.results {
  margin-top: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.results h3 { font-size: 20px; }
.results table { width: 100%; border-collapse: collapse; }
.results td, .results th { padding: 7px 0; text-align: left; }
.results td:last-child {
  text-align: right;
  font-family: var(--font-hand);
  font-size: 24px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}
.results .group th {
  padding-top: 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green);
  border-bottom: 1px solid var(--line);
}
.results tbody:first-of-type .group th { padding-top: 4px; }
.results tfoot td {
  border-top: 2px solid var(--ink);
  padding-top: 12px;
  font-weight: 600;
}
.results tfoot td:last-child { color: var(--orange); font-size: 30px; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.contact-alt { color: var(--ink-soft); }

.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.field textarea { resize: vertical; }

.form-error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--orange-wash);
  color: #8a4a0f;
  font-size: 15px;
}
.form-error[hidden] { display: none; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-wash);
}

/* ---------- Language switch ---------- */

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--card);
}
.lang-switch button {
  font: 600 13px/1 var(--font-body);
  letter-spacing: .04em;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lang-switch button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- Pricing ---------- */

.prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 820px;
}
.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.price-card-feature { border: 2px solid var(--orange); }
.price-card h3 { font-size: 22px; margin-bottom: 4px; }
.price-card p { color: var(--ink-soft); margin: 0 0 24px; }
.price-card .price {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  margin: 8px 0 16px;
}
.price-card-feature .price { color: var(--orange); }
.price .per {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-left: 6px;
}
.price-card .btn { margin-top: auto; text-align: center; }

.tiers { list-style: none; margin: 0; padding: 0; }
.tiers li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px dashed var(--line);
}
.tier-who { font-weight: 600; display: flex; flex-direction: column; }
.tier-who small { font-weight: 400; font-size: 14px; color: var(--green); }
.tier-price {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  white-space: nowrap;
}
.tier-price .per { font-size: 15px; margin-left: 4px; }

/* ---------- WhatsApp ---------- */

.whatsapp-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.wa-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: #25d366;
}
.whatsapp-card h3 { font-size: 20px; margin-bottom: 4px; }
.whatsapp-card p { color: var(--ink-soft); margin: 0 0 16px; }
.btn-wa { background: #1fa855; border-color: #1fa855; }
.btn-wa:hover { background: #178a45; border-color: #178a45; }
.whatsapp-card .wa-number {
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

/* ---------- Thanks page ---------- */

.thanks {
  max-width: 640px;
  text-align: center;
  padding-top: 10vh;
}
.thanks .lead { margin-inline: auto; }
.thanks-tag {
  font-family: var(--font-hand);
  font-size: 32px;
  font-weight: 700;
  color: var(--green);
  margin: 0 0 8px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-inner p { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .nav-links { display: none; }
  .site-header nav { display: none; }
  .lang-switch { margin-left: auto; }
  .nav { gap: 12px; }

  .hero { padding-top: 40px; }
  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .hero-photo { max-width: 420px; margin: 0 auto; }
  .scribble { left: -8px; bottom: 24px; font-size: 26px; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .cards, .steps, .prices { grid-template-columns: 1fr; }

  .about-photo { position: static; width: 100%; max-width: min(420px, 100%); order: 0; }
  .hero-grid > *, .about-grid > *, .contact-grid > * { min-width: 0; }

  .section { padding: 64px 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .brand-tag { display: none; }
  .brand { font-size: 16px; }
  .nav { gap: 8px; }
  .nav .btn-small { padding: 9px 12px; font-size: 14px; }
  .lang-switch button { padding: 6px 8px; }
  .whatsapp-card { padding: 20px; }
  .wa-icon { width: 32px; height: 32px; }
  .lead { font-size: 17px; }
  .notes { grid-template-columns: 1fr; gap: 32px; }
  .card, .contact-form { padding: 24px 20px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .stats dd { font-size: 30px; }
}

/* Very small phones (e.g. 320px wide): the header can't fit name, language
   switch and button, so drop the header button. The hero button is right below. */
@media (max-width: 374px) {
  .nav .btn-small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
