/* ============================================================
   RMRS AI Style Audit
   Palette: ink navy #0F1E2E · navy #16324F · cream #F6F1E7
            gold #C39A3B · garnet #9C3E2E · chalk #E9E2D2
   Type:    DM Serif Display (display) · Open Sans (body/labels)
            — matches realmenrealstyle.com
   ============================================================ */

:root {
  --ink: #0F1E2E;
  --navy: #16324F;
  --cream: #F6F1E7;
  --cream-deep: #EFE7D6;
  --chalk: #E9E2D2;
  --gold: #C39A3B;
  --gold-deep: #A8822C;
  --garnet: #9C3E2E;
  --text: #22303F;
  --text-soft: #5A6675;
  --display: "DM Serif Display", Georgia, serif;
  --body: "Open Sans", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.hidden { display: none !important; }

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

button { font-family: inherit; cursor: pointer; }

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

/* label style: Open Sans caps, replaces the old mono layer */
.eyebrow, .step-label, .mirror-fine, .busy-msg, .demo-banner,
.ticket-brand, .ticket-meta, .stamp-score, .gauge-label,
.formality-scale span, .fine-print, .ticket-foot-note,
.header-note, .wordmark-sub, .site-footer {
  font-family: var(--body);
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  border: none;
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-deep); color: var(--cream); }

.btn-block {
  display: block; width: 100%;
  padding-left: 10px; padding-right: 10px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--cream); }

/* ---------- Header ---------- */

.site-header {
  background: var(--ink);
  color: var(--cream);
  border-bottom: 2px solid var(--gold);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; padding-bottom: 10px;
}
.wordmark-main {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}
.wordmark-sub {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--gold);
  margin-top: 1px;
}
.header-note {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--chalk);
  opacity: 0.75;
}

/* ---------- Hero: one screen, footer above the fold ---------- */

.hero {
  min-height: calc(100vh - 110px); /* header (67px) + footer (39px) stay in view */
  display: flex;
  align-items: center;
  padding: 28px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--garnet);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.9rem);
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 16px;
}
.hero h1 em { font-style: italic; color: var(--navy); }

.hero-sub {
  font-size: 1.02rem;
  color: var(--text-soft);
  max-width: 44ch;
  margin-bottom: 32px;
}

/* steps strip: the whole "how it works" in one thin row */
.steps-strip {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.steps-strip li { border-top: 2px solid var(--gold); padding-top: 8px; }
.step-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--garnet);
  margin-bottom: 2px;
}
.steps-strip p { font-size: 0.8rem; color: var(--text-soft); line-height: 1.45; }

/* ---------- The fitting mirror ---------- */

.mirror-col { display: flex; flex-direction: column; align-items: center; }

.mirror {
  width: min(310px, 100%);
  background: var(--ink);
  border-radius: 155px 155px 12px 12px;
  padding: 12px;
  box-shadow: 0 24px 48px -18px rgba(15, 30, 46, 0.45);
}

.mirror-inner {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  background: linear-gradient(168deg, #f9f5ec 0%, var(--cream-deep) 100%);
  border-radius: 143px 143px 8px 8px;
  border: 2px dashed rgba(22, 50, 79, 0.35);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 36px 24px 28px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.mirror-inner:hover, .mirror-inner.dragover {
  border-color: var(--gold);
  background: linear-gradient(168deg, #faf4e4 0%, #f2e7cd 100%);
}

.mirror-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  width: 100%; height: 100%;
}

.silhouette { width: 44px; color: var(--navy); opacity: 0.35; margin-bottom: 14px; }

.mirror-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.mirror-hint { font-size: 0.85rem; color: var(--text-soft); margin-bottom: 14px; }

.mirror-fine {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  margin-top: 14px;
}

.mirror-error {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--garnet);
  font-weight: 700;
  text-align: center;
  max-width: 320px;
}

/* analyzing state */
#stateBusy { position: absolute; inset: 0; padding: 0; }

.preview-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
}

.scanline {
  position: absolute; left: 0; right: 0; top: -4px;
  height: 3px;
  background: var(--gold);
  box-shadow: 0 0 24px 6px rgba(195, 154, 59, 0.55);
  animation: scan 2.4s ease-in-out infinite;
}
@keyframes scan {
  0%, 100% { top: 6%; }
  50% { top: 92%; }
}

.busy-msg {
  position: absolute; left: 0; right: 0; bottom: 22px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--cream);
  background: rgba(15, 30, 46, 0.82);
  padding: 10px 16px;
  margin: 0 20px;
}

/* ---------- Report section ---------- */

.report-section {
  background: var(--navy);
  padding: 80px 0 96px;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0px, transparent 34px,
    rgba(246, 241, 231, 0.03) 34px, rgba(246, 241, 231, 0.03) 36px
  );
}

.demo-banner {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: var(--gold);
  display: table;
  margin: 0 auto 28px;
  padding: 8px 18px;
}

/* --- the tailor's ticket --- */

.ticket {
  background: var(--cream);
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 52px 40px;
  position: relative;
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.5);
}
/* stitched border */
.ticket::after {
  content: "";
  position: absolute; inset: 10px;
  border: 2px dashed rgba(22, 50, 79, 0.3);
  pointer-events: none;
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.ticket-brand {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--garnet);
  margin-bottom: 8px;
}
.ticket-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
  color: var(--ink);
}
.ticket-meta {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  margin-top: 10px;
}

/* grade stamp */
.stamp {
  flex-shrink: 0;
  width: 108px; height: 108px;
  border: 3px double var(--garnet);
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--garnet);
  transform: rotate(-8deg);
  opacity: 0.92;
}
.stamp-grade {
  font-family: var(--display);
  font-weight: 400;
  font-size: 2.6rem;
  line-height: 1;
}
.stamp-score {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin-top: 4px;
}

