/* ============================================================
   SamTutors - refined black & white with a single accent
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f2;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --border: rgba(20, 23, 26, 0.12);
  --border-strong: rgba(20, 23, 26, 0.26);
  --text: #15171a;
  --muted: #565b64;
  --ink: #15171a;
  --accent: #1f4287;
  --accent-dark: #16315f;
  --accent-soft: rgba(31, 66, 135, 0.08);
  --ok: #1d9d57;
  --radius: 16px;
  --radius-sm: 12px;
  --max: 1120px;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-dark));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; overscroll-behavior-x: none; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.14; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: clamp(2.5rem, 10vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 6vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { color: var(--muted); }
a { color: inherit; text-decoration: none; }

:where(a, button, .btn):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
section[id] { scroll-margin-top: 84px; }

.grad-text { color: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.nav.scrolled { background: rgba(255, 255, 255, 0.93); box-shadow: 0 6px 24px rgba(20, 23, 26, .07); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.brand-mark {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--grad); color: #fff; font-size: 0.85rem;
}
.nav-links { display: flex; align-items: center; gap: 0.3rem; }
.nav-links a { position: relative; padding: 0.5rem 0.85rem; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 0.95rem; transition: color .25s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a:not(.nav-cta)::after { content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.28rem; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); opacity: 0; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-links a:not(.nav-cta):hover::after, .nav-links a:not(.nav-cta).active::after { transform: scaleX(1); opacity: 1; }
.nav-cta { background: var(--ink); color: #fff !important; transition: transform .3s var(--ease), background .25s var(--ease), box-shadow .3s var(--ease); }
.nav-cta:hover { background: #000; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(20, 23, 26, .22); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3.5rem, 12vw, 6.5rem) 0 clamp(3rem, 9vw, 5rem); text-align: center; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(560px 320px at 50% 0%, var(--accent-soft), transparent 70%);
}
.hero-inner { position: relative; }
.hero h1 { margin-bottom: 1rem; }
.lead { font-size: clamp(1.05rem, 4vw, 1.22rem); max-width: 40rem; margin: 0 auto 2rem; }
.hero-actions { display: flex; flex-direction: column; gap: 0.8rem; max-width: 22rem; margin: 0 auto; }

.stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 3rem; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-family: var(--font-sans); font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.stat span { color: var(--muted); font-size: 0.9rem; }

/* ---------- Availability signal ---------- */
.availability {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  padding: 0.45rem 0.95rem; border-radius: 999px; margin-bottom: 1.5rem;
  box-shadow: 0 6px 18px rgba(20, 23, 26, .05);
}
.availability .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(29, 157, 87, .5);
  animation: pulseDot 2.4s var(--ease-soft) infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(29, 157, 87, .5); }
  70% { box-shadow: 0 0 0 8px rgba(29, 157, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(29, 157, 87, 0); }
}
.availability-light { margin-bottom: 1rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.9rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: 1rem; cursor: pointer; border: 1px solid transparent; transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .25s var(--ease), border-color .25s var(--ease); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .1s; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 22px rgba(20, 23, 26, .18); }
.btn-primary:hover { background: #000; transform: translateY(-3px); box-shadow: 0 16px 34px rgba(20, 23, 26, .26); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text); transform: translateY(-3px); }
.btn-block { width: 100%; }

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.trust-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.6rem; padding: 0.9rem 1.25rem; }
.trust-item { color: var(--muted); font-weight: 600; font-size: 0.92rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 10vw, 6rem) 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 2.5rem; }
.eyebrow { display: inline-block; font-family: var(--font-sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; }
.sub { font-size: 1.05rem; margin-top: 0.5rem; }

/* ---------- Cards grid ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { transform: translateY(-5px); border-color: rgba(31, 66, 135, .45); box-shadow: 0 18px 40px rgba(20, 23, 26, .10); }
.card-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff; font-size: 1.4rem; margin-bottom: 1rem; }
.card h3 { margin-bottom: 0.4rem; }
.card p { margin: 0; }
.price { margin-top: 1.2rem; font-family: var(--font-sans); font-size: 1.7rem; font-weight: 800; color: var(--text); }
.price span { font-size: 0.95rem; font-weight: 600; color: var(--muted); }

/* ---------- Hover lift for interactive surfaces ---------- */
.step, .result-card, .review-card, .profile-card { transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease); }
.step:hover, .result-card:hover, .review-card:hover, .profile-card:hover { transform: translateY(-5px); border-color: rgba(31, 66, 135, .4); box-shadow: 0 18px 40px rgba(20, 23, 26, .10); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-family: var(--font-sans); font-weight: 800; color: #fff; background: var(--grad); margin-bottom: 0.9rem; }
.step h3 { margin-bottom: 0.3rem; }
.step p { margin: 0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
.cred-label { margin-top: 1.4rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.credentials { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.cred {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(31, 66, 135, .2);
  padding: 0.42rem 0.85rem; border-radius: 999px;
}
.check-list { list-style: none; margin-top: 1.4rem; display: grid; gap: 0.7rem; }
.check-list li { position: relative; padding-left: 1.9rem; color: var(--text); font-weight: 500; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0.15rem;
  width: 1.4rem; height: 1.4rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--grad); color: #fff; font-size: 0.8rem;
}
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; text-align: center; box-shadow: 0 12px 34px rgba(20, 23, 26, .06); }
.avatar-photo { display: block; width: 118px; height: 118px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; margin: 0 auto 1.1rem; background: var(--surface-2); border: 1px solid var(--border); box-shadow: 0 10px 26px rgba(20, 23, 26, .14); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.profile-card:hover .avatar-photo { transform: scale(1.04); box-shadow: 0 16px 36px rgba(31, 66, 135, .2); }
.profile-card h3 { font-size: 1.4rem; }
.profile-role { color: var(--accent); font-weight: 600; margin: 0.3rem 0 1rem; }
.profile-card > p:last-child { margin: 0; }

/* ---------- Results & reviews ---------- */
.results-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.result-card, .review-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; display: flex; flex-direction: column; }
.result-tag { align-self: flex-start; font-family: var(--font-sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(31, 66, 135, .2); padding: 0.28rem 0.65rem; border-radius: 999px; margin-bottom: 1rem; }
.result-jump { display: flex; align-items: center; gap: 0.7rem; font-family: var(--font-display); font-size: clamp(2.4rem, 9vw, 3.2rem); font-weight: 700; line-height: 1; margin-bottom: 0.9rem; }
.result-jump .arrow { color: var(--muted); font-size: 0.65em; }
.result-card p, .review-card > p { color: var(--text); margin: 0; }
.result-card strong { color: var(--accent); }
.quote-mark { font-family: Georgia, "Times New Roman", serif; font-size: 3rem; line-height: 0.7; color: var(--accent); height: 1.5rem; }
.review-card > p { font-size: 1.1rem; font-weight: 500; }
.review-by { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.25rem; }
.review-by .avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; flex-shrink: 0; }
.review-by strong { display: block; }
.review-by span { color: var(--muted); font-size: 0.9rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 0.75rem; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
.faq-item[open] { border-color: var(--border-strong); box-shadow: 0 14px 30px rgba(20, 23, 26, .07); }
.faq-item summary { list-style: none; cursor: pointer; padding: 1.1rem 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-icon { flex-shrink: 0; font-family: var(--font-sans); font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--accent); transition: transform .3s var(--ease); }
.faq-item[open] summary .faq-icon { transform: rotate(45deg); }
.faq-answer { padding: 0 1.3rem 1.25rem; }
.faq-answer p { margin: 0; }
.faq-answer strong { color: var(--text); font-weight: 700; }
.faq-item[open] .faq-answer { animation: faqIn .35s var(--ease); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- CTA / contact ---------- */
.cta-card {
  background: linear-gradient(135deg, var(--accent-soft), rgba(31, 66, 135, .03));
  border: 1px solid rgba(31, 66, 135, .18); border-radius: 24px; padding: clamp(1.6rem, 6vw, 3rem);
  display: grid; gap: 1.5rem;
}
.cta-copy h2 { margin-bottom: 0.5rem; }
.contact-email { display: inline-block; color: var(--accent); font-weight: 600; word-break: break-word; text-align: center; }
.contact-email:hover { text-decoration: underline; }
.quick-contact { margin-top: 1.4rem; display: grid; gap: 0.85rem; }
.btn-whatsapp { background: #25d366; color: #06231a; }
.btn-whatsapp:hover { filter: brightness(1.06); }
.wa-icon { margin-right: 0.55rem; flex-shrink: 0; }
.fine-print { color: var(--muted); font-size: 0.82rem; line-height: 1.5; margin: 0.3rem 0 0; text-align: center; }

/* ---------- Contact form ---------- */
.contact-form { display: grid; gap: 1rem; align-content: start; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.field .opt { color: var(--muted); font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.contact-form textarea { resize: vertical; min-height: 112px; line-height: 1.55; }
.contact-form select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.3rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23565b64' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.95rem center; background-size: 12px;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); opacity: 0.85; }
.contact-form .btn-primary { margin-top: 0.2rem; }
.contact-form .fine-print { text-align: left; margin-top: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-status { margin: 0; font-size: 0.92rem; font-weight: 600; line-height: 1.5; }
.form-status:empty { display: none; }
.form-status--success { color: var(--ok); }
.form-status--error { color: #c0392b; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-inner { display: flex; flex-direction: column; gap: 0.8rem; align-items: center; text-align: center; }
.footer p { font-size: 0.9rem; }

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--rd, 0ms); will-change: opacity, transform;
}
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .availability .dot { animation: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Tablet / desktop - progressive enhancement (mobile-first)
   ============================================================ */
@media (min-width: 600px) {
  .hero-actions { flex-direction: row; justify-content: center; max-width: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .about-grid { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
  .results-grid { grid-template-columns: repeat(3, 1fr); }
  .cta-card { grid-template-columns: 1fr 1fr; align-items: start; gap: 2.5rem; }
}

/* ---------- Mobile nav (below 760px) ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0.25rem;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.5rem;
    transform: translateY(-120%); transition: transform .3s ease;
    box-shadow: 0 16px 40px rgba(20, 23, 26, .12);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 0.9rem 1rem; font-size: 1.05rem; }
  .nav-cta { text-align: center; margin-top: 0.5rem; }
}
