/* ============================================================================
   Orger.ai design system — sibling of OTP's v7, its own amber register.

   Shared DNA with orgtp.com (verbatim v7 tokens): ink/neutral scale, warm
   near-white background, hairline borders, Schibsted Grotesk + Inter +
   JetBrains Mono, the ease curve.

   Own personality: AMBER accent where OTP uses blue, and CRISP corners
   (6px surfaces / 4px controls / 3px tags) as Orger's precision register.
   Amber (#ffab1d) is drawn from OTP's own documented design lineage.

   Light / editorial only. No dark surfaces except the shared footer slab.
   ========================================================================== */

:root {
  /* --- Neutrals + ink (verbatim from OTP v7 :root) --- */
  --ink: #14161c;
  --ink-soft: #494d57;
  --ink-mute: #888c96;
  --white: #fcfcfd;
  --card: #ffffff;
  --grey: #f0f1f3;
  --line: rgba(20, 22, 28, 0.10);
  --line-soft: rgba(20, 22, 28, 0.06);
  --hairline: #e6e8ec;

  /* --- Amber accent (Orger's own hue, from OTP's Departure Board lineage) --- */
  --amber: #ffab1d;
  --amber-hot: #ff8a12;
  --amber-deep: #b06c08;     /* text links on white — AA contrast */
  --amber-soft: #fff2d9;     /* tinted fills */
  --amber-tint: rgba(255, 171, 29, 0.10);

  /* --- Status (shared OTP semantics; used sparingly, color = status) --- */
  --green: #0a9d63;
  --green-deep: #06724a;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --amber-status: #d97706;
  --amber-status-soft: #fef3c7;

  /* --- Footer slab (shared with OTP) --- */
  --footer-bg: #0c1626;
  --footer-text: #aeb7c6;
  --footer-mute: #8893a4;
  --footer-faint: #5f6878;

  /* --- Crisp corners: Orger's register --- */
  --r-surface: 6px;
  --r-control: 4px;
  --r-tag: 3px;

  /* --- Motion (shared ease) --- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Type --- */
  --font-display: "Schibsted Grotesk", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --maxw: 1180px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}

p { color: var(--ink-soft); }

a { color: var(--amber-deep); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--amber-hot); }

img { max-width: 100%; display: block; }

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

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: var(--r-tag);
}

/* ---------- layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; width: 100%; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; width: 100%; }

main { flex: 1 0 auto; }

.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.eyebrow-amber { color: var(--amber-deep); }

.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.lead { font-size: 17px; line-height: 1.75; color: var(--ink-soft); max-width: 46ch; }
.muted { color: var(--ink-mute); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--white) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}
.wordmark .bracket { color: var(--amber); }
.wordmark:hover { color: var(--ink); }
.wordmark-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-left: 8px;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.15s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-mobile-toggle { display: none; background: none; border: 0; color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 11px 18px;
  border-radius: var(--r-control);
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.2s var(--ease), color 0.2s var(--ease);
  cursor: pointer;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-hot); color: var(--ink); }

.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #23262f; color: #fff; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--grey); color: var(--ink); border-color: var(--line); }

.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-block { width: 100%; }

.btn-danger { background: transparent; color: var(--red); border-color: var(--red-soft); }
.btn-danger:hover { background: var(--red-soft); color: var(--red); }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  padding: 24px;
}
.card-lift {
  box-shadow: 0 1px 3px rgba(20, 22, 28, 0.05), 0 16px 36px -22px rgba(20, 22, 28, 0.16);
}
.card-pad-lg { padding: clamp(24px, 4vw, 40px); }

/* ---------- badges / pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--r-tag);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--card);
}
.pill-amber { background: var(--amber-soft); border-color: transparent; color: var(--amber-deep); }
.pill-green { background: var(--green-soft); border-color: transparent; color: var(--green-deep); }
.pill-red { background: var(--red-soft); border-color: transparent; color: var(--red); }
.pill-review { background: var(--amber-status-soft); border-color: transparent; color: var(--amber-status); }

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.label .req { color: var(--amber-deep); }
.hint { font-size: 12px; color: var(--ink-mute); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  padding: 10px 12px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber-tint);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-mute); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23888c96' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.form-error {
  background: var(--red-soft);
  color: var(--red);
  border-radius: var(--r-control);
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
}

/* ---------- hero ---------- */
.hero { padding: clamp(64px, 11vh, 128px) 0 clamp(48px, 8vh, 96px); }
.hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 4rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.03em;
}
.hero .lead { font-size: clamp(17px, 2.2vw, 20px); max-width: 40ch; margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- step / how-it-works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--amber-deep);
  margin-bottom: 12px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { font-size: 14.5px; line-height: 1.65; }

