@font-face {
  font-family: 'Manchette Fine';
  src: url("../fonts/manchette-fine-extrabold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}

@font-face {
  font-family: 'Manchette Fine';
  src: url("../fonts/manchette-fine-light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0a0a0a;
  --ink: #1a1a1a;
  --white: #fafaf8;
  --soft-grey: #555;
  --light-grey: #e8e6e0;
  --grey: #888;
  --cream: #ebe5d7;
  --paper: #f7f3ea;
  --navy: #171c2b;
  --gold: #cbb585;
  --edge: #d8d0c0;
  --stroke: clamp(5px, 2.2cqw, 10px);
  --sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --arabic: 'Manchette Fine', 'Noto Naskh Arabic', 'Geeza Pro', 'Times New Roman', serif;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-head {
  text-align: center; padding: 1.4rem 16px 1.1rem;
  position: sticky; top: 0; z-index: 100;
  isolation: isolate;
}
/* Frosted glass behind the header, faded in once the page scrolls under it */
.site-head::before {
  content: ""; position: absolute; z-index: -1;
  top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  background: color-mix(in srgb, var(--white) 64%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  opacity: 0; transition: opacity 0.35s ease; pointer-events: none;
}
.site-head.is-stuck::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .site-head::before { transition: none; } }
[id] { scroll-margin-top: 7.5rem; }
.site-mark {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.35rem;
  text-decoration: none;
}
.product-nav {
  display: flex; align-items: baseline; justify-content: center;
  flex-wrap: wrap; gap: 0.75rem 1.5rem; margin: 1.1rem 0 0;
}
.product-nav a {
  font-family: var(--sans);
  font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; line-height: 1;
  border-bottom: 1px solid var(--light-grey); padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.product-nav a:hover, .product-nav a[aria-current="page"] { border-color: var(--black); }
.product-nav-price { color: var(--soft-grey); letter-spacing: 0.06em; }
.product-nav .sep { font-size: 0.95rem; line-height: 1; color: var(--soft-grey); transform: translateY(0.14em); }

/* ---------- intro ---------- */
.intro { max-width: 620px; margin: 0 auto; padding: 3.5rem 0 3rem; text-align: center; }
.intro h1 { font-weight: 500; font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.1; }
.intro .sub { margin-top: 0.6rem; font-style: italic; font-size: 1.2rem; color: var(--soft-grey); }
.intro p.lede { margin-top: 1.4rem; font-size: 1.2rem; line-height: 1.55; }

/* ---------- grid ---------- */
.deck {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 3rem 2rem;
  justify-items: center;
}
.deck > li { width: 100%; max-width: 400px; scroll-margin-top: 2rem; }

/* ---------- the card ---------- */
.card-wrap { container-type: inline-size; width: 100%; }

.card {
  position: relative;
  aspect-ratio: 5 / 7;              /* 2.5 x 3.5 in playing card */
  perspective: 1400px;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.card-inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.card.is-flipped .card-inner { transform: rotateY(180deg); }
.flip {
  position: absolute; inset: 0; z-index: 2;
  background: transparent; border: 0; padding: 0; margin: 0;
  border-radius: 5cqw; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.flip:focus { outline: none; }
.flip:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }

.face {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  border: var(--stroke) solid #fff;  /* white edge, as on a printed card */
  background-clip: padding-box;      /* keeps the face colour from bleeding past the white edge */
  border-radius: 5cqw;               /* 0.125 in corners */
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08);
  overflow: hidden;
}

.front {
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14cqw 11cqw;
  text-align: center;
}
.idx {
  position: absolute;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 6.5cqw;
  line-height: 1;
  color: var(--black);
}
.idx-tl { top: 4.3cqw; left: 5.3cqw; }
.idx-br { bottom: 4.3cqw; right: 5.3cqw; }

/* One size for every card. sayings.js shrinks the text (via --k) only on cards
   where it would otherwise overflow. */
.front blockquote { --k: 1; }
.ar {
  font-family: var(--arabic);
  font-weight: 800;
  font-size: calc(9cqw * var(--k) * var(--ka, 1));
  line-height: 1.6;
  color: var(--black);
}

.en {
  margin-top: calc(6cqw * var(--k));
  font-family: 'Joan', var(--serif);
  font-weight: 400;
  font-size: calc(5.6cqw * var(--k) * var(--ke, 1));
  line-height: 1.4;
  text-wrap: pretty;
  color: var(--ink);
}
.en.en-only { margin-top: 0; }

.back {
  background: var(--navy);
  transform: rotateY(180deg);
  display: flex; align-items: center; justify-content: center;
}
.back::before {
  content: "";
  position: absolute; inset: 3cqw;
  border: 0.5cqw solid var(--gold);
  border-radius: 2.5cqw;
  opacity: 0.6;
}
.back-title {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 7cqw;
  line-height: 1;
  text-align: center;
  color: var(--gold);
}
.back-title::after { content: "Alone with the Alone"; }   /* drawn, not text, so it isn't repeated in the page */
.back-title::before {            /* the floral sits above the title; the two are centred as one group */
  content: "";
  display: block;
  width: 54cqw;
  aspect-ratio: 410 / 260;
  margin-bottom: 9cqw;
  background: url("../images/with-the-alone-floral.svg") no-repeat center / contain;
}

/* ---------- chapter dividers ---------- */
.deck > li.chapter {
  grid-column: 1 / -1;
  max-width: none;
  display: flex; align-items: baseline; gap: 1rem;
  margin: 2.5rem 0 -0.5rem;
}
.deck > li.chapter:first-child { margin-top: 0; }
.chapter-name {
  flex: none;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.2;
}
.chapter-note { flex: none; font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft-grey); }
.chapter-rule { flex: 1; height: 1px; background: var(--light-grey); transform: translateY(-0.3em); }
.saying-chapter {
  text-align: center; margin-bottom: 1.4rem;
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft-grey);
}

/* ---------- a sequence, shown as a pile ---------- */
.pile { position: relative; display: block; text-decoration: none; color: inherit; }
.pile .card { cursor: pointer; transition: transform 0.25s ease; }
.pile:hover .card, .pile:focus-visible .card { transform: translate(-1cqw, -1.5cqw); }
.pile:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; border-radius: 5cqw; }
.pile-under {
  position: absolute; inset: 0;
  aspect-ratio: 5 / 7;
  background: var(--paper) padding-box;
  border: var(--stroke) solid #fff;
  border-radius: 5cqw;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.07);
  transform: translate(calc(var(--d) * var(--m) * 1cqw), calc(var(--m) * 1.4cqw)) rotate(calc(var(--d) * var(--m) * 1.1deg));
  transform-origin: 50% 100%;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1);
}
/* fan the cards underneath out a little on hover */
.pile:hover .pile-under, .pile:focus-visible .pile-under {
  transform: translate(calc(var(--d) * var(--m) * -1cqw), calc(var(--m) * 0.6cqw)) rotate(calc(var(--d) * var(--m) * 2.8deg)) scale(0.96);
}
@media (prefers-reduced-motion: reduce) { .pile-under, .pile .card { transition: none; } }

