/* ============================================================================
   Hinge-style profile — static clone
   ========================================================================= */

/* --- tokens --------------------------------------------------------------- */
/* Palette per hinge.co brand resources.
   Core:      Hinge White #FFFEFD · Hinge Black #1A1A1A
   Secondary: Kohlrabi   #994EA8
   Distribution target is 80% core / 20% secondary, so Kohlrabi is limited to
   interactive accents (play button, selection, focus, heart hover). Greys are
   straight tints of Hinge Black; --bg is a shade of Hinge White, needed so the
   Hinge White cards read as cards. */
:root {
  --bg:            #f4f2f0;
  --bg-grad:       #eceae7;
  --card:          #fffefd;   /* Hinge White */
  --card-soft:     #faf9f7;
  --ink:           #1a1a1a;   /* Hinge Black */
  --ink-2:         #4d4d4d;
  --ink-3:         #8a8a8a;
  --line:          #e6e4e2;
  --line-soft:     #efedeb;
  --accent:        #994ea8;   /* Kohlrabi */
  --accent-ink:    #fffefd;
  --shadow-sm:     0 1px 2px rgba(26, 26, 26, .05), 0 4px 14px rgba(26, 26, 26, .05);
  --shadow-md:     0 2px 6px rgba(26, 26, 26, .07), 0 12px 34px rgba(26, 26, 26, .08);
  --radius:        20px;
  --radius-sm:     14px;
  --gap:           14px;
  --col:           500px;

  /* Brand faces are Tiempos Headline (Klim) and Modern Era (Family Type), both
     commercially licensed — they lead each stack so a licensed install is used
     when present, with the closest free stand-ins behind them. */
  --sans:  "Modern Era", "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Tiempos Headline", "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #141414;
    --bg-grad:   #1a1a1a;   /* Hinge Black */
    --card:      #1f1f1f;
    --card-soft: #262626;
    --ink:       #fffefd;   /* Hinge White */
    --ink-2:     #c4c4c4;
    --ink-3:     #8a8a8a;
    --line:      #2e2e2e;
    --line-soft: #292929;
    --accent:    #d3a0de;   /* Kohlrabi, lightened for dark surfaces */
    --accent-ink: #1a1a1a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, .45);
  }
}

:root[data-theme="dark"] {
  --bg:        #141414;
  --bg-grad:   #1a1a1a;   /* Hinge Black */
  --card:      #1f1f1f;
  --card-soft: #262626;
  --ink:       #fffefd;   /* Hinge White */
  --ink-2:     #c4c4c4;
  --ink-3:     #8a8a8a;
  --line:      #2e2e2e;
  --line-soft: #292929;
  --accent:    #d3a0de;   /* Kohlrabi, lightened for dark surfaces */
  --accent-ink: #1a1a1a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, .45);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  background-image: linear-gradient(178deg, var(--bg) 0%, var(--bg-grad) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;          /* Modern Era Medium — brand body weight */
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, figure, blockquote, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* every icon <use> inherits this stroke treatment */
svg use, .card svg, .vital svg, .detail svg { vector-effect: non-scaling-stroke; }

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

.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -120%);
  z-index: 50; padding: 10px 18px; border-radius: 0 0 12px 12px;
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 600;
  transition: transform .18s ease;
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

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

