/* ===================================================
   Orris — Technique guide pages
   Loaded after styles.css on /breathing-exercises and
   each technique page. Pages set --accent per preset.
   =================================================== */

.technique {
    --accent: var(--accent-blue);
    --accent-soft: rgba(116, 162, 255, 0.16);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    padding-top: 2.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.breadcrumb li + li::before {
    content: '/';
    margin-right: 0.5rem;
    color: rgba(255, 255, 255, 0.25);
}
.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--text-primary);
}

/* ---- Technique hero ---- */
.t-hero {
    padding: 3rem 0 5rem;
}
.t-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
.t-hero .overline {
    color: var(--accent);
}
.t-title {
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    font-weight: 500;
    letter-spacing: -2px;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}
.t-lede {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 620px;
}
.t-aka {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.t-pattern {
    display: flex;
    gap: 6px;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}
.t-pattern .phase-pill {
    background: var(--accent-soft);
    color: var(--accent);
    min-width: auto;
    padding: 0 12px;
    gap: 6px;
}
.t-pattern .phase-pill.dim {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}
.t-pattern .phase-pill small {
    font-size: 0.75rem;
    opacity: 0.75;
    font-weight: 400;
}

/* ---- Breathe-along pacer ---- */
.pacer {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}
.pacer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 42%, var(--accent-soft) 0%, transparent 62%);
    pointer-events: none;
}
.pacer-stage {
    position: relative;
    width: min(260px, 70vw);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Soft halo behind the shape, like the app's session glow. */
.pacer-stage::before {
    content: '';
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent) 0%, transparent 62%);
    transform: scale(calc(var(--pacer-scale, 0.8) * 1.1));
    opacity: calc(0.35 + (var(--pacer-scale, 0.8) - 0.62) * 1.7);
}
.pacer-shape {
    position: relative;
    width: 78%;
    height: 78%;
    transform: scale(var(--pacer-scale, 0.8));
    transform-origin: center;
    filter: drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 55%, transparent))
            drop-shadow(0 0 48px color-mix(in srgb, var(--accent) 35%, transparent));
    will-change: transform;
}
/* Like the app: a black shape lit from behind by the preset's accent glow. */
.pacer-shape path {
    fill: #000;
}
.pacer-shape.outline path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 7;
    stroke-linejoin: round;
}
.pacer-readout {
    position: relative;
    text-align: center;
    margin-bottom: 0.5rem;
    min-height: 4.6rem;
}
.pacer-phase {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: -0.3px;
}
.pacer-count {
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.pacer-track {
    position: relative;
    display: flex;
    gap: 4px;
    width: 100%;
    max-width: 320px;
    margin: 1.25rem 0 1.25rem;
}
.pacer-seg {
    position: relative;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.pacer-seg span {
    position: absolute;
    inset: 0;
    width: 0;
    background: var(--accent);
    border-radius: 3px;
}
.pacer-seg.hold span {
    background: rgba(255, 255, 255, 0.45);
}
.pacer-toggle {
    position: relative;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.55rem 1.3rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.pacer-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
}
.pacer-caption {
    position: relative;
    margin-top: 0.9rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* ---- Article body ---- */
.t-body {
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 2rem;
}
.t-article {
    max-width: 720px;
    margin: 0 auto;
}
.t-article section + section {
    margin-top: 4.5rem;
}
.t-article h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -0.8px;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}
.t-article h3 {
    font-size: 1.15rem;
    font-weight: 500;
    margin: 2rem 0 0.75rem;
}
.t-article p,
.t-article li {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.75;
}
.t-article p + p {
    margin-top: 1rem;
}
.t-article a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.25);
    text-underline-offset: 3px;
}
.t-article a:hover {
    text-decoration-color: currentColor;
}
.t-article strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Numbered steps */
.t-steps {
    list-style: none;
    counter-reset: step;
    display: grid;
    gap: 0.75rem;
}
.t-steps li {
    counter-increment: step;
    position: relative;
    padding: 1rem 1.25rem 1rem 3.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}
