/* Arete Coaching Center — shared UI layer.
   Loaded after the Tailwind CDN build, so the overrides below use !important
   to win against the generated utility classes. */

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

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

/* Long emails/URLs must wrap rather than widen the layout */
p,
span,
a,
h1,
h2,
h3,
h4,
li {
  overflow-wrap: break-word;
}

*:focus-visible {
  outline: 2px solid #aa3240;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Fluid typography ---------- */
/* The design tokens hard-code 56px / 32px headings, which overflow narrow
   screens. Scale them with the viewport instead. */
.text-display-lg {
  font-size: clamp(30px, 6.2vw, 56px) !important;
  line-height: 1.12 !important;
}

.text-display-lg-mobile {
  font-size: clamp(28px, 6vw, 40px) !important;
  line-height: 1.2 !important;
}

.text-headline-lg {
  font-size: clamp(24px, 4.4vw, 32px) !important;
  line-height: 1.25 !important;
}

.text-headline-md {
  font-size: clamp(19px, 3vw, 24px) !important;
  line-height: 1.35 !important;
}

.text-body-lg {
  font-size: clamp(16px, 1.6vw, 18px) !important;
}

/* ---------- Rhythm ---------- */
@media (max-width: 767px) {
  .py-section-padding-desktop {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
  .pt-section-padding-desktop {
    padding-top: 48px !important;
  }
  .pb-section-padding-desktop {
    padding-bottom: 48px !important;
  }
  .px-gutter {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  /* Oversized fixed heights from the desktop comps */
  /* `~=` matches a whole class token, so `min-h-[400px]` is not caught here */
  [class~="h-[400px]"],
  [class~="h-[500px]"],
  [class~="h-[600px]"] {
    height: auto !important;
    min-height: 280px !important;
    aspect-ratio: 4 / 3;
  }
  [class~="min-h-[400px]"] {
    min-height: 0 !important;
  }
  /* Oversized decorative glyphs and blobs must not create side-scroll */
  [class~="text-[400px]"] {
    font-size: 180px !important;
  }
  .w-96 {
    max-width: 60vw;
  }
  /* Tab strips: swipe horizontally instead of stacking into a tall column */
  .flex.overflow-x-auto.whitespace-nowrap {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 32px !important;
    /* Fade the trailing edge so it reads as "swipe for more" */
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent 100%);
    mask-image: linear-gradient(to right, #000 82%, transparent 100%);
  }
  .flex.overflow-x-auto.whitespace-nowrap::-webkit-scrollbar {
    display: none;
  }
  .flex.overflow-x-auto.whitespace-nowrap > * {
    flex: 0 0 auto;
  }

  /* Full-bleed CTA buttons read better on a phone */
  section .flex.flex-wrap.gap-4 > button,
  section .flex.flex-wrap.gap-4 > a,
  .flex.gap-4.pt-4 > a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .flex.gap-4.pt-4 {
    flex-direction: column;
  }
}

/* Tap targets */
@media (max-width: 767px) {
  a,
  button,
  select,
  input[type="submit"] {
    touch-action: manipulation;
  }
  button,
  .nav-toggle {
    min-height: 44px;
  }
}

/* ---------- Navigation ---------- */
.nav-blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header {
  box-shadow: 0 1px 0 rgba(26, 26, 26, 0.04);
}

.nav-link {
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1b1c1a;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #aa3240;
}

.nav-link-active {
  color: #aa3240;
  border-bottom-color: #aa3240;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border-radius: 8px;
  color: #1b1c1a;
  background: transparent;
}

.nav-toggle:hover {
  background: rgba(27, 28, 26, 0.05);
}

.mobile-nav {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #fbf9f6;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.mobile-nav[hidden] {
  display: none;
}

.nav-link-mobile {
  display: block;
  padding: 14px 4px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1b1c1a;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-link-mobile:last-child {
  border-bottom: 0;
}

.nav-link-mobile-active {
  color: #aa3240;
}

body.nav-open {
  overflow: hidden;
}

/* ---------- Floating WhatsApp button ---------- */
@media (max-width: 767px) {
  a[href*="wa.me"] {
    bottom: 16px !important;
    right: 16px !important;
  }
  a[href*="wa.me"] .w-16 {
    width: 52px !important;
    height: 52px !important;
  }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Tables and wide blocks should scroll, never push the page sideways */
table {
  width: 100%;
}

.table-scroll,
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

/* ---------- Legacy page styles (were inline <style> blocks per page) ---------- */
body {
  background-color: #fbf9f6;
  color: #1b1c1a;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.glass-nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.academic-shadow,
.premium-shadow {
  box-shadow: 0 4px 20px 0 rgba(26, 26, 26, 0.04);
}

.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 164, 76, 0.3), transparent);
}

.gold-hairline {
  border-bottom: 1px solid rgba(201, 164, 76, 0.3);
}

.oxblood-hover:hover {
  background-color: #701422;
}

.active-tab {
  color: #aa3240;
  border-bottom: 2px solid #aa3240;
}

.whatsapp-ring {
  box-shadow: 0 0 0 4px #fff, 0 4px 15px rgba(0, 0, 0, 0.1);
}

.faq-transition {
  transition: all 0.3s ease-in-out;
}

.step-line {
  background: linear-gradient(to bottom, #aa3240 0%, #aa3240 50%, transparent 50%, transparent 100%);
  background-size: 1px 15px;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #8b1a2b;
  border-radius: 10px;
}

/* ---------- Site header (PHP partial) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: #8b1a2b;
  color: #fff;
  padding: 10px 16px;
  font: 600 14px/1 Inter, system-ui, sans-serif;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(251, 249, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 164, 76, 0.28);
  transition: box-shadow 0.25s ease;
}

.site-header.is-stuck {
  box-shadow: 0 6px 24px rgba(26, 26, 26, 0.08);
}

.utility-bar {
  background: #1b1c1a;
  color: rgba(255, 255, 255, 0.72);
  font: 400 12.5px/1 Inter, system-ui, sans-serif;
}

.utility-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.utility-contacts,
.utility-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.utility-contacts a,
.utility-hours,
.utility-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  white-space: nowrap;
}

.utility-bar .material-symbols-outlined {
  font-size: 15px;
  color: #c9a44c;
}

.utility-contacts a:hover,
.utility-links a:hover {
  color: #e9c266;
}

.nav-bar {
  background: transparent;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #8b1a2b;
  color: #fff;
  font: 700 20px/1 'Playfair Display', Georgia, serif;
  box-shadow: inset 0 0 0 1px rgba(201, 164, 76, 0.55);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font: 700 22px/1.05 'Playfair Display', Georgia, serif;
  color: #1b1c1a;
}

.brand-text small {
  font: 600 10px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a8783;
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-call {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  place-items: center;
  color: #8b1a2b;
  border: 1px solid rgba(139, 26, 43, 0.25);
}

.nav-call:hover {
  background: rgba(139, 26, 43, 0.06);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 6px;
  background: #8b1a2b;
  color: #fff;
  font: 600 13px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.04em;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: #701422;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
}

.mobile-nav-inner {
  padding: 8px 20px 20px;
}

.mobile-cta {
  display: block;
  margin-top: 16px;
  padding: 14px;
  border-radius: 6px;
  background: #8b1a2b;
  color: #fff;
  text-align: center;
  font: 600 14px/1 Inter, system-ui, sans-serif;
}

.mobile-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(27, 28, 26, 0.12);
  color: #1b1c1a;
  font: 600 14px/1 Inter, system-ui, sans-serif;
}

@media (max-width: 1023px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-call {
    display: grid;
  }
  .utility-hours,
  .utility-contacts a[href^="mailto:"] {
    display: none;
  }
}

@media (max-width: 640px) {
  .utility-inner {
    padding: 8px 20px;
    font-size: 11.5px;
  }
  .utility-links span[aria-hidden] {
    display: none;
  }
  .utility-links {
    gap: 12px;
  }
  .nav-inner {
    padding: 10px 20px;
    gap: 12px;
  }
  .nav-cta {
    display: none;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 18px;
  }
  .brand-text strong {
    font-size: 19px;
  }
}
