/* The Cathedral website (welcome.html).
   Airy and quiet: one big picture, clean type, a serif italic word for the accent.
   Three looks, with the same colours public/js/themes.js gives each theme. */

:root, [data-theme="cathedral"] {
    --bg: #F3F2EF; --paper: #FCFCFA; --ink: #1F1F23; --soft: #6E6E76; --accent: #B38D35; --on: #1E1A10; --line: #DFDCD4; --tint: #7F93B5; --glass: rgba(252,252,250,.62);
    --art: radial-gradient(120% 90% at 70% 30%, #FFFBEA 0%, #EAD9A6 26%, #C9B27A 44%, #AEB9CF 68%, #E9E7E1 100%);
}
[data-theme="cherry-blossom"] {
    --bg: #FAEEF0; --paper: #FFF9F9; --ink: #33252A; --soft: #86696F; --accent: #B05676; --on: #FFF9F9; --line: #EFD6DC; --tint: #E2C7EE; --glass: rgba(255,249,249,.62);
    --art: radial-gradient(120% 90% at 70% 30%, #FFFFFF 0%, #FBE1E8 26%, #F0B9CB 46%, #E2C7EE 70%, #FAEEF0 100%);
}
[data-theme="starry-night"] {
    --bg: #0B0820; --paper: #1B1242; --ink: #ECE8F7; --soft: #A9A0CC; --accent: #E9C874; --on: #1A1233; --line: #2E2466; --tint: #6E3BE0; --glass: rgba(27,18,66,.6);
    --art: radial-gradient(120% 90% at 70% 30%, #B795F7 0%, #7638E6 24%, #4A26A8 46%, #1B1242 72%, #0B0820 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, sans-serif; line-height: 1.55; transition: background .6s, color .6s; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
em { font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif; font-style: italic; font-weight: 400; color: var(--accent); }
.over { margin: 0 0 18px; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -.02em; line-height: 1.08; }
h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); }
h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); }

.pill { display: inline-block; padding: 12px 26px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 34%, transparent); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; transition: transform .15s, box-shadow .2s, background .2s; }
.pill:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.14); }
.pill.solid { background: var(--paper); border-color: transparent; color: var(--ink); padding: 17px 44px; box-shadow: 0 6px 22px rgba(0,0,0,.10); }
.pill.off { color: var(--soft); cursor: default; }
.pill.off:hover { transform: none; box-shadow: none; }

/* ── the first screen ── */
.hero { position: relative; height: 100vh; min-height: 620px; max-height: 1000px; overflow: hidden; display: flex; flex-direction: column; }
.heroArt { position: absolute; inset: 0; background: var(--art); background-size: cover; background-position: center; transition: opacity .6s; }
/* a soft wash from the left, so the words always read over the picture */
.heroArt::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 78%, transparent) 0%, color-mix(in srgb, var(--bg) 46%, transparent) 38%, transparent 68%), linear-gradient(180deg, transparent 72%, color-mix(in srgb, var(--bg) 60%, transparent) 100%); }
.hero > * { position: relative; z-index: 2; }
.hero > .heroArt { position: absolute; z-index: 1; }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px clamp(20px, 6vw, 84px); }
.mark { font-size: 1.05rem; font-weight: 700; letter-spacing: .1em; }
.links { display: flex; gap: clamp(22px, 4.4vw, 64px); font-size: .78rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.links a.on, .links a:hover { color: var(--ink); }
.navEnd { display: flex; align-items: center; gap: 26px; font-size: .9rem; }
.navEnd .pill { text-transform: none; letter-spacing: 0; font-size: .9rem; font-weight: 500; padding: 9px 22px; }

.looks { z-index: 4 !important; position: absolute !important; left: clamp(20px, 3.6vw, 52px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 18px; }
.looks button { position: relative; width: 16px; height: 16px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: none; cursor: pointer; }
.looks button::before { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: var(--ink); opacity: .45; transition: opacity .2s; }
.looks button[aria-pressed="true"] { border-color: color-mix(in srgb, var(--ink) 55%, transparent); }
.looks button[aria-pressed="true"]::before, .looks button:hover::before { opacity: 1; }
.looks button span { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); opacity: 0; pointer-events: none; transition: opacity .2s; }
.looks button:hover span, .looks button:focus-visible span { opacity: 1; }

.heroIn { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(20px, 6vw, 84px) 0 clamp(64px, 14.5vw, 210px); max-width: 900px; }
.heroIn .over { margin-bottom: clamp(28px, 7vh, 64px); color: var(--ink); opacity: .72; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); }
h1 em { letter-spacing: -.01em; }
.lede { margin: clamp(22px, 4.5vh, 40px) 0 0; font-size: clamp(1rem, 1.25vw, 1.12rem); color: var(--ink); opacity: .8; }

