/**
 * Whitesand Beauty: landing sections (front page)
 *  1. Philosophy: editorial split, a sticky photograph beside four pillars.
 *  2. Protocols: treatment index, a sticky category photograph beside grouped, expandable rows.
 *  3. Scroll reveal (landing.js adds html.ws-reveal-ready, so content is visible without JS).
 *
 *  4. Physicians, 5. Book a consultation, 6. Talk to us (team-spotlight, booking-section, cta-banner).
 * Shared by the theme (functions.php, front page) and the preview server. Monochrome only;
 * Persian is never set in mono or tracked.
 */

.ws-philosophy,
.ws-protocols {
    --l-ink: #1E1E1E;
    --l-soft: #717171;
    --l-line: #E0E0E0;
    --l-ease: cubic-bezier(0.16, 1, 0.3, 1);
    padding: clamp(80px, 10vw, 144px) clamp(20px, 5vw, 64px);
    color: var(--l-ink);
}
html.dark .ws-philosophy,
html.dark .ws-protocols {
    --l-ink: #F9FEFF;
    --l-soft: rgba(249, 254, 255, 0.6);
    --l-line: rgba(255, 255, 255, 0.1);
}

.ws-philosophy__inner,
.ws-protocols__inner {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
    max-width: 1280px;
    margin: 0 auto;
}

.ws-philosophy__title,
.ws-protocols__title {
    margin: 0;
    max-width: 18ch;
    font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem);
    font-weight: 300;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-wrap: balance;
    color: var(--l-ink);
}
.ws-philosophy__title:lang(fa),
.ws-protocols__title:lang(fa) { letter-spacing: 0; line-height: 1.45; }

/* Sticky photograph frame (shared) */
.ws-philosophy__media,
.ws-protocols__frame {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 28px;
    background: #121212;
}
.ws-philosophy__media { position: sticky; top: 112px; }
.ws-protocols__media { position: sticky; top: 112px; }

.ws-philosophy__media img,
.ws-protocols__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================================================ 1. Philosophy */

.ws-philosophy__pillars {
    margin: clamp(32px, 4vw, 56px) 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--l-line);
}

.ws-philosophy__pillar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 22px;
    padding: 28px 0;
    border-bottom: 1px solid var(--l-line);
}

.ws-philosophy__icon { width: 44px; height: 44px; border-radius: 50%; }
/* DESIGN §6.12: the charcoal badge gets a white border in dark mode */
html.dark .ws-philosophy__icon { box-shadow: 0 0 0 1px rgba(249, 254, 255, 0.45); }
.ws-philosophy__icon svg { width: 100%; height: 100%; display: block; }

.ws-philosophy__pillar h3 {
    margin: 4px 0 8px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--l-ink);
}

.ws-philosophy__pillar p {
    margin: 0;
    max-width: 54ch;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.85;
    color: var(--l-soft);
}

/* ================================================================ 2. Protocols */

.ws-protocols { interpolate-size: allow-keywords; }

.ws-protocols__photo {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}
.ws-protocols__photo.is-active { opacity: 1; }

.ws-protocols__caption {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--l-soft);
    transition: opacity 0.4s ease;
}

.ws-protocols__intro {
    margin: 16px 0 0;
    max-width: 46ch;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.85;
    color: var(--l-soft);
}

.ws-protocols__group { margin-top: clamp(36px, 4vw, 52px); }

.ws-protocols__group-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 400;
    color: var(--l-soft);
}

.ws-protocols__list { border-top: 1px solid var(--l-line); }

.ws-protocol { border-bottom: 1px solid var(--l-line); }

.ws-protocol__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 24px;
    align-items: center;
    gap: 16px;
    padding: 22px 0;
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.ws-protocol__summary::-webkit-details-marker { display: none; }
.ws-protocol__summary:focus-visible { outline: 1px solid var(--l-ink); outline-offset: 4px; }

.ws-protocol__name {
    font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
    font-weight: 300;
    line-height: 1.5;
    color: var(--l-ink);
    transition: opacity 0.3s ease;
}
.ws-protocol__summary:hover .ws-protocol__name { opacity: 0.72; }

.ws-protocol__downtime {
    font-size: 14px;
    color: var(--l-soft);
    white-space: nowrap;
}

/* Plus that becomes a minus */
.ws-protocol__toggle {
    position: relative;
    width: 24px;
    height: 24px;
}
.ws-protocol__toggle::before,
.ws-protocol__toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 1px;
    margin: -0.5px 0 0 -7px;
    background: var(--l-ink);
    transition: transform 0.5s var(--l-ease);
}
.ws-protocol__toggle::after { transform: rotate(90deg); }
.ws-protocol[open] .ws-protocol__toggle::after { transform: rotate(0deg); }

/* Smooth open/close where ::details-content is supported; instant elsewhere */
.ws-protocol::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.55s var(--l-ease), content-visibility 0.55s allow-discrete;
}
.ws-protocol[open]::details-content { height: auto; }

.ws-protocol__body { padding: 0 0 30px; max-width: 58ch; }

.ws-protocol__body p {
    margin: 0;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.85;
    color: var(--l-soft);
}

.ws-protocol__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 8px 48px;
    margin: 20px 0 22px;
}
.ws-protocol__meta dt { font-size: 12px; color: var(--l-soft); }
.ws-protocol__meta dd { margin: 2px 0 0; font-size: 15px; color: var(--l-ink); }

