/* JEE Duel: landing page */
:root {
  --bg: #0e1116;
  --surface: #171b22;
  --border: #262c36;
  --border-strong: #3a4250;
  --text: #f2f4f7;
  --muted: #9aa4b2;
  --accent: #ffb547;
  --rival: #5cd6e0;
  --font-body: Inter, system-ui, sans-serif;
  --font-display: "Space Grotesk", Inter, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--muted); text-decoration: none; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 26px; }
.logo::before { content: ""; width: 16px; height: 16px; background: var(--accent); }
.nav-buttons { display: flex; gap: 12px; }
.nav-buttons button { min-height: 50px; padding: 0 26px; font: 600 18px var(--font-body); border-radius: 8px; cursor: pointer; }
#loginbtn { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
#loginbtn:hover { border-color: var(--muted); }
#signupbtn { background: var(--accent); color: var(--bg); border: 1px solid var(--accent); }
#signupbtn:hover { filter: brightness(1.08); }

.page-wrapper { max-width: 1360px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }

.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding: clamp(48px, 8vw, 104px) 0 72px; }
.main-text { flex: 1 1 520px; display: flex; flex-direction: column; gap: 28px; }
.main-heading { margin: 0; font-family: var(--font-display); font-size: clamp(46px, 7vw, 84px); line-height: 1.04; font-weight: 700; }
.lead { margin: 0; max-width: 600px; font-size: 23px; line-height: 1.55; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.fd-btn, .New { display: inline-flex; align-items: center; min-height: 58px; padding: 0 30px; border-radius: 8px; font-weight: 600; font-size: 19px; }
.fd-btn { background: var(--accent); color: var(--bg); }
.fd-btn:hover { filter: brightness(1.08); color: var(--bg); }
.New { color: var(--text); border: 1px solid var(--border-strong); }
.New:hover { border-color: var(--muted); }

/* live duel preview, built from plain HTML so it never depends on an image */
.preview { flex: 1 1 480px; display: flex; flex-direction: column; gap: 20px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.preview-top { display: flex; justify-content: space-between; font-size: 17px; color: var(--muted); }
.preview-score { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-size: 26px; }
.preview-score .you { color: var(--accent); }
.preview-score .time { color: var(--muted); font-size: 18px; }
.preview-score .rival { color: var(--rival); }
.preview-q { margin: 0; padding: 20px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; font-size: 20px; line-height: 1.5; }
.preview-q small { display: block; margin-top: 12px; font-size: 17px; color: var(--muted); }
.preview-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.preview-opts span { display: grid; place-items: center; min-height: 54px; border: 1px solid var(--border-strong); border-radius: 8px; font: 600 20px var(--font-display); }
.preview-opts span.picked { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.section-title { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(32px, 4vw, 44px); line-height: 1.1; }
.section-lead { margin: 0 0 40px; max-width: 680px; font-size: 21px; color: var(--muted); }
.section { padding: 24px 0 88px; }

.steps, .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.step { border-top: 3px solid var(--accent); padding-top: 20px; }
.step h3, .feature h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 26px; }
.step p, .feature p { margin: 0; font-size: 20px; color: var(--muted); }
.feature { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }

.subjects { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.subject { padding: 28px; border: 1px solid var(--border-strong); border-radius: 16px; }
.subject h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 28px; }
.subject p { margin: 0; font-size: 20px; color: var(--muted); }
.subject.p h3 { color: var(--accent); }
.subject.c h3 { color: var(--rival); }

.final { margin-bottom: 88px; padding: clamp(32px, 6vw, 64px); text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.final .section-lead { margin-inline: auto; }
.final .cta-row { justify-content: center; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 28px clamp(20px, 4vw, 56px); border-top: 1px solid var(--border); font-size: 17px; color: var(--muted); }

@media (max-width: 560px) {
  .preview-opts { grid-template-columns: repeat(2, 1fr); }
  .fd-btn, .New { width: 100%; justify-content: center; }
}

/* smooth scrolling + scroll reveal */
html { scroll-behavior: smooth; }
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.5s cubic-bezier(0.33, 1, 0.68, 1), transform 1.5s cubic-bezier(0.33, 1, 0.68, 1);
  will-change: opacity, transform;
}
.js .reveal.in { opacity: 1; transform: none; }

/* question bank */
.bank { display: grid; grid-template-columns: minmax(280px, 1fr) 1.5fr; gap: 32px; align-items: stretch; }
.bank-stat { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 36px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.bank-stat .big { font-family: var(--font-display); font-size: clamp(52px, 7vw, 88px); line-height: 1; font-weight: 700; color: var(--accent); }
.bank-stat p { margin: 0; font-size: 20px; color: var(--muted); }
.bank-points { display: grid; gap: 20px; }
.point { padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); }
.point:nth-child(2) { border-color: var(--rival); }
.point:nth-child(3) { border-color: var(--border-strong); }
.point h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 26px; }
.point p { margin: 0; font-size: 20px; color: var(--muted); }

/* friends */
.social { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.social-list { display: grid; gap: 28px; margin: 0; padding: 0; list-style: none; }
.social-list h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 26px; }
.social-list p { margin: 0; font-size: 20px; color: var(--muted); }
.friends-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.fc-head { display: flex; justify-content: space-between; font-size: 17px; color: var(--muted); }
.fc-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--border-strong); font: 700 18px var(--font-display); }
.fc-name { flex: 1; display: flex; flex-direction: column; font-weight: 600; font-size: 19px; }
.fc-name small { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--muted); }
.fc-name small::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rival); }
.fc-row.off .fc-name small::before { background: var(--border-strong); }
.fc-btn { display: inline-grid; place-items: center; min-height: 40px; padding: 0 18px; border-radius: 8px; background: var(--accent); color: var(--bg); font-weight: 600; font-size: 16px; border: 1px solid var(--accent); }
.fc-btn.ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.invite { padding: 18px; border: 1px solid var(--accent); border-radius: 12px; }
.invite p { margin: 0 0 14px; font-size: 18px; }
.invite-actions { display: flex; gap: 10px; }
.js .invite { opacity: 0; transform: translateY(14px); transition: opacity 1s ease 1.2s, transform 1s cubic-bezier(0.33, 1, 0.68, 1) 1.2s; }
.js #friends.in .invite { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .bank, .social { grid-template-columns: 1fr; gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; transition: opacity 1.2s ease; }
  .js .invite { transform: none; transition: opacity 1s ease 1.2s; }
}

/* attention keywords: a touch brighter and bolder, nothing else */
.hot { color: var(--accent); }
.hl { background: none; color: var(--text); font-weight: 600; }
.section-title .hl { color: var(--accent); }
.fd-btn, #signupbtn, .fc-btn:not(.ghost) { box-shadow: 0 0 22px rgba(255, 181, 71, 0.18); }

/* coming soon */
.soon { padding-bottom: 96px; }
.soon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.soon-slot { padding: 28px; border: 1px dashed var(--border-strong); border-radius: 16px; }
.soon-slot h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 24px; color: var(--accent); }
.soon-slot p { margin: 0; font-size: 20px; color: var(--muted); }
