/* GenX Journaling, styled to match the Alquemie Arts front page.
   Palette: paper #f6f1ea (page), card #fbf8f3, ink #1f1a17, muted #4d443d,
   red #b3202b (links, buttons), rule #d9cfc2. Type: Iowan Old Style / Palatino / Georgia. */

:root {
  --vellum: #f6f1ea;
  --paper: #fbf8f3;
  --ink: #1f1a17;
  --ink-soft: #4d443d;
  --accent: #b3202b;
  --accent-dark: #8f1922;
  --card-line: #b9ad9d;
  --rule: #d9cfc2;
  --display: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --body: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --wrap: 1040px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background-color: var(--vellum);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; }
p { margin: 0 0 1rem; }
a { color: var(--accent); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

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

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--ink); color: var(--vellum); padding: .6rem 1rem; border-radius: 6px;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }


/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.4rem;
  background: var(--accent); color: #fff;
  border: 2px solid var(--accent); border-radius: 2px;
  font-family: var(--body); font-weight: 400; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn--small { padding: .5rem 1rem; font-size: .95rem; }
.btn--saffron { }
.btn[aria-disabled="true"] { opacity: .6; cursor: default; }

.textlink { text-underline-offset: 4px; }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem var(--gutter);
  background: color-mix(in srgb, var(--vellum) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--ink); text-decoration: none;
  font-size: .95rem; letter-spacing: .18em; text-transform: uppercase;
}
.brand-mark { width: 3rem; height: 3rem; display: block; mix-blend-mode: multiply; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.site-nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }

/* Hero */
.hero {
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
  display: grid; gap: 3.5rem;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 8vw, 6rem);
}
.hero h1 {
  font-size: clamp(2.6rem, 9vw, 4.75rem);
  line-height: 1.08; letter-spacing: 0;
  margin-bottom: 1.75rem;
}
.lede { font-size: clamp(1.3rem, 2.4vw, 1.65rem); line-height: 1.35; max-width: 24ch; margin-bottom: 1rem; }
.hero-sub { color: var(--ink-soft); max-width: 34ch; margin-bottom: 1.75rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }

/* Memory card deck */
.deck { width: 100%; max-width: 25rem; justify-self: center; }
.deck-stage { position: relative; margin-bottom: 1.75rem; }

.card {
  --lh: 2rem;
  --head: 2.4rem;
  --pad: .75rem;
  position: relative;
  background-color: var(--paper);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(31, 26, 23, .08), 0 10px 22px -12px rgba(31, 26, 23, .35);
}
.card--under { position: absolute; inset: 0; }
.card--u1 { transform: rotate(-3.5deg) translate(-6px, 4px); z-index: 0; }
.card--u2 { transform: rotate(2.5deg) translate(7px, 2px); z-index: 0; }

.card--top {
  z-index: 1;
  min-height: 15rem;
  padding: 0 1.4rem 1.25rem;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent calc(var(--lh) - 1px),
    var(--rule) calc(var(--lh) - 1px), var(--rule) var(--lh)
  );
  background-repeat: no-repeat;
  background-position: 0 calc(var(--head) + var(--pad) - var(--lh));
  background-size: 100% 100%;
}
.card--top::before {
  content: ""; position: absolute; left: 0; right: 0; top: var(--head);
  height: 2px; background: var(--card-line);
}
.card-count {
  height: var(--head); margin: 0 -1.4rem; padding: 0 1.4rem;
  position: relative; z-index: 1; background: var(--paper); border-radius: 6px 6px 0 0;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  font-size: .9rem; color: var(--ink-soft);
}
.card-cat { color: var(--ink-soft); font-weight: 600; }
.card-brand { font-family: var(--display); font-size: 1.05rem; color: var(--ink); }
.card-text {
  margin: var(--pad) 0 0; padding-top: 0;
  font-size: 1.2rem; font-weight: 400; line-height: var(--lh);
  color: var(--ink);
}

.btn--draw { display: none; }
.js .btn--draw { display: inline-flex; }


/* Intro */
.intro { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 6vw, 4rem); border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); }
.intro-grid { display: grid; gap: 2rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.intro h2, .supplies h2, .join h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.08; letter-spacing: 0; }
.intro-body p { max-width: 58ch; font-size: 1.2rem; }

.gifts { display: grid; gap: 2rem; }
.gift { border-left: 4px solid var(--accent); padding-left: 1.25rem; }
.gift h3 { font-size: 1.5rem; line-height: 1.15; margin-bottom: .6rem; }
.gift p { margin: 0; max-width: 34ch; }

