@import url("./components/ghost.css");
@import url("./components/globals.css");
@import url("./components/pwa.css");
@import url("./components/shop.css");

/* ---------- Home section rhythm ---------- */
.home-page > section,
.home-latest-posts,
.home-our-authors {
    padding-block: var(--section-y);
}

.home-page > section > hgroup,
.home-latest-posts > hgroup,
.home-our-authors > hgroup {
    max-width: var(--container-narrow);
    margin-inline: auto;
    padding-inline: var(--gutter);
    text-align: center;
    margin-bottom: var(--block-gap);
}

.home-page > section > hgroup > p,
.home-latest-posts > hgroup > p,
.home-our-authors > hgroup > p {
    color: var(--muted-foreground);
}

.why-it-works,
.social-proof {
    background: var(--muted);
}

/* ---------- Hero (uses --hero-cover-image from Ghost cover) ---------- */
.hero-section {
    position: relative;
    min-height: min(88vh, 900px);
    display: grid;
    place-items: center;
    text-align: center;
    padding: var(--section-y) var(--gutter);
    color: var(--cream);
    background-color: var(--green-dark);
    background-image:
        radial-gradient(
            120% 90% at 50% 35%,
            transparent 0%,
            color-mix(in oklab, var(--green-dark) 55%, transparent) 55%,
            color-mix(in oklab, var(--green-dark) 92%, transparent) 100%
        ),
        linear-gradient(
            to bottom,
            color-mix(in oklab, var(--green-dark) 35%, transparent) 0%,
            color-mix(in oklab, var(--green-dark) 78%, transparent) 100%
        ),
        var(--hero-cover-image, none);
    background-size: cover;
    background-position: center;
}

.hero-section hgroup {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    color: var(--gold);
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 7rem);
    letter-spacing: 0.02em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-section-tagline {
    max-width: 42ch;
    margin-inline: auto;
    font-size: 1.15rem;
    color: color-mix(in oklab, var(--cream) 88%, transparent);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

.hero-section .btn {
    margin-top: 1.5rem;
}

/* ---------- Trust strip ---------- */
.trust-strip {
    background: var(--green-forest);
    color: var(--cream);
    padding-block: 1.25rem;
}

.trust-strip-list {
    list-style: none;
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.85rem, 3vw, 1.75rem);
    justify-content: center;
    align-items: center;
    max-width: var(--container);
}

.trust-strip-item {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-light);
    position: relative;
    padding-inline-end: clamp(0.85rem, 3vw, 1.75rem);
}

.trust-strip-item:last-child {
    padding-inline-end: 0;
}

.trust-strip-item:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-end: 0;
    top: 50%;
    translate: 0 -50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: color-mix(in oklab, var(--gold-light) 55%, transparent);
}

/* ---------- Featured product (single card, centered) ---------- */
.featured-product .container {
    max-width: 460px;
}

