/*
South Seas Ministries
Main Website Stylesheet
South Seas Ministries Web 2.0
Developed by South Seas Tech™ · Developer: Grant Abbott
*/

* { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; display: block; }

:root {
    --sand: #faf6ee;
    --cream: #ffffff;
    --shell: #f1e9da;
    --line: #e4d9c6;
    --ink: #22302f;
    --muted: #5e6a68;
    --sea: #1f5b66;
    --sea-deep: #143f47;
    --sea-soft: #e0eeee;
    --gold: #b98339;
    --gold-soft: #f6ead4;
    --display: "EB Garamond", "Garamond", Georgia, serif;
    --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
    --radius: 14px;
}

html { scroll-behavior: smooth; }
body { background: var(--sand); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
main { flex: 1; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--sea-deep); line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.3rem); margin-bottom: .7rem; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .8rem; }
h3 { font-size: 1.35rem; margin-bottom: .4rem; }
p { margin-bottom: .7rem; }
a { color: var(--sea); }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1160px, 92%); margin: 0 auto; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 253, 248, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--sea-deep); }
.brand img { width: 48px; height: 48px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--display); font-size: 1.35rem; font-weight: 600; }
.brand-text small { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.site-nav { display: flex; gap: .2rem; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .98rem; padding: .45rem .8rem; border-radius: 999px; }
.site-nav a:hover { background: var(--sea-soft); color: var(--sea-deep); }
.site-nav a[aria-current="page"] { color: var(--sea-deep); background: var(--gold-soft); }
.nav-toggle { display: none; background: var(--cream); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .9rem; font: inherit; cursor: pointer; }

/* Home hero */
.home-hero { position: relative; padding: 2.4rem 0 4.2rem; background: radial-gradient(ellipse at 85% 10%, rgba(185, 131, 57, .14), transparent 55%), linear-gradient(160deg, var(--sea-soft), var(--sand) 65%); }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: center; }
.hero-mark { justify-self: center; }
.hero-mark img { width: min(340px, 80vw); border-radius: 50%; box-shadow: 0 24px 50px rgba(20, 63, 71, .22); }
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 40px; fill: var(--sand); }
.btn-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.2rem; }

.banner-frame { position: relative; margin: 0 auto; border-radius: 22px; overflow: hidden; box-shadow: 0 22px 48px rgba(20, 63, 71, .18); border: 6px solid #fff; }
.banner-frame img { width: 100%; aspect-ratio: 12 / 5; object-fit: cover; filter: saturate(.78) contrast(.95) brightness(1.03); }
.banner-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(224, 238, 238, .16), rgba(250, 246, 238, .10) 55%, rgba(31, 91, 102, .14)); pointer-events: none; }
.hero-text { text-align: center; max-width: 760px; margin: 2rem auto 0; }
.hero-text .lead { margin: 0 auto; }
.hero-text .btn-row { justify-content: center; }

