/*
Theme Name: 14 Prompts
Theme URI: https://14prompts.com/
Author: Story Cartel
Author URI: https://storycartel.com/
Description: 14prompts.com, from theme/starter. The autumn page, set from the book's cover: the book on Amazon first, a prompt to try with a 30-minute timer, and the free ebook.
Version: 0.1.3
Requires at least: 6.5
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fourteen
*/

/* ==========================================================================
   1. Tokens
   Taken from the cover: the peach to red-orange gradient is the one colored
   band (the readers), warm paper everywhere else. A tall Bodoni (the cover is
   Didot) at "opsz" 18 for the headings, Source Serif for reading, Jost for
   labels and buttons. One color scheme, no dark toggle.
   ========================================================================== */

:root {
	--paper: #fbf5ee;
	--paper-deep: #f5e6d6;
	--card: #fffaf4;
	--ink: #2a1a14;
	--ink-soft: #6e5446;
	--peach: #f6c9a0;
	--orange: #e8742c;
	--ember: #c2401c;
	--ember-deep: #9c3014;
	--display: "Bodoni Moda", "Didot", Georgia, serif;
	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--label: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
	--radius: 0.35rem;
	color-scheme: light;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.15rem/1.65 var(--serif); overflow-x: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; font-optical-sizing: none; font-variation-settings: "opsz" 18; line-height: 1.08; margin: 0 0 1rem; text-wrap: balance; color: inherit; }
h1 { font-size: clamp(2.4rem, 1.5rem + 3.4vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.1rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1rem; }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: var(--radius); font: 600 0.95rem var(--label); }
.skip-link:focus { top: 1rem; color: var(--paper); }