/* --- layout --------------------------------------------------------------- */
.shell {
  width: min(100% - 24px, var(--col));
  margin-inline: auto;
  padding-block: clamp(20px, 5vw, 44px) 64px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* --- header --------------------------------------------------------------- */
.profile-head {
  padding: 10px 6px 4px;
  text-align: center;
}

.profile-head__name {
  font-size: clamp(30px, 8vw, 38px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.profile-head__age { font-weight: 400; color: var(--ink-2); }

.profile-head__badge {
  width: .62em; height: .62em;
  margin-left: .18em;
  vertical-align: baseline;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-head__meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 14px;
}

.profile-head__dot { opacity: .6; }

.pronoun-chip {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}

/* --- card shell ----------------------------------------------------------- */
.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px; /* room for the overhanging like button */
}

.card--pad { padding: 26px 24px 30px; }
.card--text { padding-block: 34px 40px; }

.card__prompt {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.005em;
  color: var(--ink);
}

.card--media > .card__prompt { padding: 20px 22px; }
.card--bare > .card__prompt { display: none; }

.card__answer {
  margin-top: 14px;
  font-family: var(--serif);
  font-weight: 300;          /* Tiempos Headline Light — brand headline weight */
  font-size: clamp(25px, 6.2vw, 30px);
  line-height: 1.24;
  letter-spacing: -.01em;
  color: var(--ink);
  text-wrap: pretty;
}

.card--text .card__prompt { font-size: 15.5px; color: var(--ink-2); }

/* --- media ---------------------------------------------------------------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--card-soft);
}

.card--bare .media { border-radius: var(--radius); }

.media img,
.media video {
  width: 100%;
  /* height:auto is required — the width/height attributes on the elements are
     presentational hints that would otherwise beat aspect-ratio. */
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.media--square img { aspect-ratio: 1 / 1; }

.media__mute {
  position: absolute;
  left: 12px; top: 12px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(26, 26, 26, .55);   /* Hinge Black */
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.media__mute-icon {
  width: 19px; height: 19px;
  fill: none;
  stroke: #fffefd;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.media__mute-icon--on { display: none; }
.media__mute[aria-pressed="false"] .media__mute-icon--off { display: none; }
.media__mute[aria-pressed="false"] .media__mute-icon--on { display: block; }

/* --- like link (opens an Instagram DM) ------------------------------------ */
.like {
  position: absolute;
  right: 16px;
  bottom: -18px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s cubic-bezier(.34, 1.56, .64, 1), border-color .16s;
  z-index: 2;
}

.like svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill .18s, stroke .18s, transform .18s;
}

.like:hover { transform: scale(1.07); }
.like:active { transform: scale(.94); }

.like:hover,
.like:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.like:hover svg,
.like:focus-visible svg {
  fill: var(--accent);
  stroke: var(--accent);
  transform: scale(1.06);
}

/* --- poll ----------------------------------------------------------------- */
.poll {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.poll__option {
  width: 100%;
  padding: 18px 20px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-soft);
  box-shadow: var(--shadow-sm);
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink);
  cursor: pointer;
  transition: transform .14s ease, border-color .14s, background .14s;
}

.poll__option:hover { transform: translateY(-1px); }

.poll__option[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  font-weight: 600;
}

/* --- vitals --------------------------------------------------------------- */
.card--vitals { padding-block: 4px 8px; }

.vitals-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}

.vitals-scroll::-webkit-scrollbar { display: none; }

.vitals {
  display: flex;
  align-items: stretch;
  width: max-content;
  padding: 14px 18px;
}

.vital {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 18px;
  white-space: nowrap;
  font-size: 15px;
  color: var(--ink);
}

.vital + .vital { border-left: 1px solid var(--line); }
.vital:first-child { padding-left: 4px; }
.vital:last-child { padding-right: 4px; }

.vital svg, .detail svg {
  flex: none;
  width: 21px; height: 21px;
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.details {
  margin-top: 2px;
  padding: 2px 22px 8px;
  border-top: 1px solid var(--line-soft);
}

.detail {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  font-size: 16px;
  color: var(--ink);
}

.detail + .detail { border-top: 1px solid var(--line-soft); }

/* --- vouches -------------------------------------------------------------- */
.vouches { margin-block: 18px 10px; }

.vouches__title {
  margin-bottom: 16px;
  text-align: center;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.015em;
}

.vouches__rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding: 4px 4px 8px;
  margin-inline: -4px;
}

.vouches__rail::-webkit-scrollbar { display: none; }

.vouch {
  flex: 0 0 min(86%, 380px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 24px 24px 22px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.vouch__prompt {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
}

.vouch__quote {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;          /* Tiempos Headline, one step up from Light */
  line-height: 1.22;
  letter-spacing: -.012em;
  text-wrap: pretty;
}

.vouch__by {
  margin-top: auto;
  padding-top: 26px;
  font-size: 14.5px;
  color: var(--ink-3);
}

.vouch__by strong { color: var(--ink-2); font-weight: 600; }

.vouches__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 4px;
}

.vouches__dot {
  width: 7px; height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink-3) 34%, transparent);
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.vouches__dot[aria-selected="true"] {
  background: var(--ink-3);
  transform: scale(1.25);
}

/* --- footer --------------------------------------------------------------- */
.page-foot {
  margin-top: 26px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}

.page-foot__fine {
  margin-top: 6px;
  font-size: 12px;
  opacity: .8;
}

/* --- toast ---------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translate(-50%, 16px);
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* --- entrance ------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.22, 1, .36, 1);
}

.reveal.is-in { opacity: 1; transform: none; }

@keyframes rise { from { transform: translateX(-50%) translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

@media (min-width: 560px) {
  @keyframes rise { from { transform: translate(-50%, 50%) scale(.96); opacity: 0; } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .vouches__rail { scroll-behavior: auto; }
}
