/* The home page (index.html), on style.css's paper base: the cover with its one torn piece and ink
   line, the one dark field that shows the product, and the close back on the paper. */
.inside :focus-visible { outline-color: var(--marigold); }

/* Cover */
.cover {
    position: relative;
    min-height: min(100svh, 940px);
    display: flex;
    align-items: center;
    padding: 120px var(--gutter) 100px;
    overflow: hidden;
}
.cover-art { position: absolute; inset: 0; pointer-events: none; }
.cover-art img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
/* The one ink line draws itself once, as the pen moves. */
.cover-line img { animation: draw 2.4s cubic-bezier(0.5, 0, 0.2, 1) 0.5s both; }
@keyframes draw {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}
.cover-copy { position: relative; z-index: 2; max-width: 620px; }
/* A box with the wide art's own box and crop (1440 x 900, sliced to the right), so the slip it carries
   sits on the torn piece at any size. */
.cover-frame {
    position: absolute; right: 0; top: 50%; translate: 0 -50%;
    min-width: 100%; min-height: 100%; aspect-ratio: 1440 / 900;
    container-type: inline-size; pointer-events: none;
}
/* The message everyone sends, on a paper slip over the piece. */
.sent {
    position: absolute; left: 61%; top: 31%;
    font-size: 2.3cqw; font-weight: 900; line-height: 1; letter-spacing: -0.02em; color: var(--ink);
    background: var(--slip); padding: 0.5em 0.65em 0.4em; box-shadow: 2px 3px 0 rgba(31, 42, 39, 0.18);
    transform: rotate(4deg);
    animation: land 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 1.6s both;
}
.sent small { display: block; margin-top: 0.45em; font-size: 0.36em; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-soft); text-align: right; transition: opacity 0.3s; }
/* While home.js types the slip, the typed line stands in for the sent one and the time waits. */
.sent-typing { display: none; }
.sent.is-typing .sent-text { display: none; }
.sent.is-typing .sent-typing { display: inline; }
.sent.is-typing .sent-typing::after { content: ''; display: inline-block; width: 0.08em; height: 0.85em; margin-left: 0.06em; vertical-align: -0.05em; background: var(--ink); animation: caret 0.9s steps(1) infinite; }
.sent.is-typing small { opacity: 0; }
@keyframes caret { 50% { opacity: 0; } }
@keyframes land {
    from { opacity: 0; transform: translate(0, -0.4em) rotate(7deg); }
    to { opacity: 1; transform: rotate(4deg); }
}

/* The one dark field (the share cards' sage ground), and the one torn seam into it. */
.inside {
    position: relative;
    background: var(--night);
    color: var(--night-ink);
    padding: clamp(110px, 12vw, 170px) var(--gutter) clamp(100px, 10vw, 150px);
}
.inside .statement { max-width: 14em; }
.inside .statement em { color: var(--night-accent); }
.seam { position: absolute; left: 0; top: -36px; width: 100%; height: 40px; }

.piece {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(40px, 7vw, 120px);
    align-items: center;
    margin-top: clamp(80px, 9vw, 130px);
    max-width: 1180px;
}
.piece-flip .piece-art { order: 2; }
.piece-art { position: relative; display: grid; place-items: center; min-height: 300px; }
html:not(.js) .piece-heatmap, html:not(.js) .release { display: none; }
.piece-text h3 { font-weight: 700; font-size: 24px; margin-bottom: 12px; letter-spacing: -0.01em; }
.piece-text p { color: var(--night-soft); max-width: 30em; }

.heatmap { width: min(340px, 100%); height: auto; overflow: visible; }
.heatmap text { font: 700 9px 'Montserrat', sans-serif; letter-spacing: 0.1em; fill: var(--night-soft); }
.legend { display: flex; align-items: center; gap: 6px; width: min(340px, 100%); margin-top: 16px; font-size: 12px; font-weight: 700; color: var(--night-soft); }
.legend span:first-child { margin-right: 4px; }
.legend span:last-child { margin-left: 4px; }
.sw { width: 14px; height: 14px; border-radius: 3px; opacity: 0.85; }
.sw.clay { background: #C99683; }
.sw.sage { background: #5FB8B4; }
.sw.tide { background: #5EA8C9; }
.sw.moss { background: #7CC48E; }
.heatmap text.mark { fill: var(--night-accent); }
.month-read { width: min(340px, 100%); margin-top: 14px; font-size: 15px; color: var(--night-ink); }
.heatmap .ring { fill: none; stroke: var(--night-accent); stroke-width: 2.5; }
.mark-note { display: flex; align-items: center; gap: 8px; width: min(340px, 100%); margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--night-accent); }
.sw.ring { background: none; border: 2px solid var(--night-accent); opacity: 1; }
.promise { margin-top: 18px; padding-left: 14px; border-left: 2px solid var(--night-accent); font-size: 15px; color: var(--night-ink) !important; }

.asked { margin-bottom: 22px; }
/* How others answer the question: plain lines on the dark field, not cards. */
.replies { list-style: none; display: grid; gap: 14px; max-width: 30em; }
.replies li { padding-left: 14px; border-left: 2px solid rgba(168, 224, 206, 0.35); }
.replies p { color: var(--night-ink) !important; font-size: 16px; line-height: 1.45; }
.replies small { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--night-soft); }
.replies-note { margin: 12px 0 34px; font-size: 12px !important; color: var(--night-soft); opacity: 0.8; }
.asked span { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--night-accent); }
.asked q { display: block; font-weight: 900; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -0.01em; color: var(--night-ink); max-width: 16em; quotes: none; }
.zines { min-height: 340px; }
.zine { position: absolute; width: 44%; max-width: 210px; background: var(--slip); padding: 7px 7px 0; box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.35); }
.zine img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.zine figcaption { font-weight: 900; font-size: 12px; line-height: 1.1; color: var(--ink); padding: 8px 2px 9px; }
.z1 { left: 4%; top: 12%; transform: rotate(-5deg); }
.z2 { left: 29%; top: 2%; transform: rotate(2deg); z-index: 2; }
.z3 { left: 54%; top: 14%; transform: rotate(-1deg); z-index: 1; }