/* ---------- a sequence on its own page ---------- */
.sequence { padding: 3rem 0 0; }
.seq { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem 2rem; }
.seq > li { width: min(100%, 340px); }
.seq-step { margin-top: 0.8rem; text-align: center; font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft-grey); }
.seq-meta { max-width: 340px; margin: 1.5rem auto 0; }

/* ---------- under the card ---------- */
.card-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 0.9rem;
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.card-meta a { text-decoration: none; border-bottom: 1px solid var(--light-grey); }
.card-meta a:hover { border-color: var(--black); }
.share {
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  background: none; border: 0; border-bottom: 1px solid var(--light-grey);
  color: inherit; cursor: pointer; padding: 0;
}
.share:hover { border-color: var(--black); }

/* ---------- single card page ---------- */
.single { max-width: 520px; margin: 0 auto; padding: 3rem 0 0; }
.source-note { max-width: 520px; margin: 2.5rem auto 0; text-align: center; font-size: 1.15rem; line-height: 1.55; }
.pager {
  display: flex; justify-content: space-between; gap: 1rem;
  max-width: 520px; margin: 2.5rem auto 0;
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.pager a { text-decoration: none; border-bottom: 1px solid var(--light-grey); }
.pager a:hover { border-color: var(--black); }

/* ---------- book CTA + footer ---------- */
.book-cta { max-width: 592px; margin: 0 auto; padding: 5rem 16px 0; text-align: center; }
.book-cta p { font-size: 1.25rem; line-height: 1.55; }
.btn-order {
  display: inline-block; margin-top: 1.4rem;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--white); background: var(--black);
  border: 1px solid var(--black); border-radius: 999px; padding: 0.8rem 1.6rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-order:hover { background: var(--white); color: var(--black); }


.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--black); color: var(--white);
  font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.06em;
  padding: 0.6rem 1rem; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .card-inner { transition: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- footer (same as the book page) ---------- */
    /* ========== FOOTER (Kakimori-inspired) ========== */
    footer {
      position: relative;
      background: var(--cream);
      color: var(--ink);
      font-family: 'Cormorant Garamond', 'Playfair Display', serif;
      margin-top: 6rem;
      padding: 5.5rem 2rem 2.25rem;
    }

    /* Large floral filling the footer's left side */
    footer {
      overflow: hidden;
    }

    footer::before {
      content: "";
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      width: 100%;
      background: url("../images/with-the-alone-floral.svg") -3rem 50% / auto 110% no-repeat;
      opacity: 0.3;
      pointer-events: none;
    }

    .footer-inner {
      position: relative;
      z-index: 1;
    }

    .footer-inner {
      max-width: 960px;
      margin: 0 auto;
    }

    /* — Newsletter block — */
    .footer-letter {
      text-align: center;
      max-width: 520px;
      margin: 0 auto 4rem;
    }

    .footer-heading {
      font-family: 'Cormorant Garamond', 'Playfair Display', serif;
      font-size: clamp(2.2rem, 3vw, 1.8rem);
      font-weight: 400;
      font-style: italic;
      letter-spacing: -0.005em;
      line-height: 1.3;
      margin-bottom: 1rem;
      color: var(--black);
    }

    .footer-blurb {
      font-size: 1.08rem;
      line-height: 1.65;
      color: var(--soft-grey);
      margin-bottom: 1.25rem;
    }

    .footer-signup {
      display: inline-block;
      font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
      font-size: 0.78rem;
      font-weight: 500;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      text-decoration: none;
      color: var(--black);
      border: 1px solid rgba(10, 10, 10, 0.2);
      border-radius: 999px;
      padding: 0.65rem 1.25rem;
      transition: background 0.2s ease, border-color 0.2s ease;
    }

    .footer-signup:hover {
      background: rgba(10, 10, 10, 0.04);
      border-color: var(--black);
    }

    .footer-subscribe {
      margin-top: 0.25rem;
      text-align: center;
      max-width: 420px;
      margin-left: auto;
      margin-right: auto;
    }

    .footer-subscribe-form {
      margin: 0 auto;
      width: 100%;
    }

    .footer-subscribe-form .subscribe-field {
      margin: 0 0 1rem;
      width: 100%;
    }

    .footer-subscribe-form input[type="email"] {
      background: transparent;
      border: none;
      border-bottom: 1px solid rgba(10, 10, 10, 0.18);
      border-radius: 0;
      box-sizing: border-box;
      color: var(--black);
      font-family: 'Cormorant Garamond', 'Playfair Display', serif;
      font-size: 1.08rem;
      font-style: italic;
      line-height: 1.5;
      margin: 0;
      padding: 0.45rem 0 0.55rem;
      text-align: center;
      width: 100%;
    }

    .footer-subscribe-form input[type="email"]::placeholder {
      color: var(--grey);
      opacity: 1;
    }

    .footer-subscribe-form input[type="email"]:focus,
    .footer-subscribe-form input[type="email"]:focus-visible {
      border-bottom-color: var(--black);
      outline: none;
      box-shadow: none;
    }

    .footer-subscribe-form button[type="submit"] {
      background: var(--black);
      border: 1px solid var(--black);
      border-radius: 999px;
      box-shadow: none;
      color: var(--cream);
      cursor: pointer;
      font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
      font-size: 0.78rem;
      font-weight: 500;
      letter-spacing: 0.14em;
      line-height: 1;
      min-width: 9rem;
      padding: 0.75rem 1.5rem;
      text-transform: uppercase;
      transition: background 0.2s ease, color 0.2s ease;
    }

    .footer-subscribe-form button[type="submit"]:hover {
      background: transparent;
      color: var(--black);
    }

    .footer-subscribe-form button[type="submit"]:focus,
    .footer-subscribe-form button[type="submit"]:focus-visible {
      outline: none;
      box-shadow: none;
    }

    .footer-subscribe-form button[type="submit"]:disabled {
      cursor: wait;
      opacity: 0.7;
    }

    .footer-subscribe-form.is-error input[type="email"] {
      border-bottom-color: #c44;
    }

    .footer-subscribe-form .subscribe-message {
      color: var(--soft-grey);
      font-family: 'Cormorant Garamond', 'Playfair Display', serif;
      font-size: 1.05rem;
      font-style: italic;
      line-height: 1.55;
      margin: 0;
    }

    .footer-subscribe-form .subscribe-message.is-success {
      color: var(--black);
      font-size: 1.35rem;
      margin-bottom: 0.35rem;
    }

    .footer-subscribe-form .subscribe-honeypot {
      display: none !important;
    }

    .footer-subscribe-form .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      border: 0;
    }

    /* — Column grid — */
    .footer-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 2.5rem;
      padding: 1rem 0 3.25rem;
    }

    .footer-col h4 {
      font-family: 'Cormorant Garamond', 'Playfair Display', serif;
      font-size: 0.91rem;
      font-weight: 700;
      letter-spacing: 0.28em;
      text-transform: uppercase;
      color: var(--black);
      margin-bottom: 1.25rem;
    }

    .footer-col ul {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.7rem;
    }

    .footer-col a {
      font-size: 1.04rem;
      letter-spacing: 0.02em;
      text-decoration: none;
      color: var(--soft-grey);
      font-style: italic;
      transition: color 0.2s ease;
    }

    .footer-col a:hover {
      color: var(--black);
    }

    /* — Bottom row — */
    .footer-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1.5rem;
      padding-top: 2rem;
      font-size: 0.74rem;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--black);
    }

    .footer-bottom a {
      color: var(--grey);
      text-decoration: none;
      transition: color 0.2s ease;
    }

    .footer-bottom a:hover {
      color: var(--black);
    }

    .footer-mark {
      letter-spacing: 0.04em;
      text-transform: none;
      font-size: 1.04rem;
      color: var(--black);
    }


    @media (max-width: 640px) {
      footer { padding: 4rem 1.5rem 2rem; }
      .footer-bottom { flex-direction: column; text-align: center; gap: 0.75rem; }
      footer::before { width: 100%; background-position: -2rem -1rem; background-size: 130% auto; opacity: 0.2; }
    }

