/* Casa del Velo: material surfaces and component rhythm. Loaded last. */
:root {
  --bg: #150e12;
  --surface: #23171d;
  --ink: #f5eadd;
  --muted: #c1adab;
  --accent: #c8aa79;
  --gold: #c8aa79;
  --wine: #542532;
  --secondary: #312027;
  --sage: #302129;
  --border: #51353f;
  --radius: 3px;
}

.portal-section { padding-block: clamp(64px, 7vw, 104px); }
.portal-intro { margin-bottom: 44px; }
.portal-intro h2 { margin-bottom: 22px; }
.portal-kicker, .eyebrow { line-height: 1.65; }
.portal-note { line-height: 1.8; }
.portal-badge { border-color: #c8aa7940; background: #150e1240; }

:is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.button { min-width: 44px; min-height: 48px; }
.button svg, .text-link svg { flex: 0 0 auto; }
.button:disabled { cursor: not-allowed; }

/* Portraits retain their upper edge; the copy follows an editorial baseline. */
.maestros-section { background: var(--bg); }
.maestros-section::before { display: none; }
body[data-brand=velo] .maestros-intro { max-width: 740px; margin: 0 0 48px; text-align: left; }
body[data-brand=velo] .maestros-grid { gap: 28px; }
body[data-brand=velo] .maestros-card {
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  overflow: visible;
}
.maestros-media { aspect-ratio: 4 / 5.2; border: 1px solid #c8aa792b; }
.maestros-media::after { display: none; }
.maestros-portrait, .maestros-dialog-portrait { object-position: center top; }
.maestros-portrait { transition: transform 500ms var(--ease), filter 350ms ease; }
body[data-brand=velo] .maestros-card-copy { padding: 25px 0 22px; }
.maestros-badge { font-size: 9px; letter-spacing: .065em; margin-bottom: 18px; }
.maestros-tradition { font-size: 10px; line-height: 1.7; color: var(--accent); }
body[data-brand=velo] .maestros-name { font-size: clamp(29px, 2.3vw, 34px); }
.maestros-focus { font-size: 14px; line-height: 1.75; }
.maestros-service-list { gap: 6px; margin-bottom: 22px; }
.maestros-service-list li { background: transparent; border-color: #51353f; padding: 5px 7px; }
.maestros-session { padding-top: 17px; margin-bottom: 19px; }
.maestros-card-actions { gap: 8px; }
.maestros-choose { min-height: 48px; white-space: normal; text-align: left; }
.maestros-details { min-height: 44px; text-align: left; padding-left: 0; }
.maestros-note { margin-top: 30px; }
.maestros-dialog-media figcaption { line-height: 1.7; }
.maestros-dialog-portrait { border: 1px solid #c8aa792b; }
.maestros-profile-facts { gap: 18px; }

/* Service spreads use the same material palette and a quiet brass rule. */
.servicios-section { padding-block: clamp(64px, 7vw, 104px); }
.servicios-heading { margin-bottom: 48px; }
.servicios-rows { gap: 32px; }
.servicios-row { grid-template-columns: .92fr 1.08fr; border: 1px solid #c8aa7929; background: var(--wine); }
.servicios-row-2 { grid-template-columns: 1.08fr .92fr; background: var(--secondary); }
.servicios-row-3 { background: var(--surface); }
.servicios-media { min-height: 480px; }
.servicios-photo { object-position: center top; }
.servicios-copy { padding: clamp(32px, 4vw, 58px); }
.servicios-number { color: var(--accent); margin-bottom: 25px; }
.servicios-row-title { font-family: var(--font-display); font-size: clamp(35px, 3.1vw, 48px); }
.servicios-description { max-width: 45ch; font-size: 15px; }
.servicios-facts { border-color: #f5eadd38; }
.servicios-price { font-family: var(--font-display); font-size: 29px; }
.servicios-choose { min-height: 50px; }
.servicios-actions { gap: 12px 22px; }
.servicios-details, .servicios-page-link { min-height: 44px; }
.servicios-brand { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 44px; max-width: none; }
.servicios-brand img { width: 210px; height: auto; object-fit: contain; }
.servicios-page { padding-block: 64px; }
.servicios-detail-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); }
.servicios-detail-art { border: 1px solid #c8aa792b; }
.servicios-detail-art img { object-position: center top; }
.servicios-detail-copy { min-width: 0; }
.servicios-detail-copy h1 { max-width: 13ch; }
.servicios-detail-section { padding-block: 24px; }
.servicios-detail-section h2 { font-family: var(--font-display); }
.servicios-detail-section ol, .servicios-detail-section ul { padding-left: 22px; }
.servicios-detail-section li + li { margin-top: 12px; }
.servicios-detail-copy > .button { max-width: 100%; white-space: normal; text-align: left; }

/* The gallery remains a working filter and lightbox, with quiet captions. */
.velo-gallery { background: var(--surface); padding-block: clamp(64px, 7vw, 104px); }
.velo-gallery-heading { align-items: end; gap: 48px; }
.velo-gallery-filters { gap: 8px; }
.velo-gallery-filter { border-radius: 2px; min-width: 44px; min-height: 44px; padding-inline: 16px; }
.velo-gallery-filter[aria-pressed=true] { background: var(--wine); color: var(--ink); }
.velo-gallery-grid { gap: 36px 30px; }
.velo-gallery-open { border: 1px solid #c8aa792b; }
.velo-gallery-open img { object-position: center top; }
.velo-gallery-zoom { background: #150e12e8; color: var(--ink); box-shadow: none; border: 1px solid #c8aa7950; }
.velo-gallery-caption { align-items: start; }
.velo-gallery-caption h3 { font-family: var(--font-display); line-height: 1.3; }
.velo-gallery-caption p { line-height: 1.7; }
.velo-gallery-grid--single { max-width: 650px; }
.velo-lightbox { border-radius: 3px; background: var(--bg); box-shadow: 0 24px 80px #0008; }
.velo-lightbox-image { background: var(--surface); }
.velo-lightbox-close { min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: 2px; }
.velo-lightbox-arrow { width: 48px; min-height: 48px; border-radius: 2px; }
.velo-lightbox-controls { gap: 24px; }

.explorador { padding-block: clamp(64px, 7vw, 104px); }
.explorador-layout { gap: clamp(32px, 6vw, 86px); }
.explorador-result { background: var(--secondary); border-top-width: 1px; padding: 40px; }
.explorador-chip { min-height: 64px; background: var(--surface); }
.explorador-chip[aria-pressed=true] { background: var(--wine); }
.explorador-orbit { margin-bottom: 24px; }

/* A two-column question index becomes a single reading column on touch. */
.velo-faq { padding-block: clamp(64px, 7vw, 104px); }
.velo-faq-layout { max-width: 1240px; display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 72px; align-items: start; }
.velo-faq-intro { margin: 0; text-align: left; max-width: none; }
.velo-faq-intro h2 { font-family: var(--font-display); max-width: 12ch; }
.velo-faq-intro > p:not(.eyebrow) { max-width: 38ch; }
.velo-faq-list { min-width: 0; }
.velo-faq-item summary { min-height: 76px; gap: 18px; padding-block: 24px; padding-inline: 0; }
.velo-faq-item summary:hover { color: var(--accent); }
.velo-faq-item > p { margin: 0 28px 27px 42px; line-height: 1.85; }
.velo-faq-number { flex-basis: 24px; }
.velo-faq-toggle { flex-shrink: 0; }
.velo-adult-notice { background: var(--surface); }
.velo-adult-notice p { line-height: 1.9; }

/* Clearly labelled fictional stories and mock players share flat surfaces. */
.testimonios-section { background: var(--secondary); }
.testimonios-relatos { gap: 25px; }
.testimonios-relato { padding: 30px 26px; border-color: #c8aa7940; border-top: 2px solid var(--accent); background: var(--surface); }
.testimonios-relato h3 { max-width: none; font-family: var(--font-display); }
.testimonios-relato blockquote p { font-family: var(--font-display); font-size: 20px; line-height: 1.65; }
.testimonios-numero { margin-bottom: 22px; }
.testimonios-video-card { background: var(--surface); border-color: #c8aa793d; }
.testimonios-poster { background: var(--bg); }
.testimonios-poster::before, .testimonios-poster::after { border-color: #c8aa7940; }
.testimonios-video-copy { padding: 26px; }
.testimonios-video-copy h4 { font-family: var(--font-display); }
.testimonios-play { min-height: 48px; }
.testimonios-play-icon { flex-shrink: 0; }
.testimonios-consentimiento { background: var(--surface); border-color: #c8aa7940; }
.testimonios-player { background: var(--surface); border-color: #c8aa7940; }

/* Native dialogs retain the existing close and focus lifecycle. */
:is(.portal-dialog, .servicios-dialog, .velo-lightbox, .velo-info-dialog) {
  border-color: #c8aa7960;
  box-shadow: 0 24px 80px #0008;
  overscroll-behavior: contain;
}
:is(.portal-dialog, .servicios-dialog, .velo-lightbox, .velo-info-dialog)::backdrop { background: #0b070ad9; backdrop-filter: blur(6px); }
:is(.portal-dialog, .servicios-dialog, .velo-lightbox, .velo-info-dialog)[open] { animation: velo-dialog-enter 200ms var(--ease) both; }
.portal-dialog-inner { padding: 34px; }
.portal-dialog-header { gap: 22px; }
.portal-dialog-header > div { min-width: 0; }
.portal-dialog-header h2 { overflow-wrap: anywhere; }
.portal-dialog-close, .servicios-close { min-width: 44px; min-height: 44px; flex-shrink: 0; border-radius: 2px; }
.portal-dialog-close:hover, .servicios-close:hover { background: var(--wine); border-color: var(--accent); }
.portal-field input, .portal-field select, .portal-proposito-field textarea, .portal-proposito-field select { font-size: 16px; min-height: 48px; }
.portal-field label { color: var(--ink); }
.portal-field input::placeholder { color: var(--muted); opacity: 1; }
.portal-actions { gap: 12px; }
.portal-actions .button { min-width: 0; white-space: normal; text-align: left; }
.portal-error { line-height: 1.75; }
.portal-access-tabs { background: var(--surface); }
.portal-access-tabs [aria-selected=true] { background: var(--wine); }
.portal-access-account dd { overflow-wrap: anywhere; }
.portal-proposito { background: var(--surface); border-color: #c8aa7940; }
.portal-proposito-notice { background: var(--bg); }

.reserva-progress { gap: 10px; margin-block: 22px 30px; }
.reserva-progress li { min-height: 44px; padding-block: 12px; }
.reserva-teacher { padding: 12px; background: var(--surface); }
.reserva-teacher[aria-pressed=true] { padding: 11px; background: var(--secondary); }
.reserva-teacher img { aspect-ratio: 4 / 5.2; object-position: center top; }
.reserva-teacher strong { line-height: 1.35; }
.reserva-service { background: var(--surface); padding: 25px; }
.reserva-service:has(input:checked) { background: var(--secondary); }
.reserva-selection, .reserva-room-banner { background: var(--secondary); }
.reserva-appointment { padding: 24px; border-color: #c8aa793d; }
.reserva-appointment img, .portal-checkout-portrait { object-position: center top; }
.reserva-appointment-context summary { display: flex; align-items: center; min-height: 44px; }
.reserva-purpose-text { overflow-wrap: anywhere; }
.reserva-appointment-actions { min-width: 0; }
.reserva-appointment-actions .button { white-space: normal; text-align: left; }

.portal-calendar { padding: 22px; background: var(--surface); border-color: #c8aa7940; }
.portal-calendar-month { color: var(--ink); }
.portal-calendar-day { min-height: 62px; }
.portal-calendar-nav { width: 44px; min-height: 44px; }
.portal-calendar-day[aria-pressed=true], .portal-calendar-slot[aria-pressed=true] { background: var(--wine); }
.portal-calendar-day-count { font-size: 10px; }
.portal-calendar-legend { font-size: 12px; }
.portal-calendar-slot { min-height: 48px; }
.portal-calendar-summary { overflow-wrap: anywhere; }

.portal-checkout-notice, .portal-checkout-limits { background: var(--secondary); }
.portal-checkout-summary { background: var(--surface); border-color: #c8aa7940; }
.portal-checkout-teacher { align-items: start; }
.portal-checkout-teacher > div { min-width: 0; }
.portal-checkout-teacher h3 { line-height: 1.35; }
.portal-checkout-facts dt { flex-shrink: 0; }
.portal-checkout-facts dd { min-width: 0; }
.portal-checkout-option { min-height: 68px; background: var(--surface); }
.portal-checkout-option:has(input:checked) { background: var(--wine); }
.portal-checkout-check { min-height: 44px; padding-block: 8px; }
.portal-checkout-submit { min-height: 50px; }

.videollamada-section { background: var(--bg); padding-block: clamp(64px, 7vw, 104px); }
.videollamada-room { padding: 28px; background: var(--secondary); border-color: #c8aa7940; }
.videollamada-tile { height: 390px; border-color: #c8aa7940; background: var(--surface); }
.videollamada-tile img { object-position: center top; }
.videollamada-tile figcaption { padding-top: 36px; background: linear-gradient(transparent, #150e12ed 48%); letter-spacing: .035em; }
.videollamada-local figcaption { padding-block: 16px; background: var(--surface); }
.videollamada-placeholder { background: var(--surface); }
.videollamada-controls { margin-top: 28px; gap: 12px; }
.videollamada-controls .button { min-height: 48px; white-space: normal; }
.videollamada-controls .button-outline { background: transparent; }
.videollamada-note { line-height: 1.85; }

/* No hidden content unless the observer has explicitly opted this block in. */
.ui-reveal { opacity: 1; transform: none; }
.ui-reveal.is-reveal-ready { opacity: 0; transform: translateY(20px); transition: opacity 650ms var(--ease), transform 650ms var(--ease); }
.ui-reveal.is-reveal-ready.is-revealed, .ui-reveal.is-reveal-ready:focus-within { opacity: 1; transform: none; }

@keyframes velo-dialog-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) and (pointer: fine) {
  .maestros-card:hover .maestros-portrait { transform: scale(1.025); filter: brightness(1.055); }
  .servicios-photo { transition: transform 600ms var(--ease); }
  .servicios-row:hover .servicios-photo { transform: scale(1.02); }
}

@media (max-width: 1100px) {
  body[data-brand=velo] .maestros-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 28px; }
  .velo-faq-layout { gap: 40px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .servicios-copy { padding: 34px 30px; }
  .servicios-media { min-height: 450px; }
}

@media (max-width: 800px) {
  .velo-faq-layout { grid-template-columns: 1fr; gap: 32px; }
  .velo-faq-intro h2, .velo-faq-intro > p:not(.eyebrow) { max-width: none; }
  .servicios-row, .servicios-row-2 { grid-template-columns: 1fr; }
  .servicios-row-2 .servicios-media { order: 0; }
  .servicios-media { min-height: 0; height: 350px; }
  .servicios-copy { padding: 34px; }
  .servicios-detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .servicios-detail-art { position: static; height: 420px; }
  .explorador-layout { grid-template-columns: 1fr; gap: 34px; }
  .explorador-result { padding: 30px; }
  .portal-dialog-inner { padding: 26px; }
  .portal-checkout-layout { grid-template-columns: 1fr; }
  .testimonios-group-heading { align-items: start; }
}

@media (max-width: 620px) {
  body[data-brand=velo] .maestros-grid { grid-template-columns: 1fr; max-width: none; gap: 34px; margin: 0; }
  body[data-brand=velo] .maestros-card-copy { padding: 24px 0; }
  body[data-brand=velo] .maestros-name { font-size: 35px; }
  .maestros-media { aspect-ratio: 4 / 5; }
  .maestros-dialog-body { grid-template-columns: 1fr; }
  .maestros-dialog-media { max-width: 320px; }
  .servicios-rows { gap: 24px; }
  .servicios-page-header { gap: 10px; }
  .servicios-page-header .text-link { font-size: 12px; white-space: nowrap; gap: 10px; }
  .servicios-brand img { width: 165px; max-width: 44vw; }
  .servicios-media { height: 290px; }
  .servicios-copy { padding: 28px 24px; }
  .servicios-row-title { font-size: 36px; }
  .servicios-detail-art { height: 370px; }
  .servicios-detail-copy h1 { font-size: 46px; }
  .servicios-actions { gap: 10px 18px; }
  .velo-gallery-grid { grid-template-columns: 1fr; gap: 28px; }
  .velo-gallery-photo--portrait { grid-row: auto; }
  .velo-gallery-photo--panorama { grid-column: auto; }
  .velo-gallery-caption { display: block; }
  .velo-gallery-caption p { max-width: none; text-align: left; margin-top: 6px; font-size: 11px; }
  .velo-gallery-filters { gap: 7px; }
  .velo-gallery-filter { padding-inline: 13px; }
  .velo-faq-item summary { font-size: 15px; gap: 13px; }
  .velo-faq-item > p { margin-left: 37px; margin-right: 0; }
  .testimonios-relatos, .testimonios-video-grid { grid-template-columns: 1fr; gap: 22px; }
  .testimonios-relato { padding: 28px 24px; }
  .testimonios-group-heading { display: block; }
  .testimonios-group-heading > p { max-width: none; margin-top: 15px; }
  .testimonios-video-copy { padding: 24px; }
  .testimonios-consentimiento { padding: 20px; }
  .reserva-teachers { gap: 10px; }
  .reserva-teacher { padding: 9px; }
  .reserva-teacher[aria-pressed=true] { padding: 8px; }
  .reserva-service { padding: 18px; gap: 12px; }
  .reserva-appointment { padding: 18px; }
  .portal-actions .button { flex: 1 1 130px; }
  .videollamada-room { padding: 16px; }
  .videollamada-tiles { grid-template-columns: 1fr; gap: 16px; }
  .videollamada-tile { height: 330px; }
  .videollamada-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .videollamada-controls .button { padding-inline: 10px; }
}

@media (max-width: 480px) {
  /* 390px: 374px dialog minus borders, 32px inner padding, 14px calendar
     padding/borders and 18px grid gaps leaves 308px for seven 44px days. */
  .reserva-dialog { width: calc(100% - 16px); max-width: none; max-height: calc(100dvh - 16px); }
  .reserva-dialog .portal-dialog-inner { padding: 22px 16px; }
  .reserva-dialog .portal-dialog-header { gap: 12px; }
  .reserva-dialog h2 { font-size: 28px; }
  .reserva-progress { gap: 8px; }
  .reserva-progress li { min-width: 0; flex-basis: calc(50% - 4px); padding-inline: 5px; }
  .portal-calendar { padding: 14px 6px; }
  .portal-calendar-weekdays, .portal-calendar-days { gap: 3px; }
  .portal-calendar-day { min-width: 44px; min-height: 54px; padding: 7px 1px; }
  .portal-calendar-day-count { font-size: 9px; }
  .portal-calendar-navigation { gap: 7px; }
  .portal-calendar-month { font-size: 16px; }
  .portal-calendar-legend { gap: 10px 12px; font-size: 11px; }
  .portal-calendar-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-calendar-slot { padding-inline: 6px; }
  .portal-checkout-options { grid-template-columns: 1fr; }
  .portal-checkout-summary { padding: 18px; }
  .portal-checkout-teacher { gap: 12px; }
  .portal-checkout-header h2 { font-size: 28px; }
  .portal-proposito { padding: 18px; }
  .portal-proposito-actions .button { flex-basis: auto; }
  .velo-lightbox { width: calc(100% - 16px); padding-inline: 14px; }
  .velo-lightbox-controls { gap: 20px; }
  .servicios-detail-copy h1 { font-size: 42px; }
  .servicios-detail-art { height: 340px; }
  .videollamada-controls { grid-template-columns: 1fr; }
}

@media (max-width: 389px) {
  /* A full-width calendar keeps the seven date targets usable at 320px. */
  .reserva-dialog { width: calc(100% - 8px); }
  .reserva-dialog .portal-dialog-inner { padding-inline: 14px; }
  .portal-calendar { margin-inline: -14px; padding-inline: 0; border-inline: 0; border-radius: 0; }
  .portal-calendar-weekdays, .portal-calendar-days { gap: 0; }
  .portal-calendar-navigation, .portal-calendar-legend, .portal-calendar-times, .portal-calendar > .portal-note, .portal-calendar-summary { margin-inline: 12px; }
  .portal-calendar-day { border-radius: 0; }
  .portal-calendar-day-count { font-size: 9px; }
  .servicios-row-title { font-size: 33px; }
  .servicios-copy { padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  :is(.portal-dialog, .servicios-dialog, .velo-lightbox, .velo-info-dialog)[open] { animation: none; }
  .ui-reveal, .ui-reveal.is-reveal-ready { opacity: 1; transform: none; transition: none; }
  .maestros-portrait, .servicios-photo, .velo-gallery-open img { transition: none; }
  .maestros-card:hover .maestros-portrait, .servicios-row:hover .servicios-photo, .velo-gallery-open:hover img { transform: none; filter: none; }
}

@media (forced-colors: active) {
  .portal-calendar-day[aria-pressed=true], .portal-calendar-slot[aria-pressed=true], .velo-gallery-filter[aria-pressed=true], .reserva-teacher[aria-pressed=true] { outline: 2px solid Highlight; outline-offset: -3px; }
}
