/*
Theme Name: Catholic Theology
Theme URI: https://catholic-theology.com/
Author: Catholic Theological Inquiry
Description: Presentation-only public shell for the Catholic Theological Inquiry Platform.
Version: 0.2.0
Requires at least: 7.0
Requires PHP: 8.3
Text Domain: catholic-theology
*/

:root {
    --ct-paper: #f5f0e6;
    --ct-paper-deep: #e9dfcf;
    --ct-ink: #13242c;
    --ct-ink-soft: #42565d;
    --ct-navy: #102f40;
    --ct-navy-bright: #1d4a5e;
    --ct-gold: #a87d2f;
    --ct-gold-light: #d7bd7a;
    --ct-burgundy: #713241;
    --ct-white: #fffdf8;
    --ct-border: rgba(19, 36, 44, 0.17);
    --ct-shadow: 0 24px 70px rgba(16, 47, 64, 0.12);
    --ct-radius: 1.25rem;
    --ct-content: min(76rem, calc(100vw - 2.5rem));
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 8% 5%, rgba(168, 125, 47, 0.1), transparent 30rem),
        linear-gradient(180deg, var(--ct-paper) 0%, #fbf8f1 55%, var(--ct-paper) 100%);
    color: var(--ct-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}

a {
    color: var(--ct-navy-bright);
    text-decoration-thickness: 0.09em;
    text-underline-offset: 0.16em;
}

a:hover {
    color: var(--ct-burgundy);
}

:focus-visible {
    outline: 3px solid var(--ct-gold);
    outline-offset: 4px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

.skip-link:focus {
    clip: auto;
    clip-path: none;
    height: auto;
    left: 1rem;
    padding: 0.75rem 1rem;
    top: 1rem;
    width: auto;
    z-index: 10000;
    background: var(--ct-white);
    border: 2px solid var(--ct-gold);
}

.ct-site-header {
    border-bottom: 1px solid var(--ct-border);
    background: rgba(245, 240, 230, 0.91);
}

.ct-header-inner,
.ct-footer-inner,
.ct-shell,
.ct-main {
    width: var(--ct-content);
    margin-inline: auto;
}

.ct-header-inner {
    min-height: 5.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.ct-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--ct-ink);
    text-decoration: none;
}

.ct-brand-mark {
    width: 3.2rem;
    height: 3.2rem;
    flex: 0 0 auto;
}

.ct-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ct-brand-name {
    font: 600 1.15rem/1.1 Georgia, "Times New Roman", serif;
    letter-spacing: 0.015em;
}

.ct-brand-kicker {
    display: block;
    margin-top: 0.2rem;
    color: var(--ct-ink-soft);
    font: 650 0.64rem/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.ct-primary-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem 1.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ct-primary-nav a {
    color: var(--ct-ink);
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}

.ct-primary-nav a:hover {
    color: var(--ct-burgundy);
}

.ct-hero {
    position: relative;
    overflow: hidden;
    min-height: 37rem;
    display: grid;
    align-items: center;
    background:
        linear-gradient(120deg, rgba(16, 47, 64, 0.98), rgba(19, 36, 44, 0.94)),
        var(--ct-navy);
    color: var(--ct-white);
}

.ct-hero::before,
.ct-hero::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(215, 189, 122, 0.28);
    border-radius: 50%;
    pointer-events: none;
}

.ct-hero::before {
    width: 34rem;
    height: 34rem;
    right: -9rem;
    top: -12rem;
    box-shadow:
        0 0 0 5rem rgba(215, 189, 122, 0.025),
        0 0 0 10rem rgba(215, 189, 122, 0.018);
}

.ct-hero::after {
    width: 18rem;
    height: 18rem;
    left: -8rem;
    bottom: -9rem;
}

.ct-shell {
    position: relative;
    z-index: 1;
    padding-block: clamp(5rem, 10vw, 8rem);
}

.ct-eyebrow {
    margin: 0 0 1.25rem;
    color: var(--ct-gold-light);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.ct-main .ct-eyebrow {
    color: var(--ct-burgundy);
}

.ct-hero h1 {
    max-width: 13ch;
    margin: 0;
    font: 500 clamp(3.5rem, 9vw, 7rem)/0.92 Georgia, "Times New Roman", serif;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.ct-hero-intro {
    max-width: 44rem;
    margin: 2rem 0 0;
    color: rgba(255, 253, 248, 0.79);
    font: 400 clamp(1.05rem, 2vw, 1.28rem)/1.65 Georgia, "Times New Roman", serif;
}

.ct-status-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1rem;
    margin-top: 2.4rem;
}

.ct-status {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(215, 189, 122, 0.55);
    border-radius: 999px;
    color: var(--ct-gold-light);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ct-status::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--ct-gold-light);
}

.ct-status-note {
    color: rgba(255, 253, 248, 0.67);
    font-size: 0.85rem;
}

.ct-main {
    padding-block: clamp(4rem, 8vw, 7rem);
}

.ct-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(20rem, 1.2fr);
    gap: 3rem;
    align-items: end;
    margin-bottom: 2.4rem;
}

