/* Seraphina: romantic goth. Candlelight on oxblood, antique gilt frames, hard edges. */

@font-face {
  font-family: 'Cormorant';
  src: url('/fonts/cormorant-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('/fonts/cormorant-regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0a0607;
  --crypt: #120b0d;
  --wine: #4a0d18;
  --blood: #7d1426;
  --blood-hi: #9c1c31;
  --gilt: #c9a46a;
  --gilt-dim: #8a6d44;
  --line: #2e1a1f;
  --bone: #efe4dc;
  --ash: #a3918a;
  --serif: 'Cormorant', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 4px;
  --pad-top: 1.6rem;
  --bar: 0px;
}

* { box-sizing: border-box; }

html { background: var(--ink); }

body {
  margin: 0;
  min-height: 100svh;
  color: var(--bone);
  font: 16px/1.5 var(--serif);
  background:
    radial-gradient(120% 60% at 50% -10%, #3a0c16 0%, transparent 60%),
    radial-gradient(80% 50% at 50% 110%, #1e0a0f 0%, transparent 70%),
    var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* Film grain so the dark areas don't band on cheap phone screens. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  width: min(100%, 27rem);
  margin: 0 auto;
  padding: var(--pad-top) max(1rem, env(safe-area-inset-right)) calc(2.5rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  text-align: center;
}

button, a { touch-action: manipulation; }

/* ---------- in-app browser bar ---------- */

.escape {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem;
  background: #000000e6;
  border-bottom: 1px solid var(--line);
  height: calc(3rem + env(safe-area-inset-top));
  font: 12px/1.2 var(--mono);
  color: var(--ash);
  backdrop-filter: blur(6px);
}
.escape > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.escape[hidden] { display: none; }
.escape-btn {
  flex: none;
  padding: .45rem .7rem;
  border: 1px solid var(--gilt-dim);
  border-radius: var(--radius);
  color: var(--gilt);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .04em;
}

/* The profile, photo card and button fill exactly one screen, so the button is never below the fold. */
.first {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--pad-top) - var(--bar) - .75rem);
}

/* ---------- profile ---------- */

.arch {
  width: 5.6rem;
  aspect-ratio: 4 / 5;
  margin: 0 auto .9rem;
  padding: 4px;
  border: 1px solid var(--gilt-dim);
  border-radius: 999px 999px var(--radius) var(--radius);
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 5px #c9a46a33, 0 18px 40px #000000b3;
}
.arch img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px 999px 2px 2px;
  filter: saturate(.85) contrast(1.05);
}

.name {
  margin: 0;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.6rem, 12.5vw, 3.3rem);
  line-height: .95;
  letter-spacing: -.01em;
  color: var(--bone);
  text-shadow: 0 0 28px #9c1c3155;
}

.handle {
  margin: .45rem 0 0;
  font: 12px/1 var(--mono);
  color: var(--ash);
  letter-spacing: .04em;
}

.labels {
  margin: .7rem 0 0;
  font: 600 11px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gilt);
}
.labels i { font-style: normal; margin: 0 .55em; color: var(--gilt-dim); }

.bio {
  margin: .65rem auto 0;
  max-width: 19rem;
  font-size: 1.15rem;
  line-height: 1.35;
  font-style: italic;
  color: #d9cbc3;
}

/* ---------- private block ---------- */

.private {
  margin-top: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  flex: 1 1 auto;
}
.private > button { flex: none; }
.private > .hero { flex: 1 1 0; }

.hero {
  position: relative;
  display: block;
  width: 100%;
  flex: 1 1 0;
  min-height: 11rem;
  max-height: 30rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--gilt-dim);
  border-radius: var(--radius);
  background: var(--crypt);
  color: var(--bone);
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 24px 50px #000000cc;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: blur(3px) brightness(.8) saturate(.75) contrast(1.05);
  transform: scale(1.04);
  user-select: none;
  -webkit-user-drag: none;
}
/* Inner gilt rule, like an old picture frame. */
.hero-frame {
  position: absolute;
  inset: 10px;
  border: 1px solid #c9a46a66;
  pointer-events: none;
}
.hero-frame::before, .hero-frame::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--gilt);
  border-style: solid;
}
.hero-frame::before { top: -4px; left: -4px; border-width: 1px 0 0 1px; }
.hero-frame::after { right: -4px; bottom: -4px; border-width: 0 1px 1px 0; }

