/* Unischool — uni.school
 *
 * Palette and type are lifted from the app (lib/core/theme/palette.dart, app_text.dart) so
 * the site and the product read as one thing: the same Bricolage/Jakarta/DM Mono stack, the
 * same warm paper ground, the same blue → purple header gradient.
 */

:root {
  --ink: #16171d;
  --blue: #2e44ff;
  --blue-deep: #1b2cc4;
  --blue-light: #5b6bff;
  --lime: #cbf23a;
  --coral: #ff5a3c;
  --purple: #7a5cff;
  --amber: #ffc53d;
  --green: #12b886;

  --page: #f3f1ea;
  --page-alt: #eceae1;
  --card: #ffffff;
  --border: #e2dfd4;

  --fg: var(--ink);
  --fg-2: #4a4c57;
  --fg-3: #7c7e8a;

  --display: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  --ui: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius: 18px;
  --pill: 999px;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --page: #0f1017;
    --page-alt: #181a23;
    --card: #181a23;
    --border: #2a2c36;
    --fg: #f4f4f7;
    --fg-2: #b9bac4;
    --fg-3: #8a8c98;
    --blue: #5b6bff;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--fg);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

/* --- type ---------------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 14px;
}

.lead { font-size: 1.1rem; color: var(--fg-2); max-width: 34rem; }

/* --- header -------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2b41f5, #5638cf);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--pill);
  font-family: var(--ui);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

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

.btn-primary { background: var(--lime); color: #16171d; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-sm { padding: 10px 16px; font-size: 0.85rem; }

.btn.is-pending {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.btn-store {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 11px 20px;
  text-align: left;
}
.btn-store .small {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
  font-weight: 400;
}
.btn-store .big { font-size: 0.95rem; font-weight: 800; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2b41f5 0%, #3a38e0 45%, #5638cf 100%);
  color: #fff;
  padding: clamp(56px, 10vw, 104px) 0 clamp(64px, 10vw, 112px);
}

.hero::after {
  /* A soft lime bloom, echoing the app's GradientBlob stage. */
  content: '';
  position: absolute;
  right: -10%;
  top: -30%;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(203, 242, 58, 0.28), transparent 62%);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero .accent { color: var(--lime); }
.hero .lead { color: rgba(255, 255, 255, 0.86); margin-top: 20px; }
.hero .eyebrow { color: rgba(255, 255, 255, 0.6); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }

.chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
}

/* --- sections ------------------------------------------------------------ */

section { padding: clamp(56px, 8vw, 88px) 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card .glyph {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 14px;
  display: block;
}

.card p { color: var(--fg-2); margin: 8px 0 0; font-size: 0.95rem; }

.rule { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* --- invite (join) page -------------------------------------------------- */

.invite {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2b41f5 0%, #3a38e0 45%, #5638cf 100%);
  color: #fff;
  padding: 40px 24px;
  text-align: center;
}

.invite-card { width: 100%; max-width: 27rem; }

.invite h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); color: #fff; }

.code-plate {
  display: inline-block;
  margin: 22px 0 10px;
  padding: 14px 26px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.code-plate .label {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.code-plate .value {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.1rem;
  letter-spacing: 0.08em;
  color: var(--lime);
  line-height: 1.2;
}

.invite .status { color: rgba(255, 255, 255, 0.82); min-height: 1.5rem; margin: 6px 0 0; }
.invite .cta-row { justify-content: center; }
.invite .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.32); }
.invite .hint { margin-top: 26px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); }

.copied {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}

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

.site-foot {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  color: var(--fg-3);
  font-size: 0.87rem;
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.site-foot a { color: var(--fg-2); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .cta-row .btn { width: 100%; }
  .btn-store { align-items: center; text-align: center; }
}