.footer-bottom a.footer-home { color: var(--black); text-decoration: none; }
.footer-bottom a.footer-home:hover { text-decoration: underline; text-underline-offset: 0.15em; }

.deck-note { margin-top: 2.5rem; font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--soft-grey); }
.single .deck-note, .seq-meta .deck-note { margin-top: 1rem; text-align: center; }

.intro .lede-ar { margin: 0.9rem 0 1.5rem; font-family: var(--arabic); font-weight: 300; font-size: 1.3rem; line-height: 1.7; }

/* ---------- closing quote and Instagram line (same as the book page) ---------- */
    .pre-footer-quote {
      max-width: 560px;
      margin: 0 auto;
      padding: clamp(6rem, 14vw, 10rem) 2rem 1.5rem;
      text-align: center;
      font-family: 'Cormorant Garamond', 'Playfair Display', serif;
      font-size: clamp(1.2rem, 2.4vw, 1.55rem);
      font-style: italic;
      font-weight: 400;
      letter-spacing: 0.01em;
      line-height: 1.35;
      color: var(--black);
    }

    .pre-footer-instagram {
      max-width: 560px;
      margin: 0 auto;
      padding: 0 2rem 4rem;
      text-align: center;
      font-family: 'Cormorant Garamond', 'Playfair Display', serif;
      font-size: 1.18rem;
      line-height: 1.7;
      color: var(--black);
    }

    .pre-footer-instagram a {
      color: inherit;
      text-decoration: underline;
      text-underline-offset: 0.12em;
    }
.footer-quote { margin: 0 auto 2.75rem; }
footer { margin-top: 3rem; padding: 3.5rem 2rem 3rem; }
@media (max-width: 640px) { footer { padding: 3rem 1.5rem 2.75rem; } }
.footer-quote .pre-footer-quote { padding: 0 0 1.5rem; }
.footer-quote .pre-footer-instagram { padding: 0; }
.book-cta-single { padding-top: 7.5rem; padding-bottom: 3.5rem; }
.front .ant { position: absolute; left: 0; bottom: 30cqw; width: 93cqw; height: auto; color: var(--black); pointer-events: none; }
html, body { overflow-x: clip; }
.product-nav a:not([aria-current="page"]) { border-bottom-color: transparent; }
.product-nav a:not([aria-current="page"]):hover { border-bottom-color: var(--black); }