.ticket-rule {
  height: 1px;
  background: rgba(22, 50, 79, 0.2);
  margin: 32px 0;
}

/* --- gauges --- */

.gauges { display: grid; gap: 28px; }
.gauge { min-width: 0; }

.gauge-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink);
  margin-bottom: 10px;
}
.gauge-num { font-size: 1rem; color: var(--gold-deep); }
.formality-level { letter-spacing: 0.1em; }

/* tape-measure track */
.tape {
  position: relative;
  height: 22px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(22, 50, 79, 0.35) 0 1px, transparent 1px 10%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(22, 50, 79, 0.2) 0 1px, transparent 1px 2.5%
    ),
    var(--cream-deep);
  border: 1px solid rgba(22, 50, 79, 0.3);
}
.tape-fill {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(195, 154, 59, 0.55), rgba(195, 154, 59, 0.85));
  border-right: 3px solid var(--garnet);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.gauge-note { font-size: 0.92rem; color: var(--text); margin-top: 10px; max-width: 62ch; }

/* formality scale */
.formality-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid rgba(22, 50, 79, 0.3);
  background: var(--cream-deep);
}
.formality-scale span {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 9px 4px;
  color: var(--text-soft);
  border-right: 1px solid rgba(22, 50, 79, 0.18);
  line-height: 1.5;
}
.formality-scale span:last-child { border-right: none; }
.formality-scale span.active {
  background: var(--navy);
  color: var(--cream);
  font-weight: 700;
}

/* --- findings --- */

.findings { display: grid; grid-template-columns: 1fr 1.25fr; gap: 44px; }

.findings-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 16px;
}

.strengths ul { list-style: none; }
.strengths li {
  font-size: 0.94rem;
  padding-left: 28px;
  position: relative;
  margin-bottom: 14px;
}
.strengths li svg {
  position: absolute; left: 0; top: 3px;
  width: 16px; height: 16px;
  color: var(--gold-deep);
}

.fixes ol { list-style: none; counter-reset: fix; }
.fixes ol li {
  counter-increment: fix;
  font-size: 0.94rem;
  padding-left: 36px;
  position: relative;
  margin-bottom: 14px;
}
.fixes ol li::before {
  content: counter(fix, decimal-leading-zero);
  position: absolute; left: 0; top: 1px;
  font-size: 0.72rem;
  color: var(--garnet);
  font-weight: 700;
  letter-spacing: 0.05em;
}
.locked-list { counter-reset: fix 1 !important; }

/* --- locked overlay --- */

.locked-wrap { position: relative; margin-top: 4px; }

.locked-list li { filter: blur(5px); user-select: none; }

.unlock-card {
  position: relative;
  margin-top: -8px;
  background: var(--ink);
  color: var(--cream);
  padding: 28px 26px 22px;
  text-align: center;
  border-top: 3px solid var(--gold);
}
.lock-icon { width: 22px; height: 22px; color: var(--gold); margin-bottom: 8px; }
.unlock-card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.unlock-card p { font-size: 0.88rem; color: var(--chalk); margin-bottom: 18px; }
.unlock-card p strong { color: var(--gold); }

#unlockForm { display: grid; gap: 10px; }
#unlockForm input {
  font-family: var(--body);
  font-size: 1rem; /* 16px minimum — smaller triggers iOS focus zoom */
  padding: 12px 14px;
  border: 1px solid rgba(246, 241, 231, 0.3);
  background: rgba(246, 241, 231, 0.08);
  color: var(--cream);
}
#unlockForm input::placeholder { color: rgba(246, 241, 231, 0.5); }
#unlockForm input:focus { outline: 2px solid var(--gold); outline-offset: 0; }

.form-error { margin-top: 10px; font-size: 0.85rem; color: #E8A08F; font-weight: 700; }
.fine-print {
  margin-top: 12px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(246, 241, 231, 0.45);
}

.unlocked-note {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(195, 154, 59, 0.15);
  border-left: 3px solid var(--gold);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}
.unlocked-note svg { width: 18px; height: 18px; color: var(--gold-deep); flex-shrink: 0; }
.unlocked-note a {
  color: var(--garnet);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.unlocked-note a:hover { color: var(--gold-deep); }

/* --- ticket footer --- */

.ticket-foot {
  margin-top: 40px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.ticket-foot-note {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-soft);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(246, 241, 231, 0.6);
  padding: 11px 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}
.footer-row { display: flex; justify-content: space-between; gap: 16px; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero { min-height: 0; padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-sub { max-width: none; }
  .steps-strip { gap: 14px; }
  .findings { grid-template-columns: 1fr; gap: 36px; }
  .ticket { padding: 36px 26px 32px; }
  .ticket-head { flex-direction: column-reverse; align-items: center; text-align: center; }
  .stamp { transform: rotate(-6deg); }
  .header-note { display: none; }
  .footer-row { justify-content: center; }
}

@media (max-width: 560px) {
  .steps-strip { grid-template-columns: 1fr; }
  .steps-strip li { border-top: none; border-left: 2px solid var(--gold); padding: 2px 0 2px 12px; }
}

@media (max-width: 420px) {
  /* five side-by-side cells can't fit — stack the formality scale */
  .formality-scale { grid-template-columns: 1fr; }
  .formality-scale span {
    text-align: left;
    padding: 7px 12px;
    border-right: none;
    border-bottom: 1px solid rgba(22, 50, 79, 0.18);
  }
  .formality-scale span:last-child { border-bottom: none; }
  .formality-scale span br { display: none; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scanline { animation: none; top: 50%; }
  .tape-fill { transition: none; }
  .btn { transition: none; }
}
