/* ============================================
   BrownTuition v2 — Polish Layer
   ============================================
   Activates when <html data-polish="on">
   Surgical, additive refinements over styles.css.
   Pulled together as a single overlay so it can be
   toggled on/off via the Tweaks panel for direct
   side-by-side comparison.

   What this layer does (and does not):
   • Refines easing, focus, spacing, edges
   • Adds soft fades, subtle dividers, gentler shadows
   • Keeps every brand colour, type style and layout
   • No content changes, no structural changes
   ============================================ */

/* ── 1. Motion: smoother, more confident easing ── */
html[data-polish="on"] {
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.32, .72, 0, 1);
}
@media (prefers-reduced-motion: no-preference) {
  html[data-polish="on"] * { transition-timing-function: var(--ease); }
}

/* ── 2. Typography: micro-refinements ── */
html[data-polish="on"] body {
  font-feature-settings: "ss01", "cv11", "kern", "calt", "liga";
  font-variant-ligatures: contextual common-ligatures;
  -webkit-text-size-adjust: 100%;
}
html[data-polish="on"] .hero-heading,
html[data-polish="on"] .section-title,
html[data-polish="on"] .page-hero h1 {
  text-wrap: balance;
  letter-spacing: -0.028em;
}
html[data-polish="on"] .section-sub,
html[data-polish="on"] .hero-body,
html[data-polish="on"] .problem-text,
html[data-polish="on"] .service-desc,
html[data-polish="on"] .step-desc,
html[data-polish="on"] .faq-answer-inner,
html[data-polish="on"] .review-caption {
  text-wrap: pretty;
}

/* ── 3. Section-label: refined rule ── */
html[data-polish="on"] .section-label {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  margin-bottom: 1.6rem;
}
html[data-polish="on"] .section-label::before {
  width: 36px;
  height: 1px;
  opacity: 0.85;
}

/* ── 4. Nav: smoother scrolled state, refined shadow ── */
html[data-polish="on"] .site-nav {
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 8px 28px -10px rgba(13,26,46,0.35);
  transition: height 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
html[data-polish="on"] .site-nav.scrolled {
  background: rgba(21, 71, 235, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 12px 36px -8px rgba(13,26,46,0.5);
}
html[data-polish="on"][data-theme="minimal"] .site-nav.scrolled {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04) inset, 0 8px 28px -10px rgba(13,26,46,0.18);
}
html[data-polish="on"][data-theme="editorial"] .site-nav.scrolled {
  background: rgba(9, 14, 26, 0.88);
}
html[data-polish="on"] .nav-links a {
  position: relative;
  transition: color 0.25s var(--ease);
}
html[data-polish="on"] .nav-links a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 1.5px;
  background: var(--amber-lt);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
  border-radius: 2px;
}
html[data-polish="on"] .nav-links a:hover::after,
html[data-polish="on"] .nav-links a.active::after { width: 22px; }
html[data-polish="on"] .nav-links a.nav-cta::after { display: none; }

/* ── 5. Hero: refined photo treatment ── */
html[data-polish="on"] .hero-right {
  position: relative;
}
html[data-polish="on"] .hero-right::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 50%, rgba(13,26,46,0.28) 100%),
    linear-gradient(90deg, rgba(21,71,235,0.18) 0%, transparent 18%);
  pointer-events: none;
  z-index: 1;
}
html[data-polish="on"] .hero-badge {
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 2;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.22) inset,
    0 12px 32px -4px rgba(212,98,26,0.42),
    0 4px 12px rgba(13,26,46,0.22);
  letter-spacing: -0.015em;
}
html[data-polish="on"] .hero-badge-num {
  font-feature-settings: "lnum", "tnum", "ss01";
}