.hero-veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  padding: 0 1rem 1.6rem;
  background: linear-gradient(180deg, transparent 35%, #0000008c 72%, #000000cc);
}
.hero-veil svg { color: var(--gilt); filter: drop-shadow(0 2px 6px #000); }
.hero-label {
  font-style: italic;
  font-weight: 500;
  font-size: 2.2rem;
  line-height: 1;
  text-shadow: 0 2px 14px #000;
}
.hero-sub {
  font: 600 10.5px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ash);
}
.hero:active { transform: scale(.99); }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  width: 100%;
  padding: 1.05rem 1.25rem;
  border: 1px solid var(--blood-hi);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--blood-hi), var(--blood) 55%, var(--wine));
  color: var(--bone);
  font: italic 600 1.45rem/1 var(--serif);
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff1f, 0 14px 30px #4a0d1888;
  -webkit-tap-highlight-color: transparent;
  animation: candle 3.2s ease-in-out infinite;
}
.cta-tag {
  font: 600 10px/1 var(--mono);
  font-style: normal;
  letter-spacing: .14em;
  padding: .32rem .4rem;
  border: 1px solid #efe4dc66;
  border-radius: 2px;
  color: #efe4dccc;
}
.cta:active { transform: translateY(1px); }

@keyframes candle {
  0%, 100% { box-shadow: inset 0 1px 0 #ffffff1f, 0 14px 30px #4a0d1888; }
  50% { box-shadow: inset 0 1px 0 #ffffff1f, 0 14px 38px #9c1c3199; }
}

.offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  padding: .75rem 1rem;
  border: 1px dashed var(--gilt-dim);
  border-radius: var(--radius);
  background: #c9a46a0d;
  color: var(--gilt);
  font: 600 12px/1.2 var(--mono);
  letter-spacing: .04em;
  cursor: pointer;
  text-align: left;
}
.offer-time { color: var(--ash); font-variant-numeric: tabular-nums; white-space: nowrap; }

form.is-going button { pointer-events: none; opacity: .75; }

/* ---------- divider + links ---------- */

.divider {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 2.1rem 0 1.4rem;
  color: var(--gilt);
}
.divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gilt-dim), transparent); }

.links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 3.1rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #120b0dcc;
  color: var(--bone);
  font: 600 13px/1 var(--mono);
  letter-spacing: .06em;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.link svg { color: var(--gilt); flex: none; }
.link:hover, .link:focus-visible { border-color: var(--gilt-dim); color: #fff; outline: none; }
.link:last-child:nth-child(odd) { grid-column: 1 / -1; }

.foot {
  margin-top: 2.2rem;
  font: 10.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6f5f5a;
}

button:focus-visible { outline: 1px solid var(--gilt); outline-offset: 3px; }

body:has(.escape:not([hidden])) { --bar: calc(3rem + env(safe-area-inset-top)); }

/* Short screens: iPhone SE, or any phone inside Instagram's browser with both toolbars showing. */
@media (max-height: 720px) {
  :root { --pad-top: 1rem; }
  .arch { width: 4.4rem; margin-bottom: .6rem; }
  .name { font-size: clamp(2.3rem, 11vw, 2.7rem); }
  .labels { margin-top: .5rem; }
  .bio { margin-top: .45rem; font-size: 1.05rem; }
  .private { margin-top: 1rem; }
  .hero-label { font-size: 1.9rem; }
}

@media (max-height: 600px) {
  .labels { display: none; }
  .arch { width: 3.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cta { animation: none; }
}
