/* Primsly
   Brand colours come from the logo: the glossy heart padlock (pink) and the
   wordmark (plum), on true black. Fraunces italic carries the voice in
   headings; Figtree does the everyday work. The heart padlock is the one
   bold element: it stands for "locked until you unlock it". */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-full-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --black: #000;
  --surface: #140810;      /* plum-black panels */
  --surface-2: #1e0b17;    /* inputs, raised bits */
  --line: #3a1626;         /* plum hairlines */
  --plum: #942d55;         /* wordmark */
  --pink: #fba2c0;         /* heart */
  --blush: #ffe2ec;        /* heart highlights; headings */
  --text: #f4e9ee;
  --muted: #b2949f;
  --on-pink: #3b0c22;
  --ok: #8fe3b4;
  --bad: #ff7a8a;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale, ratio about 1.25 from 17px. */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.33rem;
  --step-2: 1.66rem;
  --step-3: 2.07rem;
  --step-4: clamp(2.4rem, 6vw, 3.6rem);
}

* { box-sizing: border-box; }
html { background: var(--black); }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font: 400 var(--step-0)/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--pink); text-underline-offset: 3px; }
a:hover { color: var(--blush); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 560;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72;
  color: var(--blush);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); margin-top: 1.6em; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* ------------------------------------------------------------ header */

.site-header { border-bottom: 1px solid var(--line); }
.bar {
  max-width: 1080px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.brand { margin-right: auto; display: block; line-height: 0; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--pink); }
.nav a.button, .nav a.button:hover { color: var(--on-pink); }
.who { color: var(--muted); font-size: var(--step--1); }

main { max-width: 1080px; margin: 0 auto; padding: 36px 20px 80px; }
main.narrow { max-width: 720px; }

.site-footer {
  border-top: 1px solid var(--line); color: var(--muted); font-size: var(--step--1);
}
.site-footer .bar { padding-top: 22px; padding-bottom: 28px; }

/* ----------------------------------------------------------- controls */

button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  font: 650 var(--step-0)/1 var(--body);
  padding: 0.8em 1.4em; border-radius: 999px; border: 0;
  background: var(--pink); color: var(--on-pink);
  cursor: pointer; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 0 rgba(148, 45, 85, 0.35);
}
button:hover, .button:hover { background: var(--blush); color: var(--on-pink); }
button.quiet, .button.quiet {
  background: transparent; color: var(--text); box-shadow: none;
  border: 1px solid var(--plum);
}
button.quiet:hover, .button.quiet:hover { border-color: var(--pink); color: var(--pink); background: transparent; }
button.small { font-size: var(--step--1); padding: 0.6em 1em; }

input {
  font: 400 var(--step-0)/1.2 var(--body);
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.75em 1.1em; min-width: 0;
}
input::placeholder { color: #7d6370; }
input:focus { outline: none; border-color: var(--pink); }

form.inline { display: inline; }
.row + p { margin-top: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row input { flex: 1 1 200px; }

/* ------------------------------------------------------------- panels */

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 24px 26px; margin-bottom: 18px;
}
.panel > :last-child { margin-bottom: 0; }
.balance { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.figure {
  font: 600 var(--step-4)/1 var(--body);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--text);
}
.figure-label { color: var(--muted); margin-bottom: 6px; }

.notice, .error {
  border-radius: 14px; padding: 12px 16px; margin-bottom: 20px;
  border: 1px solid; font-weight: 500;
}
.notice { color: var(--ok); border-color: rgba(143, 227, 180, 0.35); background: rgba(143, 227, 180, 0.07); }
.error { color: var(--bad); border-color: rgba(255, 122, 138, 0.4); background: rgba(255, 122, 138, 0.07); }

.tag {
  display: inline-block; font-family: var(--body); font-style: normal; font-weight: 500;
  vertical-align: middle; font-size: var(--step--1); padding: 2px 10px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: var(--step--1); }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; }
