/* Talismac website. One stylesheet, no build step. Brand rules: docs/BRAND.md.
   After editing this file, run `node web/stamp.mjs` so browsers fetch the new version. */

/* Fonts are served from talismac.com itself, so no visitor data goes to a font service. */
@font-face{font-family:Fraunces;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/fraunces-600-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Fraunces;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/fraunces-600-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Figtree;font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/figtree-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Figtree;font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/figtree-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}

/* Brand colours: Red Thread, Marigold, Nazar Blue, Brass, Whitewash, Soot. */
:root {
  --bg: #fffdf9;
  --raised: #ffffff;
  --panel: #f8efe3;
  --ink: #1e1512;
  --soft: #5e4c43;
  --line: #eadccd;
  --red: #b3201a;
  --red-deep: #8e1913;
  --red-text: #a01c16;
  --field: #b3201a;
  --link: #1d4fb0;
  --gold: #f0a202;
  --ivory: #fff6e6;
  --brass: linear-gradient(#e6c06a, #8f6420);
  --cord: repeating-linear-gradient(160deg, #b3201a 0 7px, #f0a202 7px 10px, #b3201a 10px 17px);
  --cord-light: repeating-linear-gradient(160deg, #fff6e6 0 6px, #f0a202 6px 10px, #fff6e6 10px 16px);
  --radius: 18px;
  --display: Fraunces, "Iowan Old Style", Georgia, serif;
  --text: Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

/* At night: the same idea after the lamps are lit. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #160f0c;
    --raised: #211714;
    --panel: #1c1410;
    --ink: #f6ede4;
    --soft: #c4b2a5;
    --line: #3a2b24;
    --red-text: #ff7a66;
    --field: #8a1712;
    --link: #8fbcff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
source { display: none; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(32px, 4.4vw, 48px); max-width: 16ch; }
p { margin: 0 0 14px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(740px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 12px; }

/* Header. Its brass bottom edge is the lintel: on every page, things hang from it. */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; background: var(--brass); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 66px; }
.brand { display: block; color: var(--ink); }
.brand svg { height: 32px; width: auto; }
.nav { display: flex; gap: 22px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--soft); text-decoration: none; }
.nav a:hover { color: var(--ink); }
@media (max-width: 600px) { .nav .optional { display: none; } .nav { gap: 16px; } .brand svg { height: 28px; } }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 600; font-size: 16px; text-decoration: none; }
.button:hover { background: var(--red-deep); color: #fff; }
.button.light { background: var(--ivory); color: #a01c16; }
.button.light:hover { background: #fff; color: #8e1913; }
.button.ghost { background: transparent; color: var(--ivory); box-shadow: inset 0 0 0 1.5px rgba(255, 246, 230, .55); }
.button.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ivory); }
.button[aria-disabled="true"] { opacity: .6; pointer-events: none; }

/* Hero: a Red Thread field with the charm hanging from the lintel. */
.hero { background: var(--field); color: var(--ivory); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px; }
.hero-copy { padding: clamp(52px, 7vw, 100px) 0 clamp(56px, 6vw, 92px); }
.hero h1 { font-size: clamp(44px, 6.4vw, 82px); line-height: 1.02; max-width: 11ch; margin-bottom: 24px; }
.lede { font-size: clamp(18px, 1.6vw, 20px); color: #ffe9d6; max-width: 44ch; margin-bottom: 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-note { font-size: 14px; color: #fbd9cc; margin: 18px 0 0; }
.stage { display: flex; justify-content: center; }
.pendulum { display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; animation: swing 4.6s ease-in-out infinite alternate; will-change: transform; }
.pendulum .cord { width: 9px; height: clamp(110px, 15vw, 200px); background: var(--cord-light); }
.pendulum .cap { width: 18px; height: 12px; border-radius: 4px; background: var(--brass); }
.pendulum img { width: clamp(210px, 24vw, 290px); margin-top: -6px; filter: drop-shadow(0 22px 24px rgba(50, 8, 4, .35)); }
@keyframes swing { from { transform: rotate(5deg); } to { transform: rotate(-5deg); } }
@media (prefers-reduced-motion: reduce) { .pendulum { animation: none; } }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 0; }
  .stage { order: -1; }
  .pendulum .cord { height: 70px; }
  .pendulum img { width: 190px; }
  .hero-copy { padding-top: 24px; }
}

/* Sections */
section { padding: clamp(60px, 8vw, 100px) 0; }
section.alt { background: var(--panel); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 56px; align-items: end; margin-bottom: 44px; }
.section-head p { color: var(--soft); font-size: 18px; max-width: 56ch; margin: 0; }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; align-items: start; } }