/* ── 6. Trust marquee: edge fade ── */
html[data-polish="on"] .trust-bar {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
html[data-polish="on"] .trust-item {
  border-right-color: rgba(255,255,255,0.04);
  transition: color 0.3s var(--ease);
}

/* ── 7. Problem section ── */
html[data-polish="on"] .problem-item {
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.4s var(--ease), background 0.3s var(--ease);
}
html[data-polish="on"] .problem-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -16px rgba(13,26,46,0.22), 0 4px 10px -6px rgba(13,26,46,0.08);
}
html[data-polish="on"] .problem-icon {
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(212,98,26,0.12);
}

/* Solution card — tighter rhythm + better ✓ alignment */
html[data-polish="on"] .solution-card {
  border-radius: 14px;
  box-shadow: 0 24px 60px -24px rgba(21,71,235,0.45), 0 8px 20px -10px rgba(13,26,46,0.18);
}
html[data-polish="on"] .solution-feature {
  gap: 0.85rem;
  font-size: 0.92rem;
}
html[data-polish="on"] .solution-feature::before {
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  font-size: 0.65rem;
  font-weight: 700;
}

/* ── 8. About: stat row with vertical dividers ── */
html[data-polish="on"] .stat-row {
  gap: 0;
  border-color: rgba(13,26,46,0.08);
}
html[data-polish="on"][data-theme="editorial"] .stat-row { border-color: rgba(240,237,232,0.10); }
html[data-polish="on"] .stat {
  flex: 1;
  padding: 0 1.1rem;
  border-right: 1px solid rgba(13,26,46,0.08);
  min-width: 0;
}
html[data-polish="on"][data-theme="editorial"] .stat { border-right-color: rgba(240,237,232,0.10); }
html[data-polish="on"] .stat:first-child { padding-left: 0; }
html[data-polish="on"] .stat:last-child { border-right: none; padding-right: 0; }
html[data-polish="on"] .stat-num {
  font-feature-settings: "lnum", "tnum", "ss01";
  letter-spacing: -0.03em;
  font-size: 2.4rem;
}
html[data-polish="on"] .stat-label {
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  white-space: nowrap;
  margin-top: 0.55rem;
}

/* About quote card */
html[data-polish="on"] .about-quote-card {
  border-left-width: 2px;
  background: linear-gradient(180deg, rgba(13,26,46,0.0) 0%, rgba(13,26,46,0.35) 100%);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  backdrop-filter: blur(2px);
}
html[data-polish="on"] .about-quote-card p {
  font-size: 1.2rem;
  line-height: 1.55;
}

/* ── 9. Services: refined hover transition ── */
html[data-polish="on"] .service-card {
  transition: background 0.45s var(--ease), color 0.45s var(--ease);
}
html[data-polish="on"] .service-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0;
  background: var(--t-accent);
  transition: height 0.4s var(--ease);
  z-index: 2;
}
html[data-polish="on"] .service-card:hover::before { height: 100%; }
html[data-polish="on"] .service-num {
  font-feature-settings: "lnum", "tnum", "ss01";
}
html[data-polish="on"] .service-tag {
  font-weight: 800;
  letter-spacing: 0.16em;
  padding: 4px 11px;
  border-radius: 100px;
}