/* Supplies */
.supplies { padding: clamp(3rem, 8vw, 6rem) 0; background: color-mix(in srgb, var(--vellum) 70%, white); border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); }
.supplies-intro { max-width: 58ch; margin: 1.25rem 0 .75rem; font-size: 1.2rem; }
.disclosure { max-width: 58ch; font-size: .95rem; color: var(--ink-soft); margin-bottom: 2.5rem; }

.drawers { display: grid; gap: 2.5rem 1.75rem; align-items: start; }
.drawer-tab {
  display: inline-block;
  margin-left: 1rem; padding: .45rem 1rem .4rem;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent); border-bottom: 0; border-radius: 2px 2px 0 0;
  font-size: 1.1rem; line-height: 1.2;
  position: relative; top: 2px;
}
.drawer-body {
  list-style: none; margin: 0; padding: .5rem 1.25rem;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 2px;
}
.drawer-body li { padding: 1.1rem 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.drawer-body li:last-child { border-bottom: 0; }
.item-name { margin: 0 0 .25rem; font-weight: 600; line-height: 1.3; }
.item-why { margin: 0; font-size: 1rem; color: var(--ink-soft); line-height: 1.5; }
.item-link { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.item-link:hover { text-decoration-thickness: 2px; }

/* Join */
.join { background: var(--paper); color: var(--ink); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.join-grid { display: grid; gap: 2.5rem; align-items: center; }
.join p { max-width: 40ch; }
.join-copy h2 { margin-bottom: 1rem; }
.join-copy .btn { margin-top: .75rem; }
.join-note { margin-top: 1rem; font-size: 1rem; color: var(--ink-soft); }

.when {
  --lh: 2rem; --head: 2.4rem; --pad: .75rem;
  position: relative;
  background-color: var(--paper); color: var(--ink);
  border-radius: 6px; padding: 0 1.5rem 1.5rem;
  max-width: 20rem; transform: rotate(1.5deg);
  box-shadow: 0 10px 22px -12px rgba(31, 26, 23, .45); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px), var(--rule) var(--lh));
  background-repeat: no-repeat; background-position: 0 calc(var(--head) + var(--pad) - var(--lh)); background-size: 100% 100%;
}
.when::before { content: ""; position: absolute; left: 0; right: 0; top: var(--head); height: 2px; background: var(--card-line); }
.when-label { height: var(--head); margin: 0 -1.5rem; padding: 0 1.5rem; position: relative; z-index: 1; background: var(--paper); border-radius: 6px 6px 0 0; line-height: var(--head); font-size: .9rem; color: var(--ink-soft); }
.when-date { font-family: var(--display); font-size: 2.6rem; line-height: calc(var(--lh) * 2); margin: var(--pad) 0 0; padding: 0; }
.when-meta { margin: 0; line-height: var(--lh); font-weight: 500; }

/* Footer */
.site-foot { background: var(--vellum); color: var(--ink-soft); padding: 0 0 2.5rem; font-size: .95rem; }
.foot-grid { display: grid; gap: .5rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.foot-grid p { margin: 0; }
.site-foot a { color: var(--ink-soft); }
.foot-links a + a { margin-left: 1.25rem; }

/* Thank-you page */
.thanks { padding: clamp(3rem, 8vw, 6rem) 0; }
.thanks-grid { display: grid; gap: 2.5rem; align-items: center; margin-bottom: 3rem; }
.thanks-title { font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1; letter-spacing: 0; margin-bottom: 1.25rem; }
.thanks-lede { max-width: 38ch; font-size: 1.2rem; margin-bottom: 1.5rem; }
.thanks-next { display: grid; gap: 1.25rem; justify-items: start; padding-top: 2rem; border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); }
.thanks-next p { max-width: 52ch; margin: 0; font-size: 1.1rem; }

/* Classes page */
.classes { padding: clamp(3rem, 8vw, 6rem) 0; }
.classes-title { font-size: clamp(2.75rem, 8vw, 5rem); line-height: 1; letter-spacing: 0; margin-bottom: 1rem; }
.classes-lede { max-width: 40ch; font-size: 1.2rem; margin-bottom: 2.5rem; }
.class-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.class-item { display: grid; gap: 1.5rem; padding: 1.5rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; }
.class-date { font-family: var(--display); font-size: 2.4rem; line-height: 1.05; margin: 0 0 .35rem; }
.class-time { margin: 0; font-weight: 600; color: var(--ink-soft); }
.class-info { min-width: 0; }
.class-info h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; margin-bottom: .75rem; }
.class-info p { max-width: 52ch; }
.class-meta { color: var(--ink-soft); font-size: .98rem; }
.class-info .btn { margin-top: .5rem; }
@media (min-width: 760px) { .class-item { grid-template-columns: 14rem 1fr; gap: 2.5rem; padding: 2rem; } }

