/* Two Cups site: page styles (from the canvas helmets of Main and Draw, plus the waitlist form). */

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #ede0d6; }
a { color: inherit; }
a:hover { opacity: .75; }

/* ---------- Main (Vera and the app) ---------- */
@keyframes tcRise { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes tcBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }

.tcVeraHero { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "side" "phone"; gap: 32px; justify-items: start; align-items: start; }
/* Narrow computer windows: the 60px headline would take a whole screen. */
@media (max-width: 479.98px) and (hover: hover) {
  .tcVeraHero h1 { font-size: 40px !important; line-height: 44px !important; }
}
/* Every block runs the full width of its column, like the headline and the sections below; nothing
   stops at a narrower measure of its own (one column in narrow windows, the text across both
   columns from 760px). */
.tcVeraHero { justify-items: stretch; }
.tcVeraHero .tc-intro-sub { max-width: none !important; }
.tcVeraHero .tc-qr { max-width: none; align-self: stretch; }
@media (min-width: 760px) {
  .tcVeraHero { grid-template-columns: 320px minmax(0, 1fr); grid-template-areas: "text text" "phone side"; column-gap: 48px; row-gap: 40px; }
}
@media (min-width: 1100px) {
  .tcVeraHero { grid-template-columns: minmax(0, 1fr) 320px minmax(0, 1fr); grid-template-areas: "text phone side"; column-gap: 48px; }
  .tcVeraHero h1 { font-size: 46px !important; line-height: 50px !important; }
}

/* ---------- window: Vera's phone over the page (computers; js/reading/full.js) ----------
   The landing page shows her portrait where the phone was; the phone itself is hidden until "Talk to
   Vera" (or a click on her portrait) opens it as a window over a dimmed, locked page.
   It grows out of the portrait and shrinks back into it when it closes. The window's size follows the
   screen's height (the phone is scaled as a whole, as on narrow screens below). Phones never get this:
   their reading is full screen (css/reading.css), and the portrait is hidden there. */
.tc-hero-portrait { width: 320px; max-width: 100%; aspect-ratio: 2 / 3; border-radius: 999px 999px 24px 24px; overflow: hidden; background: #E8DCC6; cursor: pointer;
  box-shadow: 0 1px 0 rgba(27,26,23,0.10), 0 18px 40px -18px rgba(27,26,23,0.35); animation: tcRise 1s .15s cubic-bezier(.16,1,.3,1) both;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s cubic-bezier(.2,.8,.2,1); }
.tc-hero-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; -webkit-user-drag: none; }
@media (hover: hover) {
  .tc-hero-portrait:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(27,26,23,0.10), 0 26px 48px -18px rgba(27,26,23,0.42); }
}
.tcVeraHero > .tc-hero-phone { display: none; }
html.tc-stage-open .tcVeraHero > .tc-hero-phone { display: flex; position: fixed; inset: 0; z-index: 50; align-items: center; justify-content: center;
  background: rgba(27,26,23,0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); overscroll-behavior: contain; }
