/* pages.css — page-specific styles */


/* 1. Homepage */

/* --- Hero (serif headline, clay rule, calm vertical blend) --- */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 104px var(--pad-x) 96px;
    color: #fff;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--btn), #fff 6%) 0%,
        var(--btn) 58%,
        color-mix(in srgb, var(--btn), #000 12%) 100%);
    border-bottom: 1px solid color-mix(in srgb, var(--btn), #000 24%);
}
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero-logo { height: 72px; width: auto; margin: 0 auto 28px; }

.hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 3.6rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.12;
    margin-bottom: 0;
}
.hero h1::after {
    content: '';
    display: block;
    width: var(--bar-w);
    height: var(--bar-h);
    background: rgba(255, 255, 255, 0.55);
    margin: 24px auto 0;
}

/* Credential line under the headline */
.hero-creds {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 20px;
}
.hero p {
    font-size: 1.12rem;
    line-height: 1.75;
    max-width: 540px;
    margin: 22px auto 0;
    color: rgba(255, 255, 255, 0.84);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 34px;
}

/* --- Intro / "Meet the doctor" --- */
.intro { padding: 88px var(--pad-x); }
.intro-grid {
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;   /* copy left, headshot tucked top-right */
    gap: clamp(32px, 6vw, 64px);
    align-items: start;
}
.intro-photo { margin: 0; }
.intro-photo img {
    width: 100%;
    height: auto;                       /* natural aspect ratio — no cropping */
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.intro-photo figcaption {
    margin-top: 12px;
    font-size: 0.84rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

/* --- Services (stacked, text-focused, hairline-divided) --- */
.services {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 88px var(--pad-x);
}
.service-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 44px;
    text-align: left;
}
.service {
    padding-top: 36px;
    border-top: var(--rule);
}
.service:first-child { padding-top: 0; border-top: none; }
.service h3 {
    display: inline-block;
    font-size: clamp(1.25rem, 2.4vw, 1.55rem);
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--primary);   /* clay-rule motif (left-aligned) */
}
.service > p { max-width: 70ch; }

/* Two-column method layout */
.service-methods {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 48px);
}
.method-group h4 {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}

/* --- CTA band --- */
.cta {
    padding: 84px var(--pad-x);
    text-align: center;
    color: #fff;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--btn), #fff 6%) 0%,
        var(--btn) 60%,
        color-mix(in srgb, var(--btn), #000 12%) 100%);
}
.cta-inner { max-width: 600px; margin: 0 auto; }
.cta h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 500; color: #fff; }
.cta p { margin: 18px auto 30px; color: rgba(255, 255, 255, 0.86); line-height: 1.75;}
.contact-block a  { margin: 18px auto 30px; color: rgba(255, 255, 255, 0.86); line-height: 1.75; text-decoration: none;}
.contact-block {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 20px;
    justify-content: center;   /* centers the grid horizontally */
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;            /* centers the block in the page */
    align-items: center;
    margin-top: 20px;
}

.contact-block p {
    margin: 10px;
}

@media (max-width: 768px) {
    .contact-block {
        grid-template-columns: 1fr;   /* stack into one column */
    }
}


/* Selected Writings */
.writings {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 88px var(--pad-x);
    border-top: var(--rule);
}
.writings .section-head p { color: var(--text-muted); font-size: 1.02rem; }

.reading-list {
    width: 100%;
    max-width: 760px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
}
.reading-item a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: var(--rule);
    border-radius: var(--radius);
    border-left: 2px solid var(--primary);
    text-decoration: none;
    color: var(--text);
    transition: background var(--t), border-color var(--t);
}
.reading-item a:hover,
.reading-item a:focus-visible {
    background: color-mix(in srgb, var(--primary) 6%, transparent);
}
.reading-title { font-weight: 600; }
.reading-meta {
    flex: none;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
.writings-all { margin-top: 28px; }
.writings-all a { font-weight: 600; color: var(--primary); }


/* 2. Generic content pages  (.content + about) */
.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 26px;
    padding: 72px var(--pad-x);
}
.content h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 500; }

.about-content { max-width: 660px; margin: 0 auto; text-align: left; }
.about-content p { color: var(--text-muted); font-size: 1.06rem; line-height: 1.85; }

.about-tagline { margin-top: 4px; }
.about-tagline p {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text);
}