.featured-product .container > p {
    margin: 0;
    padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    text-align: center;
    color: var(--muted-foreground);
    font-family: var(--gh-font-heading);
    font-size: 1.1rem;
    font-style: italic;
    background: var(--muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* ---------- Why it works ---------- */
.benefit-list {
    list-style: none;
    margin-inline: auto;
    padding-inline: var(--gutter);
    max-width: var(--container);
    display: grid;
    gap: var(--block-gap);
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.benefit-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.benefit-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.benefit-item h3 {
    color: var(--gold-dark);
}

/* ---------- How to use (numbered 01/02/03) ---------- */
.how-to-use-steps {
    list-style: none;
    counter-reset: step;
    margin-inline: auto;
    padding-inline: var(--gutter);
    max-width: var(--container);
    display: grid;
    gap: var(--block-gap);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.how-to-use-steps li {
    counter-increment: step;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.how-to-use-steps li::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    font-family: var(--gh-font-heading);
    font-size: 2.75rem;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* ---------- Social proof ---------- */
.testimonial-list {
    list-style: none;
    margin-inline: auto;
    padding-inline: var(--gutter);
    max-width: var(--container);
    display: grid;
    gap: var(--block-gap);
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.testimonial-item figure {
    margin: 0;
    padding: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.testimonial-item figure:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.testimonial-item blockquote {
    margin: 0 0 1rem;
    font-family: var(--gh-font-heading);
    font-size: 1.35rem;
    font-style: italic;
}

.testimonial-item figcaption {
    color: var(--muted-foreground);
    font-size: 0.9rem;
}

/* ---------- Brand story & final CTA (dark feature bands) ---------- */
.brand-story,
.final-cta {
    background: var(--green-dark);
    color: var(--cream);
    text-align: center;
}

.brand-story .container {
    max-width: var(--container-narrow);
}

.brand-story h2,
.final-cta h2 {
    color: var(--gold);
}

.brand-story-excerpt {
    font-size: 1.2rem;
    color: color-mix(in oklab, var(--cream) 85%, transparent);
}

.brand-story-link {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}

.brand-story-link:hover {
    text-decoration: underline;
}

.final-cta hgroup {
    max-width: var(--container-narrow);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* ---------- Authors (home) ---------- */
.authors-list {
    display: grid;
    gap: var(--block-gap);
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.authors-list article {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* ---------- Post index / archive ---------- */
.post-index {
    max-width: var(--container);
    margin-inline: auto;
    padding: var(--section-y) var(--gutter);
}

.post-index-header {
    text-align: center;
    margin-bottom: var(--section-y);
}

.post-index-description {
    color: var(--muted-foreground);
    font-size: 1.15rem;
}

.post-list {
    display: grid;
    gap: var(--block-gap);
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.post-list-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-list-item h2,
.post-list-item h3 {
    font-size: 1.4rem;
    margin: 0;
}

.post-list-item h2 a,
.post-list-item h3 a {
    text-decoration: none;
}

.post-list-item-image {
    margin: 0;
}

.post-list-item-image img {
    border-radius: var(--radius);
    aspect-ratio: 3/2;
    object-fit: cover;
    width: 100%;
}

.post-list-item-excerpt {
    color: var(--muted-foreground);
}

.post-list-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.post-list-item-meta a {
    text-decoration: none;
    color: var(--gold-dark);
}

/* ---------- Single post / page ---------- */
.post-page,
.page {
    padding-block: var(--section-y);
}

.post,
.page article {
    max-width: var(--container-narrow);
    margin-inline: auto;
}

.post-header,
.page-header {
    text-align: center;
    margin-bottom: var(--block-gap);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

.post-meta a {
    color: var(--gold-dark);
    text-decoration: none;
}

.post-feature-image {
    margin: 0 0 var(--block-gap);
}

.post-feature-image img {
    width: 100%;
    border-radius: var(--radius);
}

.post-feature-image figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin-top: 0.5rem;
}

.gh-content {
    font-size: 1.08rem;
}

.gh-content > * {
    margin-bottom: 1.4rem;
}

.gh-content h2,
.gh-content h3 {
    margin-top: 2rem;
}

.gh-content img {
    border-radius: var(--radius);
}

.gh-content blockquote {
    margin: 2rem 0;
    padding-left: 1.25rem;
    border-left: 3px solid var(--gold);
    font-family: var(--gh-font-heading);
    font-style: italic;
    font-size: 1.3rem;
}

.post-comments {
    max-width: var(--container-narrow);
    margin: var(--section-y) auto 0;
}

/* ---------- Author page ---------- */
.author-page {
    padding-block: var(--section-y);
    text-align: center;
}

.author-cover-image {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
}

.author-page > figure {
    margin: 1.5rem auto;
    width: fit-content;
}

.author-page > figure img {
    border-radius: 50%;
}

.author-meta {
    color: var(--muted-foreground);
}

.author-profile-footer {
    margin-top: var(--block-gap);
}

.author-profile-meta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.author-profile-social-link {
    color: var(--gold-dark);
}

/* ---------- Pagination ---------- */
.pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    max-width: var(--container-narrow);
    margin: var(--section-y) auto 0;
    padding-inline: var(--gutter);
}

.pagination .newer-posts {
    grid-column: 1;
    justify-self: start;
}

.pagination .page-number {
    grid-column: 2;
    justify-self: center;
}

.pagination .older-posts {
    grid-column: 3;
    justify-self: end;
}

.pagination .newer-posts,
.pagination .older-posts {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--gold-dark);
    transition: gap 0.15s ease;
}

.pagination .newer-posts:hover,
.pagination .older-posts:hover {
    gap: 0.7rem;
}

.pagination .page-number {
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}

/* ---------- Error / offline ---------- */
.error-page,
.offline-page {
    text-align: center;
    padding-block: var(--section-y);
}

.error-page h1 {
    font-size: clamp(3rem, 12vw, 7rem);
    color: var(--gold);
}

.offline-page-message {
    color: var(--muted-foreground);
    max-width: 46ch;
    margin-inline: auto;
}

.error-latest-posts {
    margin-top: var(--section-y);
    text-align: left;
}

.error-latest-posts h2 {
    text-align: center;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: var(--section-y);
}