.scroll { overflow-x: auto; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
code { font-size: 0.9em; }

/* --------------------------------------------------------------- home */

.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px;
  padding: 24px 0 56px;
}
.hero h1 {
  font-size: var(--step-4);
  font-weight: 620;
  max-width: 13ch;
  margin-bottom: 0.4em;
}
.hero p { font-size: var(--step-1); line-height: 1.45; color: var(--text); max-width: 34ch; }
.hero .row { margin-top: 28px; }
.hero-art { position: relative; justify-self: center; width: min(100%, 400px); }
.hero-art::before {
  /* The heart sits in its own pink light. */
  content: ""; position: absolute; inset: 8% 4% 2%;
  background: radial-gradient(closest-side, rgba(251, 162, 192, 0.32), rgba(148, 45, 85, 0.18) 55%, transparent);
  filter: blur(18px); z-index: 0;
}
.hero-art img { position: relative; z-index: 1; display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: settle 900ms cubic-bezier(.2, .8, .2, 1) both; }
  .hero-art::before { animation: glow 1400ms ease-out both; }
}
@keyframes settle { from { opacity: 0; transform: translateY(-18px) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes glow { from { opacity: 0; } to { opacity: 1; } }

.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.steps li { counter-increment: step; padding: 26px 24px 28px 0; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  display: block; font: italic 600 var(--step-3)/1 var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  color: var(--plum); margin-bottom: 10px;
}
.steps h3 { margin-bottom: 0.3em; }
.steps p { color: var(--muted); margin: 0; }

/* ----------------------------------------------------------- creators */

.creator-grid {
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.creator-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  color: var(--text); text-decoration: none;
}
.creator-card:hover { border-color: var(--plum); color: var(--text); }
.avatar {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font: italic 650 1.5rem/1 var(--display); color: var(--on-pink);
  background: radial-gradient(circle at 35% 30%, var(--blush), var(--pink) 55%, var(--plum));
}
.avatar.big { width: 88px; height: 88px; font-size: 2.6rem; }
.creator-card strong { display: block; font-weight: 650; }
.creator-card div span { color: var(--muted); font-size: var(--step--1); }

.profile-head { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; }
.profile-head h1 { margin: 0; }

/* ------------------------------------------------------- login & steps */

.howto { padding-left: 1.3em; margin: 0 0 1.2em; }
.howto li { margin: 0.5em 0; padding-left: 0.2em; }
.howto li::marker { color: var(--pink); font-weight: 700; }

.center-panel { max-width: 560px; margin: 4vh auto 0; }
.center-panel .lock { width: 64px; height: auto; display: block; margin-bottom: 14px; }

/* ---------------------------------------------------------- admin grid */

.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stats .panel { margin: 0; }
.stats .figure { font-size: var(--step-3); }

/* -------------------------------------------------------------- mobile */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 8px; padding-top: 0; }
  .hero-art { order: -1; width: min(62%, 260px); }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 22px 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .brand img { height: 38px; }
  .panel { padding: 20px; border-radius: 18px; }
}

.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;
}

details summary { cursor: pointer; color: var(--pink); font-weight: 600; }
pre.notecard {
  margin: 12px 0 0; padding: 14px 16px; border-radius: 12px; overflow-x: auto;
  background: var(--surface-2); border: 1px solid var(--line); font-size: var(--step--1);
}

/* ------------------------------------------------------------- forms */