/* 3. Approach page  (approach · myths) */
.approach {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
}
.pillars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.approach-note { padding: 20px; }

/* Myths & Realities — two plain text columns */
.myths {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 5vw, 56px);
    text-align: left;
    margin-top: 36px;
}
.myth-column h3 {
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--primary);   /* clay-rule motif */
}


/* 4. Policy pages  (Termly embeds) */
.policy-content {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    text-align: left;
    align-items: stretch;
}
.policy-content [name="termly-embed"],
.policy-iframe {
    width: 100%;
    background: #fff;
    color: #1f2a28;
    border: var(--rule);
    padding: 36px clamp(20px, 4vw, 48px);
    min-height: 60vh;
}
.policy-iframe { padding: 0; min-height: 80vh; }

@media (prefers-color-scheme: dark) {
    .policy-content [name="termly-embed"],
    .policy-iframe { box-shadow: var(--shadow); border-color: transparent; }
}


/* 5. Contact form embed */
.form-embed { width: 100%; max-width: 700px; position: relative; }
.form-embed iframe { border: none; }

.form-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.form-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* 6. Shared list pattern — dash bullets */
.myth-column ul,
.method-group ul,
.service-detail {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.myth-column ul   { gap: 12px; }
.service-detail   { gap: 14px; margin-top: 18px; }

.myth-column li,
.method-group li,
.service-detail li {
    position: relative;
    padding-left: 18px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.55;
}
.myth-column li { font-size: 1.02rem; line-height: 1.6; }
.service-detail li { line-height: 1.6; }

.myth-column li::before,
.method-group li::before,
.service-detail li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.66em;
    width: var(--dash-w);
    height: 1px;
    background: var(--primary);
}
.method-group li::before,
.service-detail li::before { background: var(--primary-dark); }

.service-detail strong { color: var(--text); font-weight: 600; }

/* Inline links to corresponding readings within method lists */
.method-group a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    transition: border-color var(--t), color var(--t);
}
.method-group a:hover,
.method-group a:focus-visible {
    border-bottom-color: var(--accent);
}


/* 7. Responsive */
@media (max-width: 860px) {
    .intro-grid { grid-template-columns: 1fr; }
    .intro-photo { order: -1; max-width: 260px; margin: 0 auto 8px; }
    .intro-photo figcaption { text-align: center; }
}

@media (max-width: 768px) {
    .hero { padding: 72px 24px 64px; }
    .hero-logo { height: 58px; }
    .content { padding: 48px 20px; }
    .intro, .approach, .services, .writings { padding: 56px 20px; }
    .myths { grid-template-columns: 1fr; gap: 32px; }
    .service-methods { grid-template-columns: 1fr; gap: 24px; }
    .cta { padding: 60px 20px; }
    .reading-item a { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Spinner has no animation when reduced motion is requested */
@media (prefers-reduced-motion: reduce) {
    .form-loading-spinner {
        animation: none;
        border-top-color: var(--border);
        opacity: 0.5;
    }
}


/* 2. Files */

/* Writings / Files page */
.files-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}
.files-page h1 { margin-bottom: 0.5rem; }
.files-intro { color: var(--text-muted); margin-bottom: 1.75rem; }
.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.file-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: var(--rule);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.file-item a:hover,
.file-item a:focus-visible {
    border-color: var(--primary);
    background-color: color-mix(in srgb, var(--primary) 6%, transparent);
}
.file-icon { flex: none; color: var(--primary); }
.file-name { flex: 1 1 auto; word-break: break-word; }
.file-size {
    flex: none;
    font-size: 0.85em;
    opacity: 0.65;
    font-variant-numeric: tabular-nums;
}
.file-empty { opacity: 0.7; }

/* 3. CV */


.cv-container {
  max-width: 80vw;
  margin: 0 auto;
  padding: 20px;
}

.cv-section {
  margin-bottom: 40px;
}

.cv-list {
  list-style: none;
  padding: 0;
}

.cv-item {
  display: flex; /* This creates the 'Table' feel without the table tags */
  padding: 12px 0;
  border-bottom: 1px solid #eee; /* Optional separator */
}

.cv-date {
  min-width: 80px; /* Keeps dates aligned in a column */
  font-weight: bold;
  color: #666;
  margin-right: 20px;
}

.cv-title {
  display: block;
  font-weight: 600;
}

.cv-sub {
  color: #555;
  font-size: 0.95em;
}
