/* ============================================================
   Joseph 60 : landing + rules
   Editorial / cinematic. Depth through light and space.
   ============================================================ */

:root {
  --bg:        #0A1628;   /* base navy                       */
  --surface:   #101D33;   /* lifted surface for rhythm       */
  --accent:    #5A9BD5;   /* steel blue                      */
  --accent-dim: rgba(90, 155, 213, 0.55);
  --amber:     #D4A843;   /* used sparingly                  */

  --ink:       #F2F6FB;   /* headings, near white            */
  --body:      #B8C4D4;   /* body copy, muted                */
  --muted:     #7E8FA6;   /* captions, fine print            */

  --hair:      rgba(146, 176, 210, 0.12);  /* hairline rule  */
  --hair-soft: rgba(146, 176, 210, 0.07);

  /* vertical rhythm */
  --pad-section: clamp(6.5rem, 13vw, 11rem);
  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);

  --measure: 60ch;
}

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

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

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

body {
  min-height: 100%;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(1rem, 0.97rem + 0.2vw, 1.0625rem);
  line-height: 1.75;
  color: var(--body);
  background-color: var(--bg);
  /* ambient depth: cool light spilling from the top,
     a faint warm pool at the foot of the page */
  background-image:
    radial-gradient(1100px 760px at 50% -8%, rgba(90, 155, 213, 0.11), transparent 62%),
    radial-gradient(900px 720px at 50% 118%, rgba(212, 168, 67, 0.05), transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Filmic grain, sits above everything at a whisper of opacity */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(90, 155, 213, 0.28);
  color: var(--ink);
}

/* ---------- Layout ------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 6vw, 4.5rem);
}

.measure { max-width: var(--measure); }

section {
  position: relative;
  padding-block: var(--pad-section);
}

/* alternating lifted surface with hairline seams top and bottom */
.surface {
  background: var(--surface);
  border-block: 1px solid var(--hair-soft);
}

/* a hairline seam under sections that sit on the base navy */
.seam { border-top: 1px solid var(--hair); }

/* ---------- Type -------------------------------------------------- */

h1, h2, h3 {
  font-family: "Cormorant", Georgia, serif;
  color: var(--ink);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: 0.004em;
}

h1 {
  font-weight: 300;
  font-size: clamp(3.4rem, 11.5vw, 8rem);
  letter-spacing: -0.005em;
}

h2 {
  font-size: clamp(2.3rem, 5.6vw, 3.6rem);
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

.label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.72;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.label .idx {
  color: var(--muted);
  opacity: 0.85;
  margin-right: 0.9em;
}

.label.warm { color: var(--amber); opacity: 0.85; }

p { max-width: var(--measure); }
p + p { margin-top: 1.5rem; }

.lead { color: var(--body); }

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

.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-size: clamp(0.85rem, 0.8rem + 0.3vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.36em;
  text-transform: uppercase;
}

.wordmark b { font-weight: 500; color: var(--accent); }

/* the PNG carries transparent padding around the mark;
   negative margin pulls its visible edge back to the content line */
.wordmark-logo {
  height: clamp(2.75rem, 2.4rem + 1.5vw, 3.25rem);
  width: auto;
  flex-shrink: 0;
  margin-left: -0.4rem;
}

/* center the wordmark on the rules page header */
.site-header.centered .wrap { text-align: center; }

/* ---------- Hero -------------------------------------------------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(7rem, 14vh, 10rem) clamp(4rem, 10vh, 7rem);
}

.hero h1 {
  max-width: 14ch;
}

.hero .sub {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  max-width: 40ch;
  font-size: clamp(1.05rem, 0.98rem + 0.5vw, 1.25rem);
  color: var(--body);
  line-height: 1.7;
}

.hero .cta { margin-top: clamp(2.75rem, 5vw, 3.75rem); }

/* thin rule + quiet scroll indicator anchored to the hero foot */
.hero-foot {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(2rem, 5vh, 3.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.hero-foot .rule {
  width: 1px;
  height: clamp(2.5rem, 6vh, 4rem);
  background: linear-gradient(to bottom, transparent, var(--accent-dim));
}

.hero-foot .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  animation: drift 3.4s var(--ease) infinite;
}

@keyframes drift {
  0%, 100% { opacity: 0.25; transform: translateY(-3px); }
  50%      { opacity: 0.9;  transform: translateY(3px); }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--accent-dim);
  border-radius: 2px;
  padding: 1.15rem 2.6rem;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.55s var(--ease),
    border-color 0.55s var(--ease),
    color 0.55s var(--ease),
    letter-spacing 0.55s var(--ease);
}

/* a hairline lead-in mark, a small designed detail */
.btn::before {
  content: "";
  width: 1.4em;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
  transition: width 0.55s var(--ease), opacity 0.55s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  background: rgba(90, 155, 213, 0.10);
  border-color: var(--accent);
  color: #EAF3FC;
  letter-spacing: 0.27em;
  outline: none;
}

.btn:hover::before,
.btn:focus-visible::before { width: 2.2em; opacity: 1; }

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; letter-spacing: 0.24em; }
.btn:disabled::before { width: 1.4em; }

/* ---------- Two paths -------------------------------------------- */

.paths {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

@media (min-width: 640px) {
  .paths { grid-template-columns: 1fr 1fr; }
}

.card {
  position: relative;
  padding: clamp(2.25rem, 4vw, 3rem);
  background: rgba(146, 176, 210, 0.02);
  border: 1px solid var(--hair);
  border-top: 1px solid var(--accent-dim);
  transition: background 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.5s var(--ease);
}

.card.warm { border-top-color: rgba(212, 168, 67, 0.7); }

.card:hover {
  background: rgba(146, 176, 210, 0.04);
  transform: translateY(-3px);
}

.card .n {
  font-family: "Cormorant", serif;
  font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  color: var(--ink);
  line-height: 1;
}

.card .k {
  display: block;
  margin-top: 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.card p {
  margin-top: 1.1rem;
  color: var(--body);
}

/* ---------- Signup ------------------------------------------------ */

.signup h2 { max-width: 16ch; }

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 30rem;
  margin-top: clamp(2.25rem, 4vw, 3rem);
}

@media (min-width: 560px) {
  .signup-form { flex-direction: row; align-items: stretch; }
  .signup-form input { flex: 1; }
}

.signup-form input {
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 2px;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.signup-form input::placeholder { color: var(--muted); }

.signup-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(90, 155, 213, 0.05);
}

.form-status {
  min-height: 1.5em;
  margin-top: 1.1rem;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  color: var(--amber);
}

.fine {
  margin-top: 1.9rem;
  font-size: 0.84rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- Rules page ------------------------------------------- */

.page-head {
  min-height: 52svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding-block: clamp(7rem, 16vh, 11rem) clamp(3rem, 7vh, 5rem);
}

.page-head .sub {
  margin-top: 1.5rem;
  color: var(--accent);
  opacity: 0.75;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.note { color: var(--muted); font-size: 0.95rem; margin-bottom: 2.25rem; }

.rules {
  list-style: none;
  max-width: none;
}

.rule {
  display: grid;
  gap: 0.4rem;
  padding-block: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--hair);
}
.rule:last-child { border-bottom: 1px solid var(--hair); }

@media (min-width: 660px) {
  .rule {
    grid-template-columns: 13rem 1fr;
    gap: 2.5rem;
    align-items: baseline;
  }
}

.rule .name {
  font-family: "Cormorant", serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--ink);
}

.rule .desc { color: var(--body); max-width: 54ch; }

/* comparison */
.compare {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin-top: clamp(2.25rem, 4vw, 3rem);
}

@media (min-width: 640px) {
  .compare { grid-template-columns: 1fr 1fr; }
}

.compare .card ul { list-style: none; margin-top: 1.25rem; }
.compare .card li {
  padding-block: 0.7rem;
  border-top: 1px solid var(--hair-soft);
  color: var(--body);
  font-size: 0.97rem;
}
.compare .card li:first-child { border-top: none; }

.closing { text-align: center; }
.closing h2 { margin-inline: auto; }
.closing p { margin-inline: auto; }
.closing .app-line {
  margin-top: 2.25rem;
  color: var(--amber);
  font-size: 0.86rem;
  letter-spacing: 0.03em;
}

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

.site-footer {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  text-align: center;
  border-top: 1px solid var(--hair);
}

.site-footer p {
  margin-inline: auto;
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Reveal motion ---------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 1.15s var(--ease),
    transform 1.15s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
  will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-foot .dot { animation: none; }
  .card:hover { transform: none; }
}