.label { font: 600 0.78rem/1.3 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ember-deep); margin: 0 0 0.75rem; }

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.btn,
.wp-block-button__link,
.signup .joes-form button[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 3.1rem; padding: 0.8rem 1.5rem;
	border-radius: var(--radius); border: 2px solid transparent;
	font: 600 1rem/1.2 var(--label); letter-spacing: 0.02em;
	text-decoration: none; cursor: pointer; text-align: center;
}
.btn--main, .wp-block-button__link, .signup .joes-form button[type="submit"] { background: var(--ember); color: #fff; }
.btn--main:hover, .wp-block-button__link:hover, .signup .joes-form button[type="submit"]:hover { background: var(--ink); color: #fff; }
.btn--line { border-color: currentColor; background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.buy { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.buy__note { font: 400 0.95rem/1.45 var(--label); color: var(--ink-soft); margin: 0.9rem 0 0; }
.buy__note a { color: var(--ember-deep); }
.linkish { font: 600 0.95rem var(--label); background: none; border: 0; color: var(--ember-deep); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; min-height: 44px; padding: 0 0.25rem; }

/* ==========================================================================
   4. Header
   ========================================================================== */

.top { padding-block: 1.25rem; }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.top__name { font: 600 1.6rem/1 var(--display); font-variation-settings: "opsz" 18; text-decoration: none; letter-spacing: -0.01em; }
.top__nav { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; font: 500 0.95rem var(--label); }
.top__nav ul { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; list-style: none; margin: 0; padding: 0; }
.top__nav ul a { text-decoration: none; }
.top__nav ul a:hover { color: var(--ember); }
.top__btn { min-height: 2.6rem; padding: 0.5rem 1.1rem; font-size: 0.9rem; }
@media (min-width: 46.01em) { .top__menu { display: none !important; } }
.top__menu { font: 600 0.9rem var(--label); background: none; border: 2px solid var(--ink); border-radius: var(--radius); color: var(--ink); padding: 0.45rem 0.9rem; min-height: 2.6rem; cursor: pointer; }

/* ==========================================================================
   5. Hero: the book beside its promise
   ========================================================================== */

.hero { padding-block: clamp(1.5rem, 1rem + 3vw, 4rem) clamp(3rem, 2rem + 4vw, 6rem); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2.5rem, 1rem + 5vw, 6rem); align-items: center; }
.book { position: relative; justify-self: center; width: min(100%, 23rem); }
.book img { width: 100%; border-radius: 2px 6px 6px 2px; box-shadow: 0 1.8rem 2.6rem -1.2rem rgba(120, 40, 10, 0.55), 0 0.4rem 0.8rem rgba(80, 30, 10, 0.18); }
.book::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 7%; border-radius: 2px 0 0 2px; background: linear-gradient(90deg, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0.12) 55%, rgba(0, 0, 0, 0)); pointer-events: none; }
.hero h1 { font-size: clamp(2.6rem, 1.5rem + 3.8vw, 4.6rem); letter-spacing: -0.015em; margin-bottom: 1.1rem; }
.hero h1 em { color: var(--ember); }
.rating { font: 500 0.95rem var(--label); color: var(--ink-soft); margin: 0 0 1.1rem; }
.stars { color: var(--ember); letter-spacing: 0.1em; margin-right: 0.35rem; }
.lede { font-size: 1.3rem; color: var(--ink-soft); max-width: 34rem; }
.hero__buy { margin-top: 0.5rem; }
.pull { margin: 1.75rem 0 0; padding-left: 1.25rem; border-left: 3px solid var(--orange); }
.pull p { font: italic 400 1.3rem/1.45 var(--serif); margin: 0 0 0.4rem; }
.pull cite, .quotes cite, .lead-quote cite { font: 500 0.9rem var(--label); font-style: normal; color: var(--ink-soft); }

/* ==========================================================================
   6. Sections
   ========================================================================== */

.section { padding-block: clamp(3.5rem, 2rem + 5vw, 7rem); }
.section__head { text-align: center; max-width: 40rem; margin: 0 auto clamp(2rem, 1rem + 3vw, 3.5rem); }
.section__head .label { padding-left: 0.16em; }
.on-deep { background: var(--paper-deep); }

/* What's inside: fourteen numbered prompts, set like a contents page (space between, no rules). */
.contents { list-style: none; margin: 0 auto; padding: 0; max-width: 64rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 4rem; }
.contents li { display: grid; grid-template-columns: 3.6rem 1fr; gap: 1rem; align-items: start; }
.contents .num { font: 500 3rem/0.85 var(--display); font-variation-settings: "opsz" 18; color: var(--orange); text-align: right; }
.contents h3 { font-size: 1.45rem; margin-bottom: 0.25rem; }
.contents p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }
.contents-note { text-align: center; margin: 2.75rem auto 0; max-width: 36rem; color: var(--ink-soft); }

