/* Public homepage templates (resources/views/site/template.blade.php).
   One markup per section; the template's header / hero / section variants are pure CSS.
   Colours come from --s-* set per template, heading type from --serif / --heading-* (Themes::css). */

.site { margin: 0; background: var(--s-bg); color: var(--s-ink); font: 16px/1.6 "Helvetica Neue", Arial, sans-serif; }
.site h1, .site h2, .site h3 { font-family: var(--serif); font-style: var(--heading-style, normal); font-weight: var(--heading-weight, normal);
    text-transform: var(--heading-case, none); color: var(--s-ink); letter-spacing: -0.01em; }
.site h1 { font-size: clamp(44px, 6vw, 84px); line-height: 1.04; margin: 18px 0; letter-spacing: -0.03em; }
.site h1 em { font-style: italic; color: var(--s-hl); }
.site h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; margin: 10px 0; }
.site h3 { font-size: 24px; line-height: 1.2; margin: 10px 0; }
.site p { color: color-mix(in srgb, var(--s-ink) 72%, var(--s-bg)); }
.site a { color: inherit; }
.s-eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: 2px; font-size: 11px; font-weight: 700; }
.s-meta { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; opacity: .75; }
.s-link { font-size: 13px; }
.s-btn { display: inline-flex; align-items: center; gap: 6px; padding: 12px 22px; border-radius: 6px; background: var(--s-accent); color: var(--s-bg) !important;
    text-decoration: none; font-weight: 600; font-size: 14px; border: 1px solid var(--s-accent); }
.s-btn.outline { background: transparent; color: var(--s-ink) !important; border-color: color-mix(in srgb, var(--s-ink) 35%, transparent); }
.s-btn.is-disabled { opacity: .7; cursor: default; }
.s-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 0; }
.s-notice { background: var(--s-accent); color: var(--s-bg); text-align: center; font-size: 11px; padding: 7px 12px; letter-spacing: .5px; }
.s-empty { opacity: .7; }
.s-main .site-footer { border-color: color-mix(in srgb, var(--s-ink) 18%, transparent); }

/* Sections share a centred content width but backgrounds can run edge to edge. */
.s-section, .s-hero, .s-header { padding-left: max(6%, calc((100% - 1240px) / 2)); padding-right: max(6%, calc((100% - 1240px) / 2)); }
.s-section { padding-top: 80px; padding-bottom: 80px; }
.s-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.s-head p { margin: 0; font-size: 13px; text-align: right; }

/* ---------- Headers ---------- */
.s-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 24px; padding-bottom: 24px;
    border-bottom: 1px solid color-mix(in srgb, var(--s-ink) 20%, transparent); }
.s-logo { font: 700 26px var(--serif); font-style: var(--heading-style, normal); text-transform: var(--heading-case, none); text-decoration: none; color: var(--s-ink); }
.s-logo span { color: var(--s-hl); }
.s-nav { display: flex; gap: 26px; align-items: center; font-size: 13px; }
.s-nav a:not(.s-btn) { text-decoration: none; }
.s-nav .s-btn { padding: 9px 16px; font-size: 12px; }

.header-masthead .s-header { flex-direction: column; gap: 14px; border-bottom: 3px double color-mix(in srgb, var(--s-ink) 40%, transparent); }
.header-masthead .s-logo { font-size: 42px; font-weight: normal; }
.header-masthead .s-nav { gap: 34px; letter-spacing: 2px; text-transform: uppercase; font-size: 11px; }

.header-rail .s-header { position: fixed; z-index: 5; top: 0; bottom: 0; left: 0; width: 92px; padding: 28px 0; flex-direction: column; justify-content: space-between;
    background: var(--s-ink); border: 0; }
.header-rail .s-logo { writing-mode: vertical-rl; transform: rotate(180deg); color: var(--s-bg); font-size: 24px; }
.header-rail .s-logo img { max-width: 64px; transform: rotate(180deg); writing-mode: horizontal-tb; }
.header-rail .s-nav { writing-mode: vertical-rl; transform: rotate(180deg); gap: 22px; }
.header-rail .s-nav a { color: var(--s-bg); }
.header-rail .s-nav .s-btn { border-color: var(--s-bg); padding: 14px 8px; }
.header-rail .s-main, .header-rail .s-notice { margin-left: 92px; }

/* ---------- Heroes ---------- */
.s-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; padding-top: 70px; padding-bottom: 70px; }
.s-hero-copy p { font-size: 18px; max-width: 460px; }
.s-hero-photo { min-height: 440px; background: var(--s-soft) var(--s-photo) center / cover; }

.hero-split .s-hero-photo { border-radius: 240px 240px 0 0; }