/* Release: the one thing the visitor does on the page. A paper slip like the hero's, written on, then
   let go: the letters drift off (home.js) and nothing is kept. */
.release { padding: clamp(110px, 11vw, 160px) var(--gutter) 0; }
.release label.statement { display: block; max-width: 14em; }
.release-slip {
    position: relative;
    max-width: 560px;
    margin-top: 34px;
    background: var(--slip);
    box-shadow: 2px 3px 0 var(--shadow), 0 10px 24px rgba(31, 42, 39, 0.06);
    transform: rotate(-1deg);
}
.release-slip textarea, .release-dust {
    display: block;
    width: 100%;
    padding: 22px 24px;
    font: 700 22px/1.4 'Montserrat', sans-serif;
    letter-spacing: -0.01em;
    color: var(--ink);
    white-space: pre-wrap;
    overflow-wrap: break-word;
}
.release-slip textarea { min-height: 120px; border: 0; background: none; resize: none; overflow: hidden; }
.release-slip textarea::placeholder { color: var(--ink-soft); opacity: 1; }
.release-slip textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.release-dust { position: absolute; inset: 0; pointer-events: none; }
.release.is-letting-go textarea::placeholder { color: transparent; }
.release-dust .w { white-space: nowrap; }
.release-dust .c { display: inline-block; white-space: pre; animation: drift 1.1s cubic-bezier(0.3, 0, 0.6, 1) var(--d) both; }
@keyframes drift {
    to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); filter: blur(3px); }
}
.release-button { margin-top: 20px; }
.release-done { max-width: 560px; }
.release-done:not(.is-shown) { display: none; }
.release.is-done .release-slip, .release.is-done .release-button { display: none; }
.release-done.is-shown { margin-top: 34px; animation: settle 0.8s ease both; }
.release-done-title { font-weight: 900; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; letter-spacing: -0.01em; }
.release-done-desc { margin-top: 12px; color: var(--ink-soft); }
.release-again { margin-top: 18px; padding: 0; border: 0; background: none; font: 700 15px 'Montserrat', sans-serif; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
@keyframes settle { from { opacity: 0; transform: translateY(6px); } }

/* Close: back on the paper. */
.close { padding: clamp(110px, 11vw, 160px) var(--gutter) clamp(90px, 9vw, 130px); }
.help-line { margin-top: 48px; font-size: 15px; color: var(--ink-soft); max-width: 40em; }
.help-line strong { color: var(--ink); }

/* Garden: the app's garden at three stages, between the release and the waitlist. */
.garden { padding: clamp(80px, 9vw, 120px) var(--gutter) 0; }
.garden .statement { max-width: 14em; }
.garden-stages { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 32px); max-width: 1280px; }
.garden-stages figure { margin: 0; }
.garden-stages img { display: block; width: 100%; height: auto; aspect-ratio: 6 / 5; border-radius: 4px; box-shadow: 2px 3px 0 rgba(31, 42, 39, 0.14); }
.garden-stages li:nth-child(odd) img { transform: rotate(-0.8deg); }
.garden-stages li:nth-child(even) img { transform: rotate(0.7deg); }
.garden-stages figcaption { margin-top: 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.garden-notes { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 10px; max-width: 32em; font-size: 17px; }
.garden-notes li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 12px 2px 0; border-radius: 50%; background: var(--house); }


@media (max-width: 960px) {
    .piece { grid-template-columns: 1fr; gap: 28px; }
    .piece-flip .piece-art { order: 0; }
}
/* Mid widths: the headline reaches the piece, so the slip drops below it. */
@media (min-width: 761px) and (max-width: 1180px) {
    .sent { left: 70%; top: 54%; }
}
@media (max-width: 760px) {
    .cover { display: block; min-height: 0; padding: 0 var(--gutter) 84px; }
    .cover-art { position: relative; inset: auto; height: 300px; margin: 0 calc(-1 * var(--gutter)); }
    .cover-art.cover-line { position: absolute; top: 0; left: 0; right: 0; margin: 0; }
    .cover-art img { object-position: center; }
    /* The tall art shows whole at the phone's width (390 x 440). */
    .cover-frame { top: 0; left: 0; translate: none; min-height: 0; aspect-ratio: 390 / 440; }
    .sent { left: 9%; top: 52%; font-size: min(5.6cqw, 26px); }
    /* The tall art (390 x 440 at this width) ends in an empty band under the piece: the copy rides up
       into it, so the headline and the waitlist form both fit on the first screen of a 390 x 844 phone. */
    .cover-copy { margin-top: -76px; }
    .zines { min-height: 250px; }
    /* The back card's caption sits where the middle card overlaps it, so it reads from the right. */
    .z3 figcaption { text-align: right; }
    /* Tighter breaks between sections, so the phone page doesn't stretch out in empty space. */
    .inside { padding-bottom: 72px; }
    .release { padding-top: 80px; }
    .garden { padding-top: 72px; }
    .garden-stages { grid-template-columns: 1fr; gap: 26px; margin-top: 28px; }
    .garden-notes { font-size: 16px; }
    .close { padding-top: 80px; padding-bottom: 56px; }
}
@media (max-width: 760px) {
    .release-slip textarea, .release-dust { padding: 18px 18px; font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
    .cover-line img { animation: none; }
    .sent { animation: none; }
    .release-done.is-shown { animation: none; }
}