/* Prompts dialog */
.modal {
  width: min(32rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto;
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 2px;
}
.modal::backdrop { background: rgba(31, 26, 23, .6); }
.modal h2 { font-size: 2rem; line-height: 1.1; margin: .25rem 0 .75rem; }
.modal p { max-width: 36ch; }
.modal-close { display: flex; justify-content: flex-end; margin: 0; }
.modal-x { font-family: var(--body); font-size: .95rem; cursor: pointer; background: transparent; color: var(--ink); border: 0; text-decoration: underline; text-underline-offset: 4px; padding: .25rem; }
.modal-note { margin: 1rem 0 0; color: var(--ink-soft); }

/* Instagram frame, a frame within a frame */
.studio { padding: clamp(3rem, 8vw, 6rem) 0; border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); }
.studio-grid { display: grid; gap: 2.5rem; align-items: center; }
.studio h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.08; letter-spacing: 0; margin-bottom: 1.25rem; }
.studio-copy p { max-width: 40ch; font-size: 1.2rem; }
.frame { width: 100%; max-width: 30rem; justify-self: center; min-width: 0; }
.frame-mat {
  background: var(--card-line); border: 1px solid var(--rule); border-radius: 2px;
  padding: .9rem;
}
.frame-inner { position: relative; height: 34rem; background: var(--paper); border: 1px solid var(--rule); overflow: hidden; }
.frame-fallback {
  position: absolute; inset: 0; z-index: 0; margin: 0; padding: 1.5rem;
  display: grid; place-items: center; text-align: center; color: var(--ink-soft); font-size: 1rem;
}
.frame-embed { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; background: transparent; }

/* Phones: Instagram's profile embed is unreliable on mobile browsers, so show a clear button instead */
@media (max-width: 760px) {
  .frame-embed { display: none; }
  .frame-inner { height: auto; min-height: 11rem; }
  .frame-fallback { position: static; min-height: 11rem; line-height: 1.8; }
  .frame-fallback .btn { margin-top: .75rem; color: #fff; }
}

.join-details { margin-top: 1.25rem; font-size: 1rem; color: var(--ink-soft); }
.join-details a { color: var(--accent); }

/* Wider screens */
@media (min-width: 760px) {
  .intro-grid { grid-template-columns: 5fr 6fr; gap: 4rem; align-items: start; }
  .gifts { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .drawers { grid-template-columns: repeat(3, 1fr); }
  .join-grid { grid-template-columns: 1.3fr 1fr; gap: 4rem; }
  .studio-grid { grid-template-columns: 5fr 6fr; gap: 4rem; }
  .frame { justify-self: end; }
  .when { justify-self: end; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
  .deck { justify-self: end; }
}
@media (max-width: 560px) {
  .site-nav a:not(.btn) { display: none; }
  .brand { font-size: 1.1rem; }
  .brand-mark { width: 2.1rem; height: 2.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Prompts landing page */
.lp { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3rem, 8vw, 6rem); }
.lp-grid { display: grid; gap: 3rem; align-items: start; }
@media (min-width: 56rem) { .lp-grid { grid-template-columns: 1.1fr .9fr; gap: 4rem; } }
.lp-title { font-size: clamp(2.4rem, 6.5vw, 4.25rem); line-height: 1.02; letter-spacing: 0; margin-bottom: 1.25rem; }
.lp-lede { max-width: 40ch; font-size: 1.2rem; margin-bottom: 2rem; }
.lp-form { max-width: 400px; }
.lp-next { margin-top: 1.75rem; font-size: 1.05rem; }
.lp-samples { display: grid; gap: 1.75rem; }
.lp-samples-title { font-size: 1.1rem; font-family: var(--body); font-weight: 600; color: var(--ink-soft); margin: 0; }
.card--sample { min-height: 0; padding-bottom: 1.5rem; }
.card-num { font-size: .95rem; font-weight: 700; color: var(--ink); }
.lp-more { margin: 0; color: var(--ink-soft); }

.thanks-small { margin: 0; color: var(--ink-soft); }