/* Try one now: the prompt card with a 30-minute timer. */
.try { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.try__intro p { color: var(--ink-soft); }
.card { background: var(--card); padding: clamp(1.5rem, 1rem + 2.5vw, 2.75rem); border-top: 6px solid var(--orange); box-shadow: 0 1.2rem 2.4rem -1.4rem rgba(120, 40, 10, 0.45), 0 0 0 1px rgba(120, 40, 10, 0.07); }
.card__label { font: 600 0.78rem var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ember-deep); margin: 0 0 0.75rem; }
.card__title { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); line-height: 1.1; margin: 0 0 0.85rem; }
.card__text { font-size: 1.25rem; line-height: 1.5; margin: 0 0 1.25rem; min-height: 3em; }
.card__timer { font: 500 2.6rem/1 var(--display); font-variation-settings: "opsz" 18; font-variant-numeric: tabular-nums; margin: 0 0 1.25rem; }
.card__timer.is-done { color: var(--ember); }
.card__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Readers: the cover's gradient, the one colored band on the page. */
.readers { background: linear-gradient(160deg, #f6c9a0 0%, #ee9a5a 38%, #e0652b 72%, #c2401c 100%); color: #2a120a; }
.readers .label { color: #5c1d08; }
.lead-quote { max-width: 46rem; margin: 0 auto 3.25rem; text-align: center; }
.lead-quote p { font: italic 400 clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem)/1.32 var(--display); font-variation-settings: "opsz" 18; margin-bottom: 1rem; }
.readers cite { color: #4a1a0a !important; }
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 3rem; max-width: 64rem; margin-inline: auto; }
.quotes blockquote { margin: 0; }
.quotes p { font-size: 1.12rem; line-height: 1.5; margin-bottom: 0.5rem; }

/* ==========================================================================
   7. The free ebook (a Site Basics form), smaller than the book's ask
   ========================================================================== */

.ebook { background: var(--paper-deep); padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.ebook .wrap { display: grid; grid-template-columns: 8.5rem 1fr; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: center; max-width: 52rem; }
.ebook img { border-radius: 2px 4px 4px 2px; box-shadow: 0 1rem 1.6rem -0.8rem rgba(120, 40, 10, 0.5); }
.ebook h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); margin-bottom: 1.1rem; }
.signup__note { font: 400 0.9rem/1.45 var(--label); color: var(--ink-soft); margin: 0.8rem 0 0; }

.signup .joes-form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }
.signup .joes-form__field { flex: 1 1 15rem; margin: 0; }
.signup .joes-form__field > label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.signup .joes-form input[type="email"] { width: 100%; max-width: none; min-height: 3.1rem; padding: 0.7rem 1rem; font: 400 1rem var(--label); border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; color: var(--ink); }
.signup .joes-form__error { font: 400 0.9rem var(--label); margin-top: 0.3rem; }
.signup .joes-form__check { flex-basis: 100%; margin: 0; }
.signup .joes-form__actions { margin: 0; }
.signup .joes-form button[disabled] { opacity: 0.7; }
.signup .joes-form__status { flex-basis: 100%; font: 400 1rem/1.5 var(--label); }
.signup .joes-form__status p { margin: 0; }
.signup .joes-form__status a { color: var(--ember-deep); font-weight: 600; }
.signup .joes-form__status[data-state="sent"] { font-size: 1.1rem; }

/* ==========================================================================
   8. Joe's note and the last ask
   ========================================================================== */

.joe { width: min(100% - 2rem, 40rem); margin-inline: auto; }
.joe p { font-size: 1.22rem; }
.joe .sig { font: italic 500 1.7rem var(--display); font-variation-settings: "opsz" 18; color: var(--ember-deep); margin-top: 0.25rem; }

.last { text-align: center; }
.last .book { width: 10rem; margin: 0 auto 2rem; }
.last h2 { max-width: 32rem; margin-inline: auto; }
.last .buy { justify-content: center; margin-top: 1.5rem; }

/* ==========================================================================
   9. Footer and the phone's buy bar
   ========================================================================== */