/* "Your screen is a doorway": three doorway charms hanging from one lintel. */
.doorway .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.doorway h2 { margin-bottom: 20px; }
.doorway p { font-size: 18px; color: var(--soft); }
.doorway p:first-of-type { color: var(--ink); }
.doors { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 10px; }
.doors::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; border-radius: 3px; background: var(--brass); }
.door { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 14px; color: var(--soft); }
.door .cord { width: 5px; height: var(--h); background: var(--cord); }
.door img { width: min(150px, 100%); margin: -4px 0 10px; }
.door b { display: block; color: var(--ink); font-size: 15px; }
@media (max-width: 820px) { .doorway .wrap { grid-template-columns: 1fr; gap: 36px; } }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feature { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature h3 { font-size: 22px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--soft); font-size: 16px; }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.charm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.charm { text-align: center; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 10px 14px; }
.charm img { width: 96px; height: 96px; object-fit: contain; margin: 0 auto 10px; }
.charm span { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.charm small { color: var(--soft); font-size: 13px; }
.more { margin: 26px 0 0; font-weight: 600; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--raised); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; margin-bottom: 12px; }
.steps strong { display: block; margin-bottom: 4px; font-size: 18px; }
.steps span { color: var(--soft); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.fine { font-size: 14px; color: var(--soft); margin-top: 20px; }

/* Pricing: the cards hang from a brass rail. */
.pricing { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 56px; }
.pricing::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; border-radius: 3px; background: var(--brass); }
.price-card { position: relative; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.price-card::before, .price-card::after { content: ""; position: absolute; top: -49px; width: 4px; height: 48px; background: var(--cord); }
.price-card::before { left: 24%; }
.price-card::after { right: 24%; }
.price-card.main { border: 2px solid var(--gold); }
.price-card h3 { font-size: 24px; }
.price { font: 600 48px/1 var(--display); margin: 18px 0 4px; }
.price small { font: 400 16px var(--text); color: var(--soft); }
.price-card ul { padding-left: 20px; margin: 18px 0 24px; }
.price-card li { margin-bottom: 6px; }
.packs { list-style: none; padding: 0 !important; }
.packs li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.packs li:last-child { border-bottom: 0; }
.packs b { font: 600 21px var(--display); white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: #1e1512; margin-left: 6px; }
@media (max-width: 820px) { .pricing { grid-template-columns: 1fr; } .price-card:not(.main)::before, .price-card:not(.main)::after { display: none; } }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--red-text); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--soft); margin: 10px 0 0; }

/* The charms page */
.charm-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.charm-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: center; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.charm-item img { width: 112px; height: 112px; object-fit: contain; }
.charm-item h2 { font-size: 24px; max-width: none; }
.charm-item .where { color: var(--red-text); font-weight: 600; font-size: 14px; margin: 4px 0 6px; }
.charm-item p:last-child { margin: 0; color: var(--soft); font-size: 16px; }
@media (max-width: 760px) { .charm-list { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .charm-item { grid-template-columns: 80px minmax(0, 1fr); gap: 14px; } .charm-item img { width: 80px; height: 80px; } }

/* Text pages (legal, contact, charms intro) */
.page { padding: 60px 0 84px; }
.page h1 { font-size: clamp(38px, 5vw, 54px); margin-bottom: 18px; }
.page h2 { font-size: 26px; margin: 40px 0 10px; max-width: none; }
.page .intro { font-size: 19px; color: var(--soft); max-width: 60ch; margin-bottom: 40px; }
.page .updated { color: var(--soft); margin-top: -6px; }
.page li { margin-bottom: 6px; }
.callout { background: var(--raised); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 16px 20px; margin: 24px 0; }
table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 16px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 52px; color: var(--soft); font-size: 15px; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 56px; }
.site-footer .brand svg { height: 26px; }
.site-footer p { margin: 12px 0 0; }
.site-footer nav { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 36px; align-content: start; }
.site-footer a { color: var(--soft); }
.site-footer a:hover { color: var(--ink); }
@media (max-width: 600px) { .site-footer .wrap { grid-template-columns: 1fr; } }