/* Buttons */
.button-primary, .button-secondary { display: inline-block; padding: .7rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: .98rem; text-decoration: none; border: 2px solid transparent; transition: all .2s ease; }
.button-primary { background: var(--sea); color: #fff; }
.button-primary:hover { background: var(--sea-deep); color: #fff; }
.button-secondary { border-color: var(--sea); color: var(--sea); background: transparent; }
.button-secondary:hover { background: var(--sea); color: #fff; }

/* Sections */
main > section { width: min(1160px, 92%); margin: 0 auto; padding: 2.8rem 0; }
main > section.home-hero { width: 100%; padding: 2.4rem 0 4.2rem; }
.welcome { max-width: 820px !important; text-align: center; }
.welcome p { color: var(--muted); font-size: 1.08rem; }
#resources { text-align: center; }
#resources p { color: var(--muted); }

.page-title, .book-list-intro { text-align: left; padding-top: 3rem !important; }
.page-title p, .book-list-intro > p { color: var(--muted); max-width: 46rem; font-size: 1.08rem; }
.page-heading { margin-top: .4rem; }
.reference { color: var(--gold); font-size: 1.02rem; }
.story-subtitle { font-family: var(--display); font-size: 1.35rem; color: var(--muted); margin-top: -.3rem; }

/* Breadcrumb */
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: .8rem; }
.breadcrumb a { color: var(--sea); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-current] { color: var(--ink); }

/* Tiles */
.tile-section { margin-top: 1rem; }
.tile-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.2rem; }
.tile { display: flex; flex-direction: column; height: 100%; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: 0 8px 22px rgba(20, 63, 71, .06); transition: transform .2s ease, box-shadow .2s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(20, 63, 71, .14); color: var(--ink); }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.tile-body { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.15rem 1.1rem; flex: 1; }
.tile-title { font-family: var(--display); font-size: 1.4rem; font-weight: 600; color: var(--sea-deep); line-height: 1.15; }
.tile-subtitle { font-family: var(--display); font-style: italic; color: var(--muted); font-size: 1.05rem; }
.tile-reference { font-size: .88rem; color: var(--gold); }
.tile-status { margin-top: auto; padding-top: .6rem; }
.status { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .22rem .7rem; border-radius: 999px; }
.status-ready { background: var(--sea); color: #fff; }
.status-progress { background: var(--gold-soft); color: #8a5f22; }
.status-soon { background: var(--shell); color: var(--muted); }
.section-footer { margin-top: 1.4rem; text-align: center; }

/* Reflections and about features */
.reflections-card, .about-card { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 22px rgba(20, 63, 71, .06); margin-top: 1rem; }
.reflections-card, .about-card { align-items: stretch; }
.reflection-image, .about-image { max-height: 340px; overflow: hidden; }
.reflection-image img, .about-image img { width: 100%; height: 100%; max-height: 340px; object-fit: cover; }
.reflection-content, .about-content { padding: 1.8rem 2rem; }
.reflection-content p, .about-content p { color: var(--muted); }
.reflection-feature .reflections-card { grid-template-columns: 1.2fr 1fr; }

/* About page */
.about-section { max-width: 860px !important; }
.about-section > p { color: var(--muted); font-size: 1.05rem; }
.about-section dl { display: grid; gap: .9rem; margin-top: .8rem; }
.about-section dt { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--sea-deep); }
.about-section dd { color: var(--muted); margin-top: .1rem; }
.work-status { display: inline-block; margin-left: .5rem; font-family: var(--body); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .15rem .6rem; border-radius: 999px; background: var(--gold-soft); color: #8a5f22; vertical-align: middle; }
.leadership-card { display: grid; grid-template-columns: 200px 1fr; gap: 1.6rem; align-items: center; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.leadership-image img { width: 200px; height: 200px; object-fit: cover; border-radius: 50%; }
.leadership-content p { color: var(--muted); }
#statement-of-faith { border-top: 1px solid var(--line); }

/* Story pages */
.story-header { display: grid; grid-template-columns: 1fr; padding-top: 2.4rem !important; }
.story-header img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin: .4rem 0 1.4rem; box-shadow: 0 16px 36px rgba(20, 63, 71, .16); }
.story-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem 1.4rem; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.3rem; margin-top: .6rem; font-size: .95rem; }
.story-details strong { color: var(--sea-deep); }
.story-content { padding-top: 1rem !important; }
.story-container { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem clamp(1.2rem, 5vw, 3.4rem); max-width: 860px; margin: 0 auto; font-size: 1.08rem; line-height: 1.75; }
.story-container h2, .story-container h3 { margin-top: 1.4rem; }
.story-container p { margin-bottom: 1rem; }
.story-container blockquote { border-left: 3px solid var(--gold); padding: .4rem 0 .4rem 1rem; margin: 1rem 0; color: var(--muted); font-style: italic; }
.story-placeholder { text-align: center; padding: 1.2rem 0; }
.story-placeholder p { color: var(--muted); }
.story-pagination { width: min(860px, 92%); margin: 0 auto 3rem; display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
.story-pagination a, .story-pagination span { font-size: .95rem; text-decoration: none; }
.pagination-prev { justify-self: start; }
.pagination-up { justify-self: center; padding: .5rem 1.1rem; border: 2px solid var(--sea); border-radius: 999px; font-weight: 700; color: var(--sea); }
.pagination-up:hover { background: var(--sea); color: #fff; }
.pagination-next { justify-self: end; text-align: right; }
.pagination-disabled { color: var(--muted); opacity: .7; }

/* Footer */
.site-footer { background: var(--sea-deep); color: #cfe0df; padding: 2.4rem 0 1.6rem; font-size: .9rem; margin-top: 2rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: center; }
.footer-brand p { margin-bottom: .3rem; }
.foot-name { font-family: var(--display); font-size: 1.3rem; color: #fff; }
.footer-logos { display: flex; gap: .8rem; }
.footer-logos img { width: 54px; height: 54px; border-radius: 50%; opacity: .85; background: #fff; }
.credit { grid-column: 1 / -1; font-size: .72rem; opacity: .6; letter-spacing: .02em; margin: 0; }

/* Responsive */
@media (max-width: 900px) {
    .hero-inner, .reflections-card, .about-card, .reflection-feature .reflections-card { grid-template-columns: 1fr; }
    .hero-mark { order: -1; }
    .hero-mark img { width: 220px; }
}
@media (max-width: 760px) {
    .banner-frame { border-width: 3px; border-radius: 14px; }
    .hero-text { margin-top: 1.4rem; }
    .nav-toggle { display: block; }
    .site-nav { display: none; width: 100%; flex-direction: column; padding-bottom: .6rem; }
    .site-nav.open { display: flex; }
    .brand { flex: 1; min-width: 0; }
    .brand-text strong { font-size: 1.12rem; }
    .brand-text small { display: none; }
    main > section { padding: 2.2rem 0; }
    .leadership-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .story-pagination { grid-template-columns: 1fr; text-align: center; }
    .pagination-prev, .pagination-next, .pagination-up { justify-self: center; text-align: center; }
    .site-footer .wrap { grid-template-columns: 1fr; }
}

.mission-line { font-family: var(--display); font-size: 1.35rem; color: var(--sea-deep); border-left: 3px solid var(--gold); padding-left: 1rem; margin: .4rem 0 1rem; }

/* Books and Give · South Seas Ministries Web 2.2 */
.is-waiting { cursor: default; opacity: .75; }
.is-waiting:hover { background: transparent; color: var(--sea); }
.small-note { font-size: .9rem; color: var(--muted); }
.site-nav a { padding-left: .6rem; padding-right: .6rem; }
.gb h2:not(:first-child) { margin-top: 2.2rem; }
.book-buy { margin-top: .7rem; }
.book-cover-page { max-width: 760px !important; text-align: center; }
.book-cover { width: min(320px, 70%); height: auto; margin: 1rem auto 1.2rem; border-radius: 10px; box-shadow: 0 14px 32px rgba(20, 63, 71, .18); }
.book-credits { font-family: var(--display); font-size: 1.15rem; color: var(--sea-deep); margin: .6rem 0 1rem; }
.book-notice { font-size: .82rem; color: var(--muted); line-height: 1.55; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1rem 0 .3rem; margin: 0 auto 1rem; }
.book-notice p { margin: 0 0 .8rem; }
.tile-cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; }
a.tile-title { text-decoration: none; }
.book-cover-page .btn-row { justify-content: center; }

/* Web 2.9: the Genesis books and the Quiet Reflections gallery */
.book-grid { margin: 1.4rem 0 2rem; }
.tile img.book-shelf-cover { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f3ede1; display: block; border-bottom: 1px solid var(--line); }
.book-tile .tile-body { display: flex; flex-direction: column; gap: .2rem; }
.book-tile .book-buy { margin-top: .5rem; }
.book-tile .book-buy .button-primary, .book-tile .book-buy .button-secondary { display: inline-block; width: 100%; text-align: center; box-sizing: border-box; }
.book-cover-page .book-cover { width: min(720px, 96%); border: 1px solid #c9b78f; padding: 5px; background: #fff; box-shadow: 0 10px 26px rgba(20, 63, 71, .12); }
.book-credit { font-family: var(--display); font-size: 1.12rem; color: var(--sea-deep); margin: .2rem 0; }
.book-preview { max-width: 760px !important; }
.book-preview h1 { margin-bottom: .2rem; }
.book-ref { color: var(--gold, #b98a3e); letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; margin: 0 0 1.6rem; }
.book-ornament { text-align: center; color: #b98a3e; margin: 1.6rem 0; }
.prayer-salutation { font-style: italic; }
.book-get { max-width: 760px !important; text-align: center; }
.book-get .btn-row { justify-content: center; flex-wrap: wrap; gap: .6rem; }
.reflection-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tile img.reflection-thumb { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: top; display: block; border-bottom: 1px solid var(--line); }
.reflection-tile .tile-body { padding: .6rem .8rem; text-align: center; }

/* Book pages show the published cover (portrait) */
.book-cover-page .book-cover.book-cover-published { width: min(380px, 82%); padding: 0; border: 0; border-radius: 6px; box-shadow: 0 14px 30px rgba(20, 63, 71, .22); }

/* Genesis story pages show each book's own ePub cover art, whole and uncropped */
.story-header img.book-art { width: auto; max-width: 100%; max-height: 520px; object-fit: contain; display: block; margin: .4rem auto 1.4rem; }
.tile img.book-art { object-fit: contain; background: #f3ede1; }
.status-open { background: var(--sea); color: #fff; }
.status-process { background: var(--gold-soft); color: #8a5f22; }