.foot { background: var(--ink); color: #eadccf; padding-block: 3rem; font: 400 0.95rem/1.6 var(--label); }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; }
.foot p { margin: 0; }
.foot a { color: #f9d9b8; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; align-content: start; }
.foot__name { font: 600 1.5rem var(--display); font-variation-settings: "opsz" 18; color: #fff; margin-bottom: 0.5rem !important; }
.foot__legal { flex-basis: 100%; margin-top: 1rem !important; color: #cdb9a8; font-size: 0.85rem; }

/* Appears once the hero's buttons have scrolled away (phone only). */
.buybar { display: none; }

/* ==========================================================================
   10. Pages (the privacy policy)
   ========================================================================== */

.page-header { padding-block: clamp(2rem, 1.5rem + 3vw, 4rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); text-align: center; }
.page-header h1 { max-width: 46rem; margin-inline: auto; }
.page-header .lede { margin-inline: auto; }
.page-header .lede a { color: var(--ember-deep); }
.band { padding-block: 0 clamp(3.5rem, 2rem + 5vw, 6rem); }
.entry { max-width: 40rem; margin-inline: auto; }
.entry h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); margin-top: 2.5rem; }
.entry h3 { margin-top: 2rem; }
.entry ul, .entry ol { padding-left: 1.4rem; margin: 0 0 1.25rem; }
.entry a { color: var(--ember-deep); overflow-wrap: anywhere; }
.entry a:hover { color: var(--ink); }

/* ==========================================================================
   11. Phone: the promise and stars first, the book large but not the whole
   screen, then the two buttons; every word at least 1rem from the edges.
   ========================================================================== */

@media (max-width: 46em) {
	body { font-size: 1.1rem; }

	.top { padding-block: 0.9rem; }
	.has-menu-toggle .top__nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem 0 0.5rem; }
	.has-menu-toggle.is-menu-open .top__nav { display: flex; }
	.has-menu-toggle .top__nav ul { flex-direction: column; gap: 0.2rem; font-size: 1.1rem; }
	.has-menu-toggle .top__nav ul a { display: block; padding: 0.55rem 0; }
	.top__btn { align-self: flex-start; }

	.hero { padding-top: 0.25rem; }
	.hero__inner { grid-template-columns: 1fr; gap: 0; }
	.hero__text { display: contents; }
	.hero .label { order: 1; text-align: center; margin-top: 0.5rem; }
	.hero h1 { order: 2; text-align: center; font-size: 2.3rem; margin-bottom: 0.6rem; }
	.hero .rating { order: 3; text-align: center; margin-bottom: 1.25rem; font-size: 0.88rem; }
	.hero .book { order: 4; width: 44%; margin-bottom: 1.5rem; }
	.hero .lede { order: 5; text-align: center; font-size: 1.15rem; }
	.hero__buy { order: 6; margin-top: 0.25rem; }
	.hero .buy .btn { flex: 1 1 100%; }
	.hero .buy__note { order: 7; text-align: center; }
	.pull { order: 8; margin: 1.75rem 0 0; }

	.contents { grid-template-columns: 1fr; gap: 1.6rem; }
	.contents li { grid-template-columns: 2.6rem 1fr; gap: 0.85rem; }
	.contents .num { font-size: 2.3rem; }
	.contents h3 { font-size: 1.3rem; }
	.try { grid-template-columns: 1fr; }
	.try__intro { text-align: center; }
	.card__actions .btn { flex: 1 1 100%; }
	.quotes { grid-template-columns: 1fr; gap: 2rem; }

	.ebook .wrap { grid-template-columns: 1fr; text-align: center; }
	.ebook img { width: 7rem; margin-inline: auto; }
	.signup .joes-form__actions, .signup .joes-form button[type="submit"] { flex: 1 1 100%; width: 100%; }
	.last .buy .btn { flex: 1 1 100%; }

	.buybar { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; gap: 0.6rem; align-items: center; padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)); background: var(--ink); color: var(--paper); transform: translateY(110%); transition: transform 0.25s ease; box-shadow: 0 -0.4rem 1.2rem rgba(0, 0, 0, 0.18); }
	.buybar.is-on { transform: none; }
	.buybar img { width: 2.4rem; border-radius: 2px; }
	.buybar span { flex: 1; font: 600 0.85rem/1.25 var(--label); }
	.buybar .btn { min-height: 2.6rem; padding: 0.5rem 1rem; font-size: 0.9rem; }
	body.has-buybar .foot { padding-bottom: 6rem; }
}

/* The free ebook popup (popups/ebook.php). Joe's Popups draws the box; this is what's inside. */
.jp { --ground: var(--paper); }
.fourteen-popup__intro { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.1rem; align-items: center; margin-bottom: 1.1rem; }
.fourteen-popup__intro img { border-radius: 2px 4px 4px 2px; box-shadow: 0 0.8rem 1.2rem -0.6rem rgba(120, 40, 10, 0.5); }
.fourteen-popup h2 { font-size: 1.75rem; margin: 0 0 0.4rem; }
.fourteen-popup p { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--ink-soft); }
.fourteen-popup .label { margin-bottom: 0.35rem; color: var(--ember-deep); }
.fourteen-popup .joes-form { margin: 0; }