.t-steps li::before {
    content: counter(step);
    position: absolute;
    left: 1.1rem;
    top: 1rem;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* At-a-glance table */
.t-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}
.t-table th,
.t-table td {
    text-align: left;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}
.t-table th {
    width: 38%;
    color: var(--text-muted);
    font-weight: 400;
    padding-right: 1rem;
}
.t-table td {
    color: var(--text-primary);
}

/* Breath curve diagram */
.curve {
    margin-top: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem 1.25rem 1rem;
}
.curve svg {
    display: block;
    width: 100%;
    height: auto;
}
.curve figcaption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Tips */
.t-tips {
    list-style: none;
    display: grid;
    gap: 0.6rem;
}
.t-tips li {
    padding-left: 1.6rem;
    position: relative;
}
.t-tips li::before {
    content: '';
    position: absolute;
    left: 0.2rem;
    top: 0.72em;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent);
}

/* Research sources */
.t-sources {
    margin-top: 1.5rem;
    padding-left: 1.25rem;
    font-size: 0.9rem;
}
.t-sources li {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.t-sources li + li {
    margin-top: 0.5rem;
}

/* Callouts */
.t-note {
    margin-top: 1.5rem;
    padding: 1.1rem 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.95rem;
}
.t-note p {
    font-size: 0.95rem;
}

/* Orris tie-in */
.t-orris {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
}
.t-orris .phone-frame {
    max-width: 220px;
    margin: 0 auto;
}
.t-orris .app-store-badge {
    margin-top: 1.5rem;
}

/* FAQ within article */
.t-article .faq-list {
    max-width: none;
}

/* Related techniques + hub cards */
.shape-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.shape-card {
    --accent: var(--accent-blue);
    display: flex;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem 1.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    text-decoration: none !important;
    color: inherit !important;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
a.shape-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.shape-card svg {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    overflow: visible;
    filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 70%, transparent))
            drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 40%, transparent));
}
.shape-card svg path {
    fill: #000;
}
.shape-card svg.outline path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 10;
}
.shape-card-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}
.shape-card-timing {
    display: block;
    font-size: 0.85rem;
    color: var(--accent);
    margin: 0.1rem 0 0.25rem;
}
.shape-card-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Hub hero: every preset shape, lit in its accent */
.constellation {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem 1.5rem;
    padding: 1rem;
    max-width: 420px;
    margin: 0 auto;
}
.constellation-item {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}
.constellation-item svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 75%, transparent))
            drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 40%, transparent));
}
.constellation-item svg path {
    fill: #000;
}
.constellation-item svg.outline path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 9;
}
.js .constellation-item {
    animation: constellation-breathe 8s ease-in-out infinite;
}
.js .constellation-item:nth-child(2n) { animation-delay: -2s; }
.js .constellation-item:nth-child(3n) { animation-delay: -4s; }
.js .constellation-item:nth-child(5n) { animation-delay: -6s; }
@keyframes constellation-breathe {
    0%, 100% { transform: scale(0.86); }
    50% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .js .constellation-item { animation: none; }
}

/* Hub comparison table scrolls on narrow screens */
.t-table-wrap {
    overflow-x: auto;
    margin: 0 -0.25rem;
    padding: 0 0.25rem;
}
.t-compare th,
.t-compare td {
    padding: 0.85rem 0.75rem 0.85rem 0;
    white-space: nowrap;
}
.t-compare th {
    width: auto;
    font-size: 0.85rem;
}
.t-compare td:last-child {
    white-space: normal;
    min-width: 180px;
}
.t-compare a {
    white-space: nowrap;
}

@media (min-width: 769px) {
    .t-hero {
        padding: 4rem 0 6rem;
    }
    .t-hero-grid {
        grid-template-columns: 7fr 5fr;
        gap: 4rem;
    }
    .t-orris {
        grid-template-columns: 3fr 2fr;
        padding: 2.5rem 3rem;
    }
    .shape-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .shape-grid.three {
        grid-template-columns: repeat(3, 1fr);
    }
    .shape-grid.three .shape-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .t-body {
        padding-top: 4rem;
    }
    .t-hero {
        padding-bottom: 4rem;
    }
}