.heroFoot { display: flex; align-items: center; padding: 0 clamp(20px, 6vw, 84px) clamp(34px, 8vh, 78px) clamp(20px, 3.6vw, 52px); }
.num { width: clamp(44px, 10.9vw, 158px); font-size: clamp(2rem, 3.6vw, 3.2rem); font-weight: 200; line-height: 1; color: var(--paper); opacity: .78; letter-spacing: -.02em; }
.scroll { margin-left: auto; width: 20px; height: 34px; border-radius: 12px; background: var(--glass); display: flex; justify-content: center; padding-top: 7px; }
.scroll i { width: 4px; height: 4px; border-radius: 50%; background: var(--ink); animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(12px); opacity: .2; } }

/* ── sections ── */
.show, .wear, .get { text-align: center; padding: clamp(70px, 13vh, 150px) clamp(20px, 6vw, 84px) 0; }
.stage { max-width: 1180px; margin: clamp(34px, 6vh, 64px) auto 0; }

/* the app window (a drawing of the app, in the look's colours, until real screenshots are added) */
.win { display: block; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.06); text-align: left; color: var(--ink); background-size: cover; background-position: top center; }
.win.shot > * { visibility: hidden; }
.winBar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.winBar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.winBar .tab { margin-left: 14px; padding: 5px 16px; border-radius: 7px 7px 0 0; background: var(--paper); font-size: .72rem; color: var(--ink); align-self: flex-end; }
.winBar .tab.dim { margin-left: 2px; background: none; color: var(--soft); }
.winBody { display: flex; aspect-ratio: 16 / 9.4; }
.win aside { flex: none; width: 19%; padding: 14px 12px; background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.sidePic { aspect-ratio: 4 / 3; border-radius: 7px; background: var(--art); }
.win aside b { font-size: clamp(.6rem, 1vw, .82rem); font-weight: 600; text-align: center; margin-bottom: 6px; }
.row { height: 9px; border-radius: 5px; background: var(--line); width: 82%; }
.row.short { width: 56%; }
.row.on { background: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.win main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cover { display: block; height: 30%; background: var(--art); }
.page { flex: 1; padding: 4% 6%; display: flex; flex-direction: column; gap: 5%; }
.ttl { display: block; width: 34%; height: 18px; border-radius: 5px; background: var(--ink); opacity: .85; }
.cols { flex: 1; display: flex; gap: 5%; }
.col { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.col.narrow { flex: 0 0 30%; flex-direction: row; gap: 8%; }
.ln { display: block; height: 8px; border-radius: 4px; background: var(--line); }
.ln.short { width: 62%; }
.cards { display: flex; gap: 8px; margin: 6px 0; }
.cards i { flex: 1; aspect-ratio: 3 / 2; border-radius: 6px; background: var(--art); border: 1px solid var(--line); }
.pic.arch { flex: 1; border-radius: 999px 999px 6px 6px; background: var(--art); align-self: stretch; max-height: 100%; }
.cal { flex: 1; align-self: flex-start; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 6px; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 100% 20%, 14.285% 100%; }

/* ── close-ups ── */
.feats { max-width: 1180px; margin: 0 auto; padding: clamp(60px, 11vh, 130px) clamp(20px, 6vw, 84px) 0; display: flex; flex-direction: column; gap: clamp(56px, 10vh, 120px); }
.feat { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 6vw, 90px); align-items: center; }
.feat.flip .shot { order: 2; }
.shot { aspect-ratio: 5 / 4; border-radius: 20px; background: var(--art); padding: 9%; display: flex; align-items: center; justify-content: center; box-shadow: 0 24px 60px rgba(0,0,0,.12); overflow: hidden; }
.say p:last-child { margin: 18px 0 0; color: var(--soft); font-size: 1.04rem; max-width: 40ch; }
.close { width: 100%; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid color-mix(in srgb, var(--paper) 70%, transparent); border-radius: 14px; padding: 7%; }
.close.cols2 { display: flex; gap: 0; align-items: stretch; aspect-ratio: 16 / 9; }
.close.cols2 span { flex: 1.3; border-radius: 8px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.close.cols2 span:last-child { flex: 1; background: var(--art); }
.close.cols2 i { flex: none; width: 22px; position: relative; }
.close.cols2 i::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; border-radius: 1px; background: var(--accent); }
.close.cols2 i::after { content: ''; position: absolute; left: 4px; top: 50%; width: 14px; height: 30px; margin-top: -15px; border-radius: 7px; background: var(--paper); border: 1.5px solid var(--accent); }
.close.shelf { display: flex; gap: 5%; align-items: flex-end; }
.close.shelf i { flex: 1; aspect-ratio: 2 / 3; border-radius: 999px 999px 6px 6px; background: var(--art); border: 1px solid var(--line); box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.close.shelf i:nth-child(2) { aspect-ratio: 2 / 3.5; }
.close.shelf i:nth-child(even) { filter: hue-rotate(-18deg) saturate(.9); }
.close.month { aspect-ratio: 7 / 5; background-color: var(--paper); background-image: radial-gradient(circle at 64.3% 50%, var(--accent) 0 7%, transparent 7.5%), linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 100% 100%, 100% 20%, 14.285% 100%; padding: 0; }

/* ── the same home in every theme: a row of cards rolling left to right ── */
.wear { padding-left: 0; padding-right: 0; overflow: hidden; }
.roll { margin-top: clamp(40px, 7vh, 80px); padding: 10px 0 46px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.track { display: flex; gap: clamp(18px, 2.4vw, 34px); width: max-content; animation: roll 80s linear infinite; }
.roll:hover .track { animation-play-state: paused; }
/* The track holds the cards twice, so sliding it by half its width lands exactly where it began. */
@keyframes roll { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.card { flex: none; width: clamp(240px, 26vw, 380px); margin: 0; padding: 0; border: none; background: none; font: inherit; color: var(--ink); text-align: center; cursor: default; }
.card[data-set] { cursor: pointer; }
.card .win { aspect-ratio: 4 / 3; border-radius: 12px; box-shadow: 0 18px 44px rgba(0,0,0,.16), 0 2px 6px rgba(0,0,0,.06); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.card:hover .win { transform: translateY(-6px); }
.card .winBar { height: 24px; }
.card .winBar i { width: 7px; height: 7px; }
.mini { display: flex; flex-direction: column; gap: 7%; height: calc(100% - 24px); }
.mini .cover { height: 38%; flex: none; }
.mini .ttl, .mini .ln, .mini .cards { margin: 0 8%; }
.mini .ttl { height: 11px; width: 40%; }
.mini .cards i { aspect-ratio: 3 / 2; }
.card b { display: block; margin-top: 18px; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }

/* ── get it ── */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 980px; margin: clamp(34px, 6vh, 60px) auto 0; }
.way { display: flex; flex-direction: column; align-items: center; padding: 36px 24px 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.way b { font-size: 1.3rem; font-weight: 500; letter-spacing: -.01em; }
.way p { margin: 8px 0 24px; color: var(--soft); font-size: .93rem; flex: 1; }
.way .pill.solid { background: var(--accent); color: var(--on); padding: 13px 34px; box-shadow: none; }
.way .fine { flex: none; margin: 16px 0 0; font-size: .74rem; }
.way .fine i { font-style: normal; color: var(--ink); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: clamp(70px, 12vh, 140px); padding: 30px clamp(20px, 6vw, 84px) 44px; border-top: 1px solid var(--line); color: var(--soft); font-size: .84rem; }
footer .mark { font-size: .9rem; }
footer a { margin-left: 26px; }
footer a:hover { color: var(--ink); }

@media (max-width: 820px) {
    .links, .navEnd > a:first-child { display: none; }
    .nav { padding-top: 22px; }
    .looks { top: auto; bottom: 150px; left: 22px; transform: none; flex-direction: row; }
    .looks button span { display: none; }
    .heroIn { padding-left: 22px; padding-right: 22px; justify-content: flex-end; padding-bottom: 150px; }
    .heroArt::after { background: linear-gradient(180deg, transparent 20%, color-mix(in srgb, var(--bg) 72%, transparent) 62%, var(--bg) 100%); }
    .heroFoot { padding: 0 22px 34px; }
    .num { display: none; }
    .pill.solid { padding: 15px 30px; }
    .win aside { display: none; }
    .winBody { aspect-ratio: 4 / 3.4; }
    .feat, .feat.flip { grid-template-columns: 1fr; }
    .feat.flip .shot { order: 0; }
    .card { width: 68vw; }
    .ways { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
    /* no rolling: the row can be scrolled by hand instead */
    .roll { overflow-x: auto; }
}

/* ── a share link's page (/s/<token>, built in utils/site.js) ── */
.sharePage .nav { position: static; }
.shareBox { max-width: 720px; margin: 0 auto; padding: 10px clamp(20px, 6vw, 40px) 90px; text-align: center; }
.shareArt { height: clamp(180px, 34vw, 300px); border-radius: 20px; background: var(--art); background-size: cover; background-position: center; margin-bottom: clamp(28px, 5vh, 44px); box-shadow: 0 24px 60px rgba(0,0,0,.14); }
.shareBox h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.shareBox h2 { margin: 54px 0 16px; font-size: 1.3rem; }
.shareBox .lede { margin: 18px auto 0; max-width: 52ch; color: var(--soft); opacity: 1; }
.shareBox .cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 30px 0 22px; }
.shareBox .cta .pill.solid { background: var(--accent); color: var(--on); }
.shareBox .fine { margin: 14px auto 0; max-width: 56ch; font-size: .82rem; color: var(--soft); }
.shareBox .fine a { text-decoration: underline; }
.shareCode { display: inline-flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.shareCode code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .9rem; letter-spacing: .04em; }
.shareCode button { border: none; border-radius: 999px; padding: 7px 16px; background: var(--ink); color: var(--bg); font: inherit; font-size: .76rem; cursor: pointer; }
.shareList { list-style: none; margin: 0 auto; padding: 0; max-width: 460px; text-align: left; border-top: 1px solid var(--line); }
.shareList li { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.shareList li i { flex: none; width: 20px; text-align: center; font-style: normal; }
.shareList li.d1 { padding-left: 26px; } .shareList li.d2 { padding-left: 48px; } .shareList li.d3 { padding-left: 70px; } .shareList li.d4 { padding-left: 92px; }
.shareList li.d1, .shareList li.d2, .shareList li.d3, .shareList li.d4 { color: var(--soft); font-size: .88rem; }