.ct-section-heading h2,
.ct-entry h1 {
    margin: 0;
    font: 500 clamp(2.25rem, 5vw, 4rem)/1.03 Georgia, "Times New Roman", serif;
    letter-spacing: -0.035em;
}

.ct-section-heading p {
    max-width: 46rem;
    margin: 0;
    color: var(--ct-ink-soft);
}

.ct-principles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.ct-principle {
    min-height: 15rem;
    padding: 1.7rem;
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius);
    background: rgba(255, 253, 248, 0.72);
    box-shadow: 0 14px 36px rgba(16, 47, 64, 0.06);
}

.ct-principle-number {
    display: block;
    color: var(--ct-burgundy);
    font: 600 0.76rem/1 Georgia, "Times New Roman", serif;
    letter-spacing: 0.13em;
}

.ct-principle h3 {
    margin: 2.6rem 0 0.8rem;
    font: 600 1.45rem/1.2 Georgia, "Times New Roman", serif;
}

.ct-principle p {
    margin: 0;
    color: var(--ct-ink-soft);
    font-size: 0.92rem;
}

.ct-disclosure {
    margin-top: 1rem;
    padding: 1.25rem 1.4rem;
    border-left: 4px solid var(--ct-burgundy);
    background: rgba(113, 50, 65, 0.065);
    color: var(--ct-ink-soft);
}

.ct-entry {
    max-width: 68rem;
    margin: 0 auto;
    padding: clamp(4rem, 8vw, 7rem) 0;
}

.ct-entry-meta {
    color: var(--ct-ink-soft);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ct-entry-content {
    margin-top: 2rem;
}

.ct-entry-content > * {
    max-width: 56rem;
}

.ct-home {
    padding-block: clamp(3rem, 7vw, 6rem);
}

.ct-home-intro,
.ct-discovery-header {
    max-width: 60rem;
    padding: clamp(2rem, 6vw, 5rem);
    border-radius: var(--ct-radius);
    background: linear-gradient(130deg, var(--ct-navy), var(--ct-ink));
    color: var(--ct-white);
    box-shadow: var(--ct-shadow);
}

.ct-home-intro h1,
.ct-discovery-header h1 {
    max-width: 15ch;
    margin: 0;
    font: 500 clamp(2.7rem, 7vw, 5.8rem)/0.98 Georgia, "Times New Roman", serif;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.ct-home-intro > p:last-of-type,
.ct-discovery-header > p:last-of-type {
    max-width: 46rem;
    color: rgba(255, 253, 248, 0.8);
}

.ct-home-section {
    padding-block: clamp(3rem, 6vw, 5rem);
}

.ct-home-section + .ct-home-section {
    border-top: 1px solid var(--ct-border);
}

.ct-discovery-search {
    max-width: 46rem;
    margin-top: 2rem;
}

.ct-discovery-search label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 700;
}

.ct-discovery-search > div {
    display: flex;
    gap: 0.65rem;
}

.ct-discovery-search input,
.ct-discovery-search select {
    min-width: 0;
    min-height: 3rem;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--ct-border);
    border-radius: 0.55rem;
    font: inherit;
}

.ct-discovery-search input {
    flex: 1;
}

.ct-discovery-search button,
.ct-button {
    min-height: 3rem;
    padding: 0.65rem 1rem;
    border: 0;
    border-radius: 0.55rem;
    background: var(--ct-gold-light);
    color: var(--ct-ink);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 750;
    cursor: pointer;
}

.ct-article-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ct-discovery-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.ct-discovery-pagination a {
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--ct-border);
    border-radius: 0.55rem;
    background: var(--ct-white);
    font-weight: 700;
    text-decoration: none;
}

.ct-discovery-pagination span {
    color: var(--ct-ink-soft);
    font-size: 0.9rem;
}

.ct-article-card {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius);
    background: rgba(255, 253, 248, 0.82);
    box-shadow: 0 14px 36px rgba(16, 47, 64, 0.06);
}

.ct-article-card h2 {
    margin: 0.5rem 0 0.8rem;
    font: 600 clamp(1.35rem, 3vw, 1.8rem)/1.2 Georgia, "Times New Roman", serif;
}

.ct-article-kind,
.ct-reader-label,
.cti-reader-label,
.cti-connection-label {
    color: var(--ct-burgundy);
    font-size: 0.82rem;
    font-weight: 750;
}

.ct-topic-chips,
.ct-topic-grid,
.cti-concept-topics ul,
.cti-reader-legend,
.cti-connections {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ct-topic-chips,
.cti-concept-topics ul,
.cti-reader-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.ct-topic-chips a,
.cti-concept-topics a {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--ct-border);
    border-radius: 999px;
    background: var(--ct-white);
    font-size: 0.82rem;
    text-decoration: none;
}

.ct-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.ct-topic-grid a {
    display: flex;
    min-height: 7rem;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid var(--ct-border);
    border-radius: 0.8rem;
    background: var(--ct-white);
    text-decoration: none;
}