.ws-protocol__book {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 20px;
    border: 1px solid var(--l-ink);
    border-radius: 9999px;
    background: transparent;
    color: var(--l-ink);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.35s ease, color 0.35s ease;
}
.ws-protocol__book:hover { background: var(--l-ink); color: var(--l-ink-inverse, #F9FEFF); }
html.dark .ws-protocol__book:hover { color: #1E1E1E; }
.ws-protocol__book:focus-visible { outline: 1px solid var(--l-ink); outline-offset: 3px; }


/* ================================================================ 4. Physicians (team-spotlight.php) */

.ws-team-home,
.ws-book,
.ws-talk {
    padding: clamp(80px, 10vw, 144px) clamp(20px, 5vw, 64px);
    color: var(--p-ink);
}
.ws-team-home__inner,
.ws-book__inner,
.ws-talk__inner { max-width: 1280px; margin: 0 auto; }

.ws-team-home__head {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 20px clamp(40px, 6vw, 96px);
    align-items: end;
}
.ws-team-home__head p { margin: 0 0 14px; max-width: 46ch; font-size: 16px; font-weight: 300; line-height: 1.9; color: var(--p-soft); }

.ws-team-home__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(36px, 4vw, 56px) clamp(20px, 3vw, 40px);
    margin: clamp(40px, 5vw, 64px) 0 0;
    padding: 0;
    list-style: none;
}
.ws-team-home__person .ws-frame { aspect-ratio: 4 / 5; border-radius: 24px; margin-bottom: 20px; }
.ws-team-home__person .ws-frame--pattern::before { background: rgba(249, 254, 255, 0.13); -webkit-mask-size: 96px 180px; mask-size: 96px 180px; }
.ws-team-home__person h3 { margin: 0; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem); font-weight: 400; line-height: 1.5; color: var(--p-ink); }
.ws-team-home__role { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 15px; color: var(--p-ink); }
.ws-team-home__role .ws-ico { width: 17px; height: 17px; color: var(--p-soft); }
.ws-team-home__focus { margin: 6px 0 0; font-size: 15px; font-weight: 300; line-height: 1.8; color: var(--p-soft); }

/* ================================================================ 5. Book a consultation (booking-section.php) */

.ws-book__inner {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}
.ws-book__intro { position: sticky; top: 112px; }
.ws-book__lead { margin: 18px 0 0; max-width: 44ch; font-size: 16px; font-weight: 300; line-height: 1.9; color: var(--p-soft); }
.ws-book__steps { margin: clamp(28px, 3vw, 40px) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--p-line); }
.ws-book__steps li {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--p-line);
    font-size: 15px;
    line-height: 1.8;
}
.ws-book__steps .ws-ico { width: 20px; height: 20px; margin-top: 3px; }
.ws-book__call { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 24px 0 0; font-size: 15px; color: var(--p-soft); }
.ws-book .ws-form { margin-top: 0; }
.ws-book .ws-field textarea { min-height: 104px; }

/* ================================================================ 6. Talk to us (cta-banner.php, ACF layout only) */

.ws-talk__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 40px;
    padding-top: clamp(32px, 4vw, 48px);
    border-top: 1px solid var(--p-line);
}
.ws-talk__links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin: 0; }

/* ================================================================ Responsive */

@media (max-width: 1024px) {
    .ws-team-home__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ws-book__inner { grid-template-columns: minmax(0, 1fr); }
    .ws-book__intro { position: static; }
}

@media (max-width: 900px) {
    .ws-team-home__head { grid-template-columns: minmax(0, 1fr); }
    .ws-philosophy__inner,
    .ws-protocols__inner { grid-template-columns: 1fr; }
    .ws-philosophy__media,
    .ws-protocols__media { position: relative; top: auto; }
    .ws-philosophy__media,
    .ws-protocols__frame { aspect-ratio: 4 / 3; }
    .ws-philosophy__media img,
    .ws-protocols__photo { object-position: 50% 30%; }
}

@media (max-width: 640px) {
    .ws-team-home__grid { grid-template-columns: minmax(0, 1fr); }
    .ws-protocol__summary { grid-template-columns: minmax(0, 1fr) 24px; gap: 4px 16px; }
    .ws-protocol__downtime { grid-row: 2; grid-column: 1; }
    .ws-protocol__toggle { grid-row: 1 / span 2; grid-column: 2; }
}

/* ================================================================ 3. Reveal */

html.ws-reveal-ready .ws-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s ease, transform 0.9s var(--l-ease, cubic-bezier(0.16, 1, 0.3, 1));
    transition-delay: var(--d, 0s);
}
html.ws-reveal-ready .ws-reveal.is-in { opacity: 1; transform: none; }
/* While the glass takes its page snapshot, off-screen sections are captured revealed
   (liquid-glass-nav.js markCapture); on screen nothing changes. */
html.ws-glass-capture .ws-reveal[data-ws-glass-pre] { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
    html.ws-reveal-ready .ws-reveal { opacity: 1; transform: none; transition: none; }
    .ws-protocols__photo,
    .ws-protocol__toggle::before,
    .ws-protocol__toggle::after,
    .ws-protocol::details-content { transition: none; }
}

/* Consultation section: "pick a time yourself" opens the booking panel */
.ws-book__picker { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