.hero-center { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.hero-center .s-hero-copy p { margin: 0 auto; }
.hero-center .s-actions { justify-content: center; }
.hero-center .s-hero-photo { width: 100%; max-width: 1000px; min-height: 360px; border-radius: 14px; }

.hero-collage .s-hero-photo { transform: rotate(-3deg); border: 8px solid var(--s-accent); box-shadow: 18px 18px 0 var(--s-ink), 18px 18px 0 2px var(--s-accent); }
.is-dark .hero-collage .s-hero-photo { box-shadow: 18px 18px 0 #eef2cd; }

.hero-cover { grid-template-columns: 1.1fr 1fr; padding-right: 0; padding-top: 0; padding-bottom: 0; gap: 0; }
.hero-cover .s-hero-copy { padding: 80px 50px 80px 0; }
.hero-cover h1 { font-size: clamp(50px, 7vw, 96px); }
.hero-cover .s-hero-photo { align-self: stretch; min-height: 560px; }

.hero-reverse .s-hero-photo { order: -1; border-radius: 0 200px 0 0; }

.hero-arch { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.hero-arch .s-hero-copy p { margin: 0 auto; }
.hero-arch .s-actions { justify-content: center; }
.hero-arch .s-btn { border-radius: 30px; }
.hero-arch .s-hero-photo { width: 64%; min-height: 380px; border-radius: 400px 400px 18px 18px; }

/* ---------- Recipes ---------- */
.s-recipe-photo { position: relative; min-height: 200px; background: var(--s-soft) center / cover; }
.s-recipe-photo:not([style])::after { content: '❧'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 46px Georgia, serif; color: var(--s-accent); opacity: .5; }
.s-num { position: absolute; top: 12px; left: 12px; font-size: 11px; padding: 3px 8px; background: var(--s-bg); border-radius: 3px; z-index: 1; }
.s-recipe-body { padding: 18px 0 22px; }
.s-recipe h3 { font-size: 24px; }

.recipes-grid .s-recipe-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.recipes-grid .s-recipe { border-bottom: 1px solid color-mix(in srgb, var(--s-ink) 30%, transparent); }

.recipes-list .s-recipe-list { display: grid; gap: 16px; }
.recipes-list .s-recipe { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: center; border: 1px solid color-mix(in srgb, var(--s-ink) 15%, transparent);
    border-radius: 12px; overflow: hidden; background: color-mix(in srgb, #fff 55%, var(--s-bg)); }
.recipes-list .s-recipe-photo { min-height: 150px; height: 100%; }

.recipes-rows .s-recipe { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 28px 0; border-bottom: 1px solid color-mix(in srgb, var(--s-ink) 30%, transparent); }
.recipes-rows .s-recipe h3 { font-size: clamp(28px, 3vw, 40px); }
.recipes-rows .s-recipe-photo { min-height: 220px; }

.recipes-staggered .s-recipe-list { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px; }
.recipes-staggered .s-recipe:nth-child(2) { margin-top: 90px; }
.recipes-staggered .s-recipe:nth-child(3) { margin-top: -40px; }
.recipes-staggered .s-recipe-photo { min-height: 280px; }

.recipes-bento .s-recipe-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.recipes-bento .s-recipe:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; background: var(--s-soft); }
.recipes-bento .s-recipe:first-child .s-recipe-photo { min-height: 300px; }
.recipes-bento .s-recipe:first-child .s-recipe-body { padding-right: 30px; }

.recipes-pills .s-head { flex-direction: column; align-items: center; text-align: center; }
.recipes-pills .s-head p { text-align: center; }
.recipes-pills .s-recipe-list { display: grid; gap: 22px; max-width: 880px; margin: 0 auto; }
.recipes-pills .s-recipe { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; overflow: hidden; border-radius: 140px 26px 26px 140px;
    background: color-mix(in srgb, #fff 50%, var(--s-bg)); border: 1px solid color-mix(in srgb, var(--s-accent) 25%, transparent); }
.recipes-pills .s-recipe:nth-child(even) { border-radius: 26px 140px 140px 26px; }
.recipes-pills .s-recipe:nth-child(even) .s-recipe-photo { order: 2; }
.recipes-pills .s-recipe-photo { min-height: 190px; }

/* ---------- Library ---------- */
.s-books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.s-book { min-height: 230px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 8px;
    background: color-mix(in srgb, #fff 55%, var(--s-bg)); }
.s-book h3 { font-size: 26px; }
.s-library-head { margin-bottom: 30px; }

.library-band { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: center; background: var(--s-ink); }
.library-band, .library-band h2, .library-band h3 { color: var(--s-bg); }
.library-band p { color: color-mix(in srgb, var(--s-bg) 78%, var(--s-ink)); }
.library-band .s-book { background: transparent; border: 1px solid color-mix(in srgb, var(--s-bg) 60%, transparent); border-radius: 2px; }

.library-cards { background: var(--s-soft); }

.library-offset { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: center; }
.library-offset .s-book { background: transparent; border: 2px solid var(--s-ink); border-radius: 2px; box-shadow: 8px 8px 0 var(--s-accent); }
.is-dark .library-offset .s-book { border-color: #eef2cd; }

.library-spines { background: color-mix(in srgb, var(--s-hl) 14%, var(--s-bg)); }
.library-spines .s-book { border-left: 6px solid var(--s-accent); border-radius: 2px; }

.library-arches { text-align: center; background: color-mix(in srgb, var(--s-accent) 12%, var(--s-bg)); }
.library-arches .s-book { border-radius: 140px 140px 14px 14px; align-items: center; }

/* ---------- Offer ---------- */
.s-offer { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: center; }
.s-price strong { display: block; font: 58px var(--serif); font-style: var(--heading-style, normal); line-height: 1; margin-bottom: 8px; }
.s-price p { font-size: 13px; }

.offer-panel .s-price { background: var(--s-ink); color: var(--s-bg); padding: 34px; border-radius: 14px; }
.offer-panel .s-price p { color: color-mix(in srgb, var(--s-bg) 80%, var(--s-ink)); }
.offer-panel .s-price .s-btn { background: var(--s-accent); color: #fff !important; }
.offer-panel .s-price .s-btn.outline { background: transparent; border-color: var(--s-bg); color: var(--s-bg) !important; }

.offer-band { background: var(--s-accent); }
.offer-band, .offer-band h2, .offer-band p { color: var(--s-bg) !important; }
.offer-band .s-btn { background: var(--s-bg); color: var(--s-accent) !important; border-color: var(--s-bg); }
.offer-band .s-btn.outline { background: transparent; color: var(--s-bg) !important; border-color: var(--s-bg); }

.offer-dark { background: var(--s-ink); }
.offer-dark, .offer-dark h2, .offer-dark .s-price strong { color: var(--s-bg); }
.offer-dark p { color: color-mix(in srgb, var(--s-bg) 78%, var(--s-ink)); }
.offer-dark .s-btn.outline { color: var(--s-bg) !important; border-color: var(--s-bg); }

.offer-center { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.offer-center .s-actions { justify-content: center; }
.offer-center .s-btn { border-radius: 30px; }

/* ---------- FAQ ---------- */
.s-faq { max-width: 900px; margin: 0 auto; padding-left: 6%; padding-right: 6%; }
.s-faq details { padding: 18px 0; border-bottom: 1px solid color-mix(in srgb, var(--s-ink) 20%, transparent); }
.s-faq summary { cursor: pointer; font-weight: 600; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
    .s-nav a:not(.s-btn) { display: none; }
    .s-hero, .hero-cover, .s-offer, .library-band, .library-offset, .recipes-rows .s-recipe, .recipes-bento .s-recipe:first-child { grid-template-columns: 1fr; }
    .hero-cover { padding-right: max(6%, 0px); }
    .hero-cover .s-hero-copy { padding: 50px 0 30px; }
    .hero-reverse .s-hero-photo { order: 0; }
    .hero-arch .s-hero-photo { width: 100%; }
    .s-hero-photo { min-height: 300px; }
    .recipes-grid .s-recipe-list, .s-books { grid-template-columns: 1fr 1fr; }
    .recipes-staggered .s-recipe:nth-child(n) { margin-top: 0; }
    .header-rail .s-header { position: static; width: auto; flex-direction: row; padding: 16px 6%; }
    .header-rail .s-logo, .header-rail .s-nav { writing-mode: horizontal-tb; transform: none; }
    .header-rail .s-main, .header-rail .s-notice { margin-left: 0; }
    .s-head { display: block; }
    .s-head p { text-align: left; margin-top: 8px; }
}
@media (max-width: 600px) {
    .recipes-grid .s-recipe-list, .s-books, .recipes-staggered .s-recipe-list, .recipes-bento .s-recipe-list,
    .recipes-list .s-recipe, .recipes-pills .s-recipe { grid-template-columns: 1fr; }
    .recipes-pills .s-recipe, .recipes-pills .s-recipe:nth-child(even) { border-radius: 26px; }
    .recipes-pills .s-recipe:nth-child(even) .s-recipe-photo { order: 0; }
    .recipes-list .s-recipe-body, .recipes-pills .s-recipe-body, .recipes-bento .s-recipe:first-child .s-recipe-body { padding: 0 20px 20px; }
    .s-section { padding-top: 56px; padding-bottom: 56px; }
}
.header-rail .s-nav .s-btn.outline { color: var(--s-bg) !important; }
.recipes-pills .s-num { display: none; }