.ct-topic-grid span,
.ct-topic-aliases {
    color: var(--ct-ink-soft);
    font-size: 0.86rem;
}

.ct-discovery-header {
    margin-bottom: 2rem;
}

.ct-methodology {
    max-width: 54rem;
}

.cti-question {
    font-size: clamp(1rem, 1.8vw, 1.12rem);
}

.cti-article-nav {
    margin-bottom: 2rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--ct-border);
    border-radius: 0.8rem;
    background: var(--ct-white);
}

.cti-article-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1.2rem;
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
}

.cti-section {
    padding-block: clamp(2rem, 5vw, 3.5rem);
    border-top: 1px solid var(--ct-border);
}

.cti-section > h2 {
    max-width: 22ch;
    margin-top: 0;
    font: 600 clamp(1.8rem, 4vw, 2.8rem)/1.1 Georgia, "Times New Roman", serif;
    text-wrap: balance;
}

.cti-reader-question {
    color: var(--ct-ink-soft);
    font: 500 1.15rem/1.5 Georgia, "Times New Roman", serif;
}

.cti-concept-topics {
    margin-block: 1rem 1.5rem;
}

.cti-concept-topics > span {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.cti-determination,
.cti-scope,
.cti-answer-layers > section,
.cti-model,
.cti-gaps > li,
.cti-connections > li {
    padding: 1.2rem 1.4rem;
    border: 1px solid var(--ct-border);
    border-radius: 0.8rem;
    background: rgba(255, 253, 248, 0.78);
}

.cti-determination {
    margin-block: 1.5rem;
    border-left: 5px solid var(--ct-gold);
}

.cti-scope {
    border-left: 5px solid var(--ct-navy-bright);
}

.cti-answer-layers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.cti-answer-layers h3,
.cti-model h3 {
    margin-top: 0;
}

.cti-reader-legend li,
.cti-result-badge {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--ct-border);
    border-radius: 0.55rem;
    background: var(--ct-white);
}

.cti-claims,
.cti-gaps,
.cti-connections {
    display: grid;
    gap: 0.85rem;
}

.cti-claims > li {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ct-border);
}

.cti-source-citation {
    color: var(--ct-ink-soft);
    font-size: 0.9rem;
}

.cti-connections a {
    display: block;
    margin-top: 0.3rem;
}

.ct-entry-content > .alignwide {
    max-width: 68rem;
    margin-left: 50%;
    transform: translateX(-50%);
    width: min(68rem, calc(100vw - 2.5rem));
}

.ct-empty {
    padding: 3rem;
    border: 1px dashed var(--ct-border);
    border-radius: var(--ct-radius);
    text-align: center;
    color: var(--ct-ink-soft);
}

.ct-community {
    max-width: 54rem;
    padding-block: clamp(2rem, 5vw, 4.5rem);
}

.ct-community-notice,
.ct-community-compose,
.ct-community-post {
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--ct-border);
    border-radius: 0.8rem;
    background: rgba(255, 253, 248, 0.86);
}

.ct-community-notice {
    margin-block: 1.5rem;
    border-left: 5px solid var(--ct-gold);
}

.ct-community-thread {
    display: grid;
    gap: 1rem;
    padding: 0;
    list-style: none;
}

.ct-community-post header {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ct-new-badge {
    display: inline-flex;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--ct-gold);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ct-community-inline-form,
.ct-community-post-actions,
.ct-community-post-actions > form {
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
    margin: 0.35rem 0.5rem 0.35rem 0;
}

.ct-icon-button {
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--ct-ink);
    border-radius: 0.55rem;
    background: transparent;
    color: var(--ct-ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ct-community-compose textarea,
.ct-community-post-actions textarea {
    width: min(100%, 42rem);
}

.ct-community-tombstone {
    color: var(--ct-ink-soft);
    font-style: italic;
}

.ct-site-footer {
    background: var(--ct-ink);
    color: rgba(255, 253, 248, 0.72);
}

.ct-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: end;
    padding-block: 2.5rem;
}

.ct-footer-name {
    margin: 0 0 0.35rem;
    color: var(--ct-white);
    font: 600 1.1rem/1.2 Georgia, "Times New Roman", serif;
}

.ct-footer-copy,
.ct-footer-meta {
    margin: 0;
    font-size: 0.78rem;
}

.ct-footer-meta {
    text-align: right;
}

@media (max-width: 56rem) {
    .ct-header-inner,
    .ct-footer-inner,
    .ct-section-heading {
        grid-template-columns: 1fr;
    }

    .ct-header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
        padding-block: 1rem;
    }

    .ct-primary-nav ul {
        justify-content: flex-start;
    }

    .ct-principles {
        grid-template-columns: 1fr;
    }

    .ct-article-grid,
    .ct-topic-grid,
    .cti-answer-layers {
        grid-template-columns: 1fr;
    }

    .ct-discovery-search > div {
        align-items: stretch;
        flex-direction: column;
    }

    .ct-principle {
        min-height: auto;
    }

    .ct-principle h3 {
        margin-top: 1.5rem;
    }

    .ct-footer-meta {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