/* ---------- generic grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.025em; }
.section-head .lead { margin-top: 14px; }

.divider { border: 0; border-top: 1px solid var(--line-soft); }

/* accent rule under section eyebrows */
.tick { width: 26px; height: 2px; background: var(--amber); border-radius: 2px; margin: 14px 0; }

/* ---------- who-it's-for chips ---------- */
.audience { display: flex; flex-wrap: wrap; gap: 10px; }
.audience .pill { font-size: 12px; padding: 8px 13px; background: var(--card); }

/* ---------- footer ---------- */
.footer { background: var(--footer-bg); color: var(--footer-text); margin-top: auto; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 56px 24px 72px; }
.footer .wordmark { color: #fff; }
.footer .wordmark .bracket { color: var(--amber); }
.footer-tag { color: var(--footer-mute); font-size: 14px; margin-top: 14px; max-width: 42ch; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.footer-links a { color: var(--footer-mute); }
.footer-links a:hover { color: #fff; }
.footer-legal { color: var(--footer-faint); font-size: 12px; margin-top: 28px; line-height: 1.7; }
.footer-powered { color: var(--footer-mute); font-size: 13px; margin-top: 18px; }
.footer-powered a { color: var(--footer-text); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- app shell (authed — the portal inherits this) ---------- */
.app-nav { border-bottom: 1px solid var(--line); background: var(--white); }
.app-nav-inner {
  max-width: 1040px; margin: 0 auto; padding: 0 24px; height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.app-main { max-width: 1040px; margin: 0 auto; padding: 40px 24px 80px; width: 100%; }
.app-footer {
  border-top: 1px solid var(--line-soft);
  padding: 22px 24px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 12px;
}
.status-banner {
  display: flex; align-items: flex-start; gap: 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--amber);
  border-radius: var(--r-surface); padding: 20px 22px; background: var(--card);
}
.status-banner.is-accepted { border-left-color: var(--green); }
.status-banner.is-rejected { border-left-color: var(--ink-mute); }

/* ---------- admin table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
table.data th, table.data td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table.data th {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-mute); font-weight: 500;
  background: var(--grey);
}
table.data tr:last-child td { border-bottom: 0; }
table.data td.actions { white-space: nowrap; }

.stat-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.stat {
  border: 1px solid var(--line); border-radius: var(--r-surface);
  padding: 14px 18px; min-width: 120px; background: var(--card);
}
.stat .n { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--ink); }
.stat .k { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); font-family: var(--font-mono); margin-top: 2px; }

/* ---------- 404 ---------- */
.center-stage {
  min-height: 62vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 48px 24px;
}
.center-stage .code { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.2em; color: var(--amber-deep); }
.center-stage h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 14px 0 10px; }

/* ---------- prose (privacy / terms) ---------- */
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.025em; }
.prose h2 { font-size: 1.3rem; margin: 34px 0 10px; }
.prose p { margin-bottom: 14px; line-height: 1.75; }
.prose ul { margin: 0 0 14px 20px; }
.prose li { margin-bottom: 7px; color: var(--ink-soft); line-height: 1.7; }
.prose .updated { font-family: var(--font-mono); font-size: 12px; color: var(--ink-mute); margin: 10px 0 30px; }
.prose .flag {
  background: var(--amber-soft); border-radius: var(--r-control);
  padding: 3px 7px; font-size: 12px; font-family: var(--font-mono); color: var(--amber-deep);
}

/* ---------- utilities ---------- */
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.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;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; background: var(--ink); color: #fff;
  padding: 8px 14px; border-radius: var(--r-control); font-size: 13px; z-index: 100;
  transition: top 0.15s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .steps, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
  }
  .nav-links.open .nav-link { padding: 8px 0; width: 100%; }
  .nav-links.open .btn { width: 100%; margin-top: 6px; }
  .nav-mobile-toggle { display: inline-flex; }
  .wordmark-sub { display: none; }
  .hero-actions .btn { width: 100%; }
  .grid-4 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .btn:hover { transform: none; }
}