html.tc-stage-open .tc-hero-phone .tc-phone-slot { --tc-phone-s: 1; width: calc(320px * var(--tc-phone-s)); height: calc(672px * var(--tc-phone-s)); }
@supports (width: calc(1px * tan(atan2(1px, 1px)))) {
  html.tc-stage-open .tc-hero-phone .tc-phone-slot { --tc-phone-s: clamp(0.6, tan(atan2(100vh - 72px, 672px)), 1.3); }
}
html.tc-stage-open .tc-hero-phone .tc-phone-slot > div { transform: scale(var(--tc-phone-s)); transform-origin: 0 0; }
html.tc-stage-open .tc-hero-portrait { visibility: hidden; }
.tc-stage-close { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 22px; border: 0; padding: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(246,242,234,0.16); color: #F6F2EA; cursor: pointer; transition: background-color .2s; }
.tc-stage-close:hover { background: rgba(246,242,234,0.28); }
.tc-stage-close:focus-visible { outline: 2.5px solid #F6F2EA; outline-offset: 2px; }

/* ---------- qr: "Or take her with you", for mouse-and-keyboard computers only ----------
   A tarot card from her deck on the table (assets/img/qr-card.svg): the card back's motifs around a stamped code. */
.tc-qr { display: none; }
@media (hover: hover) and (pointer: fine) {
  .tc-qr { display: flex; align-items: center; gap: 18px; margin-top: 28px; padding-top: 24px; max-width: 360px; border-top: 1px solid rgba(33,24,28,0.14); }
  .tc-qr-card { flex: none; display: block; width: 148px; height: 252px; border-radius: 9px; box-shadow: 0 1px 0 rgba(27,26,23,0.18), 0 10px 24px rgba(27,26,23,0.18); transform: rotate(-2.5deg); transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
  .tc-qr:hover .tc-qr-card { transform: rotate(0deg) translateY(-3px); box-shadow: 0 2px 2px rgba(27,26,23,0.18), 0 18px 32px rgba(27,26,23,0.22); }
  .tc-qr p { margin: 0; font-size: 14px; line-height: 20px; color: #5e5157; }
  .tc-qr b { display: block; margin-bottom: 4px; font-family: ui-serif, 'New York', 'Iowan Old Style', Georgia, serif; font-size: 19px; line-height: 24px; font-weight: 400; color: #21181c; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  .tc-qr-card, .tc-qr:hover .tc-qr-card { transition: none; transform: none; }
}

/* The phone keeps its 320 x 672 box before the script fills it, so nothing jumps. */
.tc-phone-slot { width: 320px; height: 672px; }
.tc-phone-still { display: block; width: 320px; height: 672px; box-sizing: border-box; padding: 10px; background: #1B1A17; border-radius: 50px; }
.tc-phone-still img { display: block; width: 300px; height: 652px; border-radius: 40px; object-fit: cover; object-position: 50% 30%; }
/* Narrow phones (under 368px): the hero has 24px side padding, so a 320px phone would overflow.
   Scale the whole phone down to the available width (100vw - 48px) and shrink the slot to match,
   so nothing below overlaps. tan(atan2(a, b)) turns the length ratio a/b into a plain number;
   browsers without it get a fixed 0.85 (fits a 320px screen). */
@media (max-width: 367.98px) {
  .tc-phone-slot { --tc-phone-s: 0.85; width: calc(320px * var(--tc-phone-s)); height: calc(672px * var(--tc-phone-s)); }
  @supports (width: calc(1px * tan(atan2(1px, 1px)))) {
    .tc-phone-slot { --tc-phone-s: tan(atan2(100vw - 48px, 320px)); }
  }
  .tc-phone-slot > div, .tc-phone-slot .tc-phone-still { transform: scale(var(--tc-phone-s)); transform-origin: 0 0; }
}

/* ---------- Card interpreter (Draw helmet) ---------- */
@keyframes tcRiseS { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes tcSheetUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes tcFaceIn { from { transform: rotateY(-90deg); } to { transform: rotateY(0); } }
@keyframes tcFaceInRev { from { transform: rotateY(-90deg) rotate(180deg); } to { transform: rotateY(0) rotate(180deg); } }
@keyframes tcPop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input::placeholder { color: var(--ink-muted); opacity: 1; }
input[type=search]:focus-visible { outline: none; }
label:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Waitlist form ---------- */
.tc-join { display: flex; flex-direction: column; gap: 8px; max-width: 470px; }
.tc-join label { font-size: 15px; font-weight: 600; }
.tc-join-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-join-row input[type=email] { flex: 1 1 220px; min-width: 0; height: 50px; box-sizing: border-box; padding: 0 16px; border-radius: 12px; border: 1.5px solid rgba(33,24,28,0.18); background: #faf6f2; font-size: 17px; font-family: inherit; color: #21181c; }
.tc-join-row input[aria-invalid="true"] { border-color: #b3261e; }
.tc-join-btn { height: 50px; padding: 0 24px; border-radius: 999px; border: 1.5px solid #A84C25; background: #A84C25; color: #FFFFFF; font-size: 17px; font-weight: 600; font-family: inherit; cursor: pointer; }
.tc-join-btn:hover { background: #943f1c; border-color: #943f1c; }
.tc-join-btn[disabled] { opacity: .7; cursor: default; }
.tc-join-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tc-consent { margin: 0; font-size: 13px; line-height: 18px; color: #5e5157; }
.tc-status { margin: 0; font-size: 15px; line-height: 20px; font-weight: 600; min-height: 0; }
.tc-status:empty { display: none; }
.tc-status[data-tone="error"] { color: #b3261e; }
.tc-status[data-tone="ok"] { color: #21181c; }
.tc-turnstile:empty { display: none; }
.tc-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.tc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

[hidden] { display: none !important; }
/* Waitlist buttons that need the sign-up modal (js/modal.js adds .tc-join-ok when it can open). */
html:not(.tc-join-ok) .tc-join-late { display: none !important; }

/* ---------- Waitlist band ---------- */
.tc-band-btn { height: 54px; padding: 0 28px; border-radius: 999px; border: 0; background: #A84C25; color: #FFFFFF; font-family: inherit; font-size: 17px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tc-band-btn:hover { background: #943f1c; }
/* The ask inside the dark "at the table" section: a quiet line, then the button. */
/* Phones and narrow windows: text, Vera's pictures, then the ask. Wide: the ask sits under the quote. */
.tc-table-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "imgs" "join"; gap: 40px; }
.tc-table-text { grid-area: text; } .tc-table-imgs { grid-area: imgs; } .tc-table-join { grid-area: join; }
@media (min-width: 760px) {
  .tc-table-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-areas: "text imgs" "join imgs"; column-gap: 56px; row-gap: 32px; align-items: center; }
  .tc-table-text { align-self: end; } .tc-table-join { align-self: start; }
}
.tc-table-join { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 28px; border-top: 1px solid rgba(237, 224, 214, 0.18); }
.tc-table-join p { margin: 0; max-width: 460px; font-size: 16px; line-height: 23px; color: #cfc3bd; }
.tc-table-join b { color: #ede0d6; font-weight: 700; }
.tc-table-join .tc-band-btn { background: #C2582B; }
.tc-table-join .tc-band-btn:hover { background: #A84C25; }

/* ---------- Waitlist at the end of the card interpreter ---------- */
.tc-draw-join { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 20px; }
.tc-draw-join p { margin: 0; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }

/* ---------- Footer links: 44 px tall tap targets ---------- */
.tc-foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; font-size: 13px; }
.tc-foot-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin: 0 -4px; }

@media (prefers-reduced-motion: reduce) {
  /* Talk to Vera (.rd) keeps its own short fades (css/reading.css, "Reduce Motion"). */
  *:not(.rd, .rd *) { animation: none !important; transition: none !important; }
  .tc-drew-cta::after, .tc-gc-art::after { display: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Hero actions: Talk to Vera, Join the waitlist ---------- */
.tc-hero-side { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.tc-talk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.tc-talk-btn { height: 54px; box-sizing: border-box; padding: 0 26px 0 22px; border-radius: 999px; border: 0; background: #A84C25; color: #FFFFFF; display: inline-flex; align-items: center; gap: 10px; font-family: inherit; font-size: 17px; line-height: 22px; font-weight: 600; cursor: pointer; }
.tc-talk-btn:hover { background: #943f1c; }
.tc-talk-btn.is-on { background: #1B1A17; }
.tc-talk-note { margin: 0; max-width: 360px; font-size: 13px; line-height: 18px; color: #5e5157; }
.tc-join-cta { margin-top: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.tc-join-cta-label { margin: 0; font-size: 15px; line-height: 20px; font-weight: 600; }
.tc-join-open { height: 50px; padding: 0 24px; border-radius: 999px; border: 1.5px solid #1B1A17; background: transparent; color: #1B1A17; font-family: inherit; font-size: 17px; font-weight: 600; cursor: pointer; }
.tc-join-open:hover { background: #1B1A17; color: #F6F2EA; }

/* An opened card (js/components/Draw.js): its own full-screen page over the site. It scrolls on its
   own and never hands the scroll to the page behind, which is locked while it's open. */
.tc-card-full { position: fixed; inset: 0; z-index: 60; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; background: var(--surface-canvas, #EEE8DD); outline: none;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  box-sizing: border-box; }

/* ---------- Card guide: motion (js/components/CardGrid.js, Draw.js) ----------
   - Cards are dealt in, row by row, when the guide appears and each time the suit changes
     (.tc-gc-in; data-gen flips between two identical keyframes so the animation restarts).
   - Where scroll-driven animations exist (Safari 26), each card also settles in as it scrolls into view.
   - Touching a card makes it dip, wiggle gently and catch a streak of light (.tc-wiggle, added on
     pointerdown in CardGrid.js, since iOS doesn't apply :active). With a mouse the card lifts, tilts
     towards the pointer and a glare follows it (.is-lit, --gx/--gy/--tx/--ty). A long press doesn't
     open iOS's image preview: the image ignores touches and the card can't be selected or called out.
   - Opening a card morphs it from the grid into its own page (a view transition, Draw.js).
   Reduce Motion turns all of it off (the rule above). Individual transform properties (translate,
   rotate, scale) keep the three layers from overriding each other. */
@keyframes tcDealA { from { opacity: 0; translate: 0 22px; rotate: -3deg; } to { opacity: 1; translate: none; rotate: none; } }
@keyframes tcDealB { from { opacity: 0; translate: 0 22px; rotate: -3deg; } to { opacity: 1; translate: none; rotate: none; } }
.tc-gc-in { animation: tcDealA .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 35ms); }
.tc-grid[data-gen="b"] .tc-gc-in { animation-name: tcDealB; }
.tc-gc { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.tc-gc img { pointer-events: none; -webkit-user-drag: none; transition: box-shadow .35s cubic-bezier(.2,.8,.2,1); }
.tc-gc-art { position: relative; display: block; border-radius: 5px; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
@keyframes tcWiggle {
  0% { scale: 1; rotate: 0deg; }
  16% { scale: .96; rotate: -3deg; }
  36% { scale: .97; rotate: 2.2deg; }
  56% { scale: .985; rotate: -1.4deg; }
  76% { scale: .995; rotate: .7deg; }
  100% { scale: 1; rotate: 0deg; } }
.tc-gc-art.tc-wiggle { animation: tcWiggle .8s cubic-bezier(.3,.7,.4,1); }
/* the glare: a streak of light that crosses the card on a touch, a soft spot that follows the mouse */
@keyframes tcGlare { 0% { opacity: 0; background-position: 130% 0; } 20% { opacity: 1; } 100% { opacity: 0; background-position: -30% 0; } }
.tc-gc-art::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(110deg, rgba(255,255,255,0) 34%, rgba(255,255,255,.35) 43%, rgba(255,255,255,.8) 47%, rgba(255,255,255,.3) 52%, rgba(255,255,255,0) 60%) 130% 0 / 260% 100% no-repeat;
  transition: opacity .3s ease; }
.tc-gc-art.tc-wiggle::after { animation: tcGlare .8s ease-out; }
.tc-gc:focus-visible { outline: none; }
.tc-gc:focus-visible img { outline: 2.5px solid var(--focus, #3E5566); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .tc-gc:hover .tc-gc-art { transform: translateY(-6px) rotate(-1.5deg); }
  .tc-gc:nth-child(even):hover .tc-gc-art { transform: translateY(-6px) rotate(1.5deg); }
  .tc-gc:hover img { box-shadow: 0 1px 0 rgba(27,26,23,0.14), 0 18px 32px rgba(27,26,23,0.22); }
  .tc-gc:hover .tc-gc-art.is-lit { transform: perspective(700px) translateY(-6px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition-duration: .12s; }
  .tc-gc-art.is-lit::after { opacity: 1; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255,255,255,.42), rgba(255,255,255,.1) 35%, rgba(255,255,255,0) 60%); }
}
@supports (animation-timeline: view()) {
  @keyframes tcSettle { from { opacity: 0; scale: .9; translate: 0 18px; } to { opacity: 1; scale: none; translate: none; } }
  .tc-gc { animation: tcSettle linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
}

/* the suit chips */
.tc-chip { transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .15s ease; -webkit-tap-highlight-color: transparent; }
.tc-chip:active { transform: scale(.94); }

/* "I drew these": the two card backs breathe apart and back, and a soft sheen crosses the banner */
@keyframes tcSwayL { 0%, 100% { rotate: 0deg; } 50% { rotate: -6deg; } }
@keyframes tcSwayR { 0%, 100% { rotate: 0deg; } 50% { rotate: 7deg; } }
@keyframes tcSheen { 0%, 70% { translate: -120% 0; } 100% { translate: 220% 0; } }
.tc-drew-cta { position: relative; overflow: hidden; transition: transform .15s ease; -webkit-tap-highlight-color: transparent; }
.tc-drew-cta:active { transform: scale(.98); }
.tc-drew-cta::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(246,242,234,0.10) 45%, rgba(246,242,234,0.16) 50%, transparent);
  animation: tcSheen 6s ease-in-out 1.2s infinite both; }
.tc-drew-backs img:first-child { animation: tcSwayL 5s ease-in-out infinite; }
.tc-drew-backs img:last-child { animation: tcSwayR 5s ease-in-out infinite; }
@media (hover: hover) and (pointer: fine) {
  .tc-drew-backs img { transition: translate .3s cubic-bezier(.2,.8,.2,1); }
  .tc-drew-cta:hover .tc-drew-backs img:first-child { animation-play-state: paused; translate: -4px 0; }
  .tc-drew-cta:hover .tc-drew-backs img:last-child { animation-play-state: paused; translate: 4px -4px; }
}

/* opening a card: the grid card flies into place on its page while the page fades in over the guide */
::view-transition-group(tc-card) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2,.8,.2,1); }
::view-transition-old(tc-card), ::view-transition-new(tc-card) { animation-duration: .5s; height: 100%; object-fit: cover; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
html.tc-vt .tc-card-full > div, html.tc-vt .tc-card-full article { animation: none !important; }
