/* Florida State Roleplay */

:root {
  --bg: #07060a;
  --surface: rgba(20, 17, 24, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f6f1ea;
  --muted: #a9a2a8;
  --faint: #8f8892;
  --sun: #ff8a3d;
  --coral: #ff5470;
  --sea: #3fd0c9;
  --discord: #5865f2;
  --sunset: linear-gradient(100deg, #ffb347 0%, #ff8a3d 35%, #ff5470 75%, #d9468f 100%);
  --radius: 22px;
  --wrap: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

h1, h2, h3 {
  margin: 0;
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.98;
  font-stretch: 95%;
}
h1 { font-size: clamp(56px, 9.5vw, 132px); }
h2 { font-size: clamp(38px, 5.4vw, 72px); }
h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
em { font-style: normal; }
.glow {
  background: var(--sunset);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
p { margin: 0; color: var(--muted); text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--coral); color: #fff; }

.wrap { width: min(var(--wrap), calc(100% - 40px)); margin-inline: auto; }
.section { padding-block: clamp(96px, 13vw, 168px); position: relative; z-index: 1; }
.lede { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.7; max-width: 32em; margin-top: 24px; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: #fff; color: #000; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 16px; }

#particles { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: var(--sunset); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; z-index: 50;
  width: min(720px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 16px;
  background: rgba(12, 10, 15, 0.62);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  transform: translate(-50%, 0);
  transition: transform 0.5s var(--ease);
}
.nav.tucked { transform: translate(-50%, -140%); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 18px/1 var(--display); letter-spacing: -0.03em; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.nav-links { display: flex; justify-content: center; gap: 2px; flex: 1; }
.nav-links a { position: relative; padding: 12px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--sun); }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 40px; padding: 0 16px; border-radius: 999px; background: #fff; color: #0b0a0d; font-size: 14px; font-weight: 700; transition: transform 0.16s var(--ease); }
.nav-cta:active { transform: scale(0.96); }
.nav-cta svg { width: 18px; height: 18px; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  overflow: hidden; isolation: isolate;
  transition: transform 0.16s var(--ease), border-color 0.2s, color 0.2s;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(0.97); }
.btn-sun { background: var(--sunset); color: #1a0b07; border-color: transparent; }
.btn-ghost { background: rgba(255,255,255,0.03); color: var(--text); }
.btn-ghost::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; transform: translateY(101%); transition: transform 0.25s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { color: #0b0a0d; border-color: #fff; }
  .btn-ghost:hover::before { transform: none; }
}
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 13px; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.arrow-link svg { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; min-height: 100svh; display: flex; align-items: flex-end; padding-block: 160px 96px; overflow: hidden; }
.hero-bg { position: absolute; inset: -8% 0 0; z-index: -1; will-change: transform; }
.hero-bg .sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 72% 62%, rgba(255, 138, 61, 0.55), transparent 70%),
    radial-gradient(40% 40% at 20% 30%, rgba(217, 70, 143, 0.28), transparent 70%),
    linear-gradient(180deg, #120a1a 0%, #2a0f22 45%, #4a1a1d 70%, #07060a 100%);
}
.hero-bg .photo-layer { position: absolute; inset: 0; background: url("assets/hero.png") center / cover no-repeat; opacity: 0.5; mix-blend-mode: luminosity; }
.sun {
  position: absolute; right: 5%; bottom: 14%;
  width: clamp(180px, 28vw, 420px); aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(180deg, #ffd27a 0%, #ff8a3d 50%, #ff5470 100%);
  box-shadow: 0 0 140px 40px rgba(255, 120, 60, 0.3);
  -webkit-mask: linear-gradient(#000 0 55%, transparent 0) top / 100% 100% no-repeat, repeating-linear-gradient(180deg, #000 0 12px, transparent 12px 19px) bottom / 100% 45% no-repeat;
  mask: linear-gradient(#000 0 55%, transparent 0) top / 100% 100% no-repeat, repeating-linear-gradient(180deg, #000 0 12px, transparent 12px 19px) bottom / 100% 45% no-repeat;
  will-change: transform;
}
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, var(--bg) 100%), linear-gradient(90deg, rgba(7,6,10,0.75) 0%, transparent 60%); }
.hero-inner { will-change: transform, opacity; }
.hero h1 { max-width: 8.2em; }
.hero .lede { color: #d5cdd2; }

/* ---------- Word reveal ---------- */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.split .w > span { display: inline-block; transform: translateY(110%); transition: transform 0.7s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.split.in .w > span { transform: none; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Head row ---------- */
.head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; margin-bottom: 64px; }
.head .lede { margin: 0; justify-self: end; }

/* ---------- Path cards ---------- */
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.path { position: relative; display: flex; flex-direction: column; min-height: 260px; padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.3s, transform 0.6s var(--ease), opacity 0.6s var(--ease); }
.path:hover { border-color: var(--line-strong); }
.path p { margin-top: 12px; font-size: 15px; }
.path .arrow-link { margin-top: auto; padding-top: 28px; }
.path .arrow-link::after { content: ""; position: absolute; inset: 0; }
.path:hover .arrow-link svg { transform: translateX(4px); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.stat { padding: 48px 28px 44px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { display: block; font: 600 clamp(44px, 5vw, 72px)/1 var(--display); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 14px; font-size: 14px; color: var(--muted); }
.stat .btn-sm { margin-top: 18px; }
.stat.sessions strong { font-size: clamp(30px, 3vw, 40px); letter-spacing: -0.03em; padding-top: 10px; }

/* ---------- Showcase ---------- */
.showcase { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.frame {
  position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  clip-path: inset(16% 12% 16% 12% round 28px); transition: clip-path 1.4s var(--ease);
  background: radial-gradient(70% 50% at 50% 100%, rgba(255,138,61,0.7), transparent 70%), linear-gradient(180deg, #1b2a4a 0%, #6a2a4a 55%, #ff8a3d 100%);
}
.frame.in { clip-path: inset(0 0 0 0 round 28px); }
.frame .inner { position: absolute; inset: -12% 0; background: url("assets/community.png") center / cover; will-change: transform; }
.frame figcaption { position: absolute; left: 20px; right: 20px; bottom: 20px; padding: 16px 18px; border-radius: 16px; background: rgba(7, 6, 10, 0.55); backdrop-filter: blur(14px); border: 1px solid var(--line-strong); font-size: 13px; color: var(--muted); }
.frame figcaption strong { display: block; color: var(--text); font: 600 18px/1.3 var(--display); letter-spacing: -0.02em; }
.checks { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 14px; align-items: baseline; color: #d5cdd2; }
.checks li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); transform: translateY(-1px); }

/* ---------- Sticky stack (departments) ---------- */
.stack { display: grid; gap: 28px; }
.stack-card {
  position: sticky; top: calc(110px + var(--n) * 22px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end;
  min-height: 340px; padding: clamp(32px, 4vw, 56px);
  border-radius: 30px; border: 1px solid var(--line-strong);
  background: #110e14; transform-origin: 50% 0; will-change: transform;
}
.stack-card.law { --accent: #6b8cff; }
.stack-card.fire { --accent: var(--coral); }
.stack-card.civ { --accent: var(--sea); }
.stack-card .tag { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.stack-card h3 { margin-top: 16px; font-size: clamp(40px, 5vw, 72px); letter-spacing: -0.045em; line-height: 0.95; }
.stack-card p { font-size: 16px; }
.stack-card .btn { margin-top: 24px; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 72px 1fr auto; gap: 24px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); font: 600 40px/1 var(--display); color: var(--sun); font-variant-numeric: tabular-nums; }
.steps p { margin-top: 6px; font-size: 16px; }

/* ---------- Discord invite ---------- */
.connect { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.invite { padding: 24px; border-radius: var(--radius); background: #111014; border: 1px solid var(--line-strong); }
.invite-top { display: flex; align-items: center; gap: 16px; }
.invite-top img { width: 64px; height: 64px; border-radius: 18px; background: #1d1a22; object-fit: contain; }
.invite-top strong { display: block; font-size: 20px; letter-spacing: -0.02em; }
.invite-top small { font-size: 13px; color: var(--muted); }
.invite-counts { display: flex; gap: 22px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.invite-counts b { color: var(--text); font-variant-numeric: tabular-nums; }
.invite-counts span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--faint); }
.invite-counts .on::before { background: #3ba55c; }
.invite .btn { width: 100%; justify-content: center; margin-top: 22px; background: var(--discord); border-color: var(--discord); color: #fff; border-radius: 12px; }
.invite .btn:hover { background: #4752c4; }
.signin-pop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(6px); animation: pop-fade 0.2s ease-out; }
.signin-pop[hidden] { display: none; }
.signin-pop .invite { position: relative; width: min(100%, 440px); animation: pop-in 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.signin-pop p { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.signin-pop .close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.signin-pop .close:hover { background: #1d1a22; color: var(--text); }
@keyframes pop-fade { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.94) translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .signin-pop, .signin-pop .invite { animation: none; } }

.feedback-card { margin-top: 56px; padding: 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feedback-card p { margin-top: 8px; font-size: 15px; }

/* ---------- Inner pages ---------- */
.page-head { position: relative; z-index: 1; padding-top: clamp(160px, 22vw, 240px); padding-bottom: 24px; }
.page-head h1 { font-size: clamp(52px, 8vw, 112px); max-width: 10em; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card h3 + p { margin-top: 12px; font-size: 15px; }
.card .btn { margin-top: 28px; }
.card.featured { border-color: rgba(255, 138, 61, 0.45); }
.card .tag { display: block; margin-bottom: 20px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sun); }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; margin-top: 120px; border-top: 1px solid var(--line); overflow: hidden; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; padding-block: 64px 40px; }
.footer-top p { max-width: 26em; margin-top: 18px; font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 28px; justify-content: flex-end; font-size: 14px; font-weight: 600; color: #d5cdd2; }
.footer-links a:hover { color: var(--sun); }
.wordmark { font: 600 clamp(64px, 16vw, 230px)/0.82 var(--display); letter-spacing: -0.06em; white-space: nowrap; text-align: center; background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0)); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; margin-bottom: -0.1em; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 22px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .paths, .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .head, .showcase, .connect, .grid-2, .stack-card, .footer-top { grid-template-columns: 1fr; }
  .head .lede { justify-self: start; }
  .feedback-card { flex-direction: column; align-items: flex-start; }
  .footer-links { justify-content: flex-start; }
  .frame { aspect-ratio: 4 / 3; }
  .steps li { grid-template-columns: 48px 1fr; }
  .steps li > a { grid-column: 2; justify-self: start; }
}
@media (max-width: 640px) {
  .nav { padding-left: 12px; gap: 6px; }
  .nav-links a { padding: 10px 7px; font-size: 13px; }
  .nav-cta span { display: none; }
  .nav-cta { width: 40px; padding: 0; justify-content: center; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stack-card { position: relative; top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .reveal { transition: opacity 0.4s; }
  .split .w > span { transform: none; }
  .reveal { transform: none; }
  .frame { clip-path: inset(0 round 28px); }
}