textarea, select {
  font: 400 var(--step-0)/1.45 var(--body);
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 0.75em 1.1em; width: 100%;
}
select { border-radius: 999px; appearance: none; padding-right: 2.4em;
  background-image: linear-gradient(45deg, transparent 50%, var(--pink) 50%), linear-gradient(135deg, var(--pink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
  background-size: 6px 6px; background-repeat: no-repeat; }
textarea:focus, select:focus { outline: none; border-color: var(--pink); }
textarea::placeholder { color: #7d6370; }
input[type="file"] {
  border-radius: 14px; width: 100%; padding: 0.6em; color: var(--muted); cursor: pointer;
}
input[type="file"]::file-selector-button {
  font: 600 var(--step--1)/1 var(--body); border: 0; border-radius: 999px;
  padding: 0.6em 1em; margin-right: 12px; background: var(--plum); color: var(--blush); cursor: pointer;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--pink); width: 1.1em; height: 1.1em; margin: 0.2em 0 0; flex: none; }

.stack { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.stack > button { align-self: flex-start; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-weight: 550; }
.stack label.check, label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.hint { color: var(--muted); font-size: var(--step--1); font-weight: 400; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px 18px; margin: 0;
  display: flex; flex-direction: column; gap: 10px; }
legend { padding: 0 6px; font-weight: 550; }

/* Only show the tier picker or price box for the option that needs it. */
.post-form .when-subscribers, .post-form .when-ppv { display: none; margin-top: 6px; }
.post-form:has(input[value="subscribers"]:checked) .when-subscribers,
.post-form:has(input[value="ppv"]:checked) .when-ppv { display: block; }
@supports not selector(:has(*)) {
  .post-form .when-subscribers, .post-form .when-ppv { display: block; }
}

.uploads { list-style: none; margin: 8px 0 0; padding: 0; font-size: var(--step--1); }
.uploads li { padding: 6px 0; color: var(--muted); }
.uploads li.ok { color: var(--ok); }
.uploads li.bad { color: var(--bad); }

button.link {
  background: none; border: 0; box-shadow: none; padding: 0; color: var(--muted);
  font: inherit; text-decoration: underline; text-underline-offset: 3px;
}
button.link:hover { background: none; color: var(--pink); }
.ok { color: var(--ok); }
.pre, .post-body, .bio { white-space: pre-line; }

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

.avatar { object-fit: cover; }
img.avatar { background: var(--surface-2); }
.avatar.small { width: 40px; height: 40px; font-size: 1.15rem; }

.profile { margin: -12px 0 28px; }
.banner {
  aspect-ratio: 3 / 1; max-height: 300px; width: 100%; border-radius: 22px; overflow: hidden;
  background: radial-gradient(ellipse at 20% 0%, rgba(251, 162, 192, 0.35), transparent 60%),
    linear-gradient(120deg, var(--surface-2), var(--plum) 140%);
  border: 1px solid var(--line);
}
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile .profile-head { margin: -44px 0 12px 24px; align-items: flex-start; }
.profile .profile-head .avatar { border: 4px solid var(--black); }
.profile .profile-head > div { padding-top: 54px; }
.profile .profile-head .button { margin: 56px 0 0 auto; }
.bio { max-width: 68ch; margin-left: 4px; }

.profile-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.profile-cols aside { position: sticky; top: 20px; }
.profile-cols aside h2 { margin-top: 0; font-size: var(--step-1); }

.tier { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.tier.current { border-color: var(--pink); }
.tier-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.tier p { margin: 0 0 10px; }
.tier form { margin: 0; }

/* -------------------------------------------------------------- posts */

.post {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 18px 20px; margin-bottom: 18px;
}
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.post-head > div { display: flex; flex-direction: column; margin-right: auto; }
.post-author { color: var(--text); font-weight: 650; text-decoration: none; }
.post-head a.muted { text-decoration: none; }
.post-body { margin-bottom: 14px; }
.post-foot { display: flex; gap: 16px; align-items: flex-start; margin-top: 12px; flex-wrap: wrap; }

.gallery { display: grid; gap: 6px; grid-template-columns: repeat(2, 1fr); border-radius: 16px; overflow: hidden; }
.gallery.n1 { grid-template-columns: 1fr; }
.gallery.n3 { grid-template-columns: repeat(3, 1fr); }
.shot { position: relative; display: block; line-height: 0; background: var(--surface-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.gallery.n1 .shot img { aspect-ratio: auto; max-height: 80vh; object-fit: contain; }
.mark {
  position: absolute; right: 10px; bottom: 10px; pointer-events: none; line-height: 1.2;
  font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); user-select: none;
}

.video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; margin-bottom: 6px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .mark { bottom: auto; top: 10px; }
.video.pending { display: grid; place-items: center; border: 1px dashed var(--line); background: var(--surface-2); }
.video.pending p { margin: 0; padding: 20px; text-align: center; }

.locked {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 36px 20px; border-radius: 16px;
  background: radial-gradient(circle at 50% 30%, rgba(251, 162, 192, 0.18), transparent 60%), var(--surface-2);
  border: 1px solid var(--line);
}
.locked img { width: 56px; height: auto; }
.locked p { margin: 0; color: var(--blush); font-weight: 600; }
.locked form { margin: 0; }

details.report summary { color: var(--muted); font-weight: 400; font-size: var(--step--1); }
details.report[open] { flex-basis: 100%; }
details.report form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; max-width: 460px; }
details.report label { display: flex; flex-direction: column; gap: 6px; font-size: var(--step--1); }
details.report button { align-self: flex-start; }
aside details.report { margin-top: 4px; }

/* ------------------------------------------------------------- studio */

.studio-head { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.studio-head h1 { margin: 0; }
.studio-head + .stats { margin-top: 20px; }
.profile-preview { display: flex; align-items: center; gap: 16px; }
.tier-form { margin-top: 16px; }
.tier-form input[name="price"] { flex: 0 1 160px; }
.panel.invite { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 28px; }
.panel.invite h3 { margin-bottom: 0.2em; }
.panel.invite p { margin: 0; }

/* -------------------------------------------------------------- legal */

.legal h2 { font-size: var(--step-1); margin-top: 1.4em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 0.35em 0; max-width: 68ch; }
.legal .tag { margin-bottom: 1.2em; }
.footer-links { display: flex; gap: 16px; width: 100%; }
.footer-links a { color: var(--muted); }

@media (max-width: 860px) {
  .profile-cols { grid-template-columns: 1fr; }
  .profile-cols aside { position: static; order: -1; }
}
@media (max-width: 760px) {
  .profile .profile-head { margin-left: 12px; flex-wrap: wrap; }
  .profile .profile-head .avatar.big { width: 72px; height: 72px; }
  .profile .profile-head > div { padding-top: 46px; }
  .post { padding: 14px; border-radius: 18px; }
  .gallery.n3 { grid-template-columns: repeat(2, 1fr); }
}