/* ── 10. How-it-works: refined step rhythm ── */
html[data-polish="on"] .step-num {
  border-radius: 12px;
  font-feature-settings: "lnum", "tnum", "ss01";
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
html[data-polish="on"] .step:hover .step-num {
  box-shadow: 0 12px 28px -10px rgba(21,71,235,0.55);
}
html[data-polish="on"] .step:last-child:hover .step-num {
  background: var(--amber);
  box-shadow: 0 12px 28px -10px rgba(212,98,26,0.55);
}
html[data-polish="on"] .step-title { letter-spacing: -0.015em; }

/* ── 11. Reviews board: tightened rotation, refined caption ── */
html[data-polish="on"] .review-phone.phone-1 { transform: rotate(-1.6deg) translateY(6px); }
html[data-polish="on"] .review-phone.phone-2 { transform: rotate(1.2deg) translateY(22px); }
html[data-polish="on"] .review-phone.phone-3 { transform: rotate(-1deg) translateY(0px); }
html[data-polish="on"] .review-phone.phone-4 { transform: rotate(1.6deg) translateY(16px); }
html[data-polish="on"] .review-phone.phone-5 { transform: rotate(-1.4deg) translateY(10px); }
html[data-polish="on"] .review-phone:hover { transform: translateY(-8px) rotate(0deg) scale(1.025); }
html[data-polish="on"] .wa-frame {
  box-shadow:
    0 22px 44px -8px rgba(13,26,46,0.22),
    0 6px 14px -4px rgba(13,26,46,0.08),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}
html[data-polish="on"] .review-caption {
  margin-top: 1.5rem;
  letter-spacing: 0.14em;
}
html[data-polish="on"] .review-caption .review-grade {
  background: linear-gradient(135deg, var(--blue) 0%, #2E5BF0 100%);
  box-shadow: 0 2px 8px -2px rgba(21,71,235,0.45);
  padding: 4px 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

/* ── 12. FAQ: smoother expand ── */
html[data-polish="on"] .faq-question {
  transition: color 0.25s var(--ease);
  padding: 1.65rem 0;
}
html[data-polish="on"] .faq-chevron {
  background: transparent;
  border: 1px solid var(--t-border);
  transition: transform 0.4s var(--ease-out), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
html[data-polish="on"] .faq-question:hover .faq-chevron {
  background: transparent;
  border-color: var(--amber);
  color: var(--amber);
}
html[data-polish="on"] .faq-question.open .faq-chevron {
  border-color: var(--t-primary);
}
html[data-polish="on"] .faq-answer {
  transition: max-height 0.5s var(--ease-out), opacity 0.35s var(--ease-out);
  opacity: 0;
}
html[data-polish="on"] .faq-answer.open { opacity: 1; }
html[data-polish="on"] .faq-answer-inner {
  padding: 0 0 1.65rem;
  line-height: 1.78;
}

/* ── 13. Booking section: refined CTA group ── */
html[data-polish="on"] .booking-section .btn-primary {
  box-shadow:
    0 1px 0 rgba(13,26,46,0.06) inset,
    0 14px 32px -10px rgba(255,255,255,0.35),
    0 6px 16px -8px rgba(13,26,46,0.25);
}
html[data-polish="on"] .booking-section .btn-primary:hover {
  box-shadow:
    0 1px 0 rgba(13,26,46,0.06) inset,
    0 22px 48px -12px rgba(255,255,255,0.42),
    0 10px 22px -10px rgba(13,26,46,0.30);
}

/* ── 14. Enquiry form: gentler focus, refined labels ── */
html[data-polish="on"] .field label {
  letter-spacing: 0.22em;
  font-size: 0.68rem;
  transition: color 0.2s var(--ease);
}
html[data-polish="on"] .field:focus-within label { color: var(--t-primary); }
html[data-polish="on"] .field input,
html[data-polish="on"] .field select,
html[data-polish="on"] .field textarea {
  border: 1.5px solid rgba(13,26,46,0.06);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.25s var(--ease), transform 0.15s var(--ease);
}
html[data-polish="on"] .field input:focus,
html[data-polish="on"] .field select:focus,
html[data-polish="on"] .field textarea:focus {
  box-shadow: 0 0 0 4px rgba(21,71,235,0.12), 0 2px 8px -4px rgba(21,71,235,0.18);
}
html[data-polish="on"] .submit-btn {
  background: linear-gradient(180deg, var(--blue) 0%, #103BC7 100%);
}
html[data-polish="on"] .submit-btn:hover {
  background: linear-gradient(180deg, #2A5BF0 0%, var(--blue) 100%);
}

/* Enquiry-left contact items */
html[data-polish="on"] .contact-icon {
  background: rgba(255,255,255,0.10);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

/* ── 15. Buttons: shared refinements ── */
html[data-polish="on"] .btn-primary {
  background: linear-gradient(180deg, var(--t-accent-lt) 0%, var(--t-accent) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 8px 20px -6px rgba(212,98,26,0.32),
    0 2px 6px rgba(13,26,46,0.06);
}
html[data-polish="on"] .btn-primary:hover {
  background: linear-gradient(180deg, #F58A50 0%, var(--t-accent-lt) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.22) inset,
    0 16px 36px -8px rgba(212,98,26,0.42),
    0 4px 12px rgba(13,26,46,0.10);
}
html[data-polish="on"] .booking-section .btn-primary {
  background: white;
  color: var(--blue);
}
html[data-polish="on"] .booking-section .btn-primary:hover {
  background: white;
  color: var(--blue);
}
html[data-polish="on"] .btn-outline {
  border-width: 1.5px;
  letter-spacing: 0.14em;
}

/* ── 16. WhatsApp + Cookie: softer ── */
html[data-polish="on"] .whatsapp-btn {
  box-shadow: 0 10px 28px -6px rgba(37,211,102,0.42), 0 4px 10px -4px rgba(13,26,46,0.18);
}
html[data-polish="on"] .whatsapp-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 36px -6px rgba(37,211,102,0.55), 0 6px 14px -4px rgba(13,26,46,0.22);
}
html[data-polish="on"] .cookie-banner {
  background: rgba(13,26,46,0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.25rem 3rem;
}
html[data-polish="on"] .cookie-text { font-size: 0.82rem; line-height: 1.55; }

/* ── 17. Footer: refined typographic hierarchy ── */
html[data-polish="on"] footer {
  padding-top: 4rem;
}
html[data-polish="on"] .footer-top {
  padding-bottom: 3.5rem;
  border-bottom-color: rgba(255,255,255,0.07);
}
html[data-polish="on"] .footer-col h4 {
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.24em;
}
html[data-polish="on"] .footer-col ul a {
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
html[data-polish="on"] .footer-col ul a:hover {
  color: white;
  padding-left: 4px;
}
html[data-polish="on"] .grad-bar {
  height: 2px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 35%, var(--amber-lt) 70%, var(--amber) 100%);
}

/* ── 18. Focus visibility: keyboard polish ── */
html[data-polish="on"] :focus-visible {
  outline: 2px solid var(--t-primary);
  outline-offset: 4px;
  border-radius: 6px;
  transition: outline-offset 0.15s var(--ease);
}

/* ── 19. Selection: keep brand ── */
html[data-polish="on"] ::selection { background: var(--amber-lt); color: white; }

/* ── 20. Page hero (inner pages): subtle vignette ── */
html[data-polish="on"] .page-hero {
  position: relative;
}
html[data-polish="on"] .page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 78% 30%, rgba(255,255,255,0.04) 0%, transparent 60%),
    linear-gradient(180deg, transparent 60%, rgba(13,26,46,0.18) 100%);
  pointer-events: none;
}
html[data-polish="on"] .page-hero > * { position: relative; z-index: 1; }
html[data-polish="on"] .breadcrumb {
  letter-spacing: 0.16em;
  font-size: 0.74rem;
}

/* ── 21. Reveal animation: gentler ── */
html[data-polish="on"] .reveal {
  transform: translateY(20px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}

/* ── 22. Mobile nudges ── */
@media (max-width: 768px) {
  html[data-polish="on"] .hero-heading { letter-spacing: -0.03em; }
  html[data-polish="on"] .stat-row { gap: 0; }
  html[data-polish="on"] .stat { padding: 0 1rem; }
  html[data-polish="on"] .stat:first-child { padding-left: 0; }
  html[data-polish="on"] .stat:last-child { padding-right: 0; }
}
@media (max-width: 480px) {
  html[data-polish="on"] .hero-badge { bottom: 1.25rem; right: 1.25rem; }
  html[data-polish="on"] .stat { padding: 0 0.6rem; }
}

/* ── 23. Reduced motion respect ── */
@media (prefers-reduced-motion: reduce) {
  html[data-polish="on"] * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
