:root {
  --bg: #0a0a0a;
  --bg-alt: #101010;
  --surface: #161616;
  --line: #262626;
  --text: #ededed;
  --muted: #9a9a9a;
  --accent: #c9a96a;
  --accent-dim: #8a744a;
  --danger: #e26d5a;
  --ok: #7fbf7f;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 1px;
}
.brand-mark.small { width: 30px; height: 30px; font-size: 13px; }

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 34px; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta { color: var(--accent) !important; }

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

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 120px 0 80px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(56px, 9vw, 118px);
  line-height: 1.02;
  letter-spacing: 1px;
}
.amp { color: var(--accent); font-style: italic; }

.hero-sub {
  max-width: 520px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions { display: flex; gap: 16px; margin-top: 44px; flex-wrap: wrap; }

.hero-rule {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1120px, 92vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

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

.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--accent-dim);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  background: transparent;
}
.btn-solid { background: var(--accent); border-color: var(--accent); color: #0a0a0a; font-weight: 500; }
.btn-solid:hover { background: #d9bb7f; border-color: #d9bb7f; }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 18px; font-size: 12px; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #0a0a0a; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Sections ---------- */

.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.12;
}

.section-body p { color: var(--muted); margin-bottom: 20px; font-size: 16px; }
.section-body p:first-child { padding-top: 8px; }

/* ---------- Timeline (flow with arrows) ---------- */

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px;
  margin-top: 70px;
}

.timeline-item { position: relative; }

.timeline-year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.timeline-item p { color: var(--muted); font-size: 14px; }

/* ---------- Logo wall ---------- */

.section-logos { padding: 60px 0 70px; }

.logos-eyebrow { margin-bottom: 36px; }

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-img {
  display: block;
  width: 129px;
  height: 56px;
  object-fit: contain;
  opacity: 0.8;
  filter: saturate(0.85);
  transition: opacity 0.25s, filter 0.25s;
}
.logo-img:hover { opacity: 1; filter: none; }

/* text fallback mark (same tile size as image logos) */
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 129px;
  height: 56px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--muted);
  opacity: 0.75;
  transition: color 0.25s, opacity 0.25s;
  white-space: nowrap;
}
.logo-mark:hover { color: var(--text); opacity: 1; }

/* ---------- Founder tech animation (slide cards) ---------- */

.ft-anim { margin: 64px 0 0; }

.ft-cards {
  display: flex;
  align-items: stretch;
  gap: 18px;
}

.ft-card {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 30px 14px 22px;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: border-color 0.25s;
}
.ft-card:hover { border-color: var(--accent-dim); }

.ft-ic {
  display: block;
  margin: 0 auto 14px;
  height: 64px;
  width: auto;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ft-map { display: block; margin: 0 auto 14px; height: 64px; width: auto; }

.ft-card-label {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--muted);
  margin: 0;
}

.ft-sep {
  align-self: center;
  color: var(--accent-dim);
  font-size: 26px;
  opacity: 0;
}

@keyframes ftUp { to { opacity: 1; transform: none; } }

.in-view .ft-card, .in-view .ft-sep { animation: ftUp 0.6s ease forwards; }
.in-view .c1 { animation-delay: 0.1s; }
.in-view .p1 { animation-delay: 0.45s; }
.in-view .c2 { animation-delay: 0.6s; }
.in-view .p2 { animation-delay: 0.95s; }
.in-view .c3 { animation-delay: 1.1s; }
.in-view .p3 { animation-delay: 1.45s; }
.in-view .c4 { animation-delay: 1.6s; }

@media (prefers-reduced-motion: reduce) {
  .ft-card, .ft-sep { animation: none !important; opacity: 1; transform: none; }
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
}

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 40px 32px;
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-4px); }

.card-num {
  font-family: var(--serif);
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 2px;
}

.card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  margin: 14px 0 12px;
}

.card p { color: var(--muted); font-size: 15px; }

/* ---------- Forms ---------- */

.contact-note { color: var(--muted); margin-top: 24px; max-width: 340px; }

.field { margin-bottom: 22px; }

.field label {
  display: block;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.optional { text-transform: none; letter-spacing: 0; }

.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  padding: 13px 15px;
  transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent-dim);
}

.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 300; }

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.checkbox-field input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.form-status { margin-top: 16px; font-size: 14px; min-height: 20px; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--danger); }

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

.site-footer { border-top: 1px solid var(--line); padding: 36px 0; }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}

.admin-link { color: var(--muted); text-decoration: none; letter-spacing: 1px; font-size: 12px; text-transform: uppercase; }
.admin-link:hover { color: var(--accent); }

/* ---------- Auth pages (login / admin share dark surface) ---------- */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 48px 40px;
  text-align: center;
}

.auth-card .brand-mark { width: 48px; height: 48px; font-size: 20px; margin-bottom: 18px; }

.auth-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  margin-bottom: 6px;
}

.auth-sub { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

.auth-card .field { text-align: left; }

.auth-back {
  display: inline-block;
  margin-top: 26px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.auth-back:hover { color: var(--accent); }

/* ---------- Admin dashboard ---------- */

.admin-body { min-height: 100vh; display: flex; flex-direction: column; }

.admin-header {
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.9);
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.admin-header .brand { gap: 10px; }
.admin-header .brand-name { font-size: 16px; }

.admin-header-right { display: flex; align-items: center; gap: 18px; }
.admin-user { color: var(--muted); font-size: 13px; }

.tabs { display: flex; gap: 4px; }

.tabs button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

.admin-main { flex: 1; padding: 48px 0 80px; }

.panel { display: none; }
.panel.active { display: block; }

.panel-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  margin-bottom: 8px;
}
.panel-desc { color: var(--muted); font-size: 14px; margin-bottom: 34px; }

.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 32px;
  max-width: 640px;
}

/* messages */
.msg-list { display: flex; flex-direction: column; gap: 16px; }

.msg {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px 28px;
}

.msg-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.msg-name { font-family: var(--serif); font-size: 20px; }
.msg-email { color: var(--accent); font-size: 14px; text-decoration: none; }
.msg-email:hover { text-decoration: underline; }
.msg-date { color: var(--muted); font-size: 12px; letter-spacing: 0.5px; }
.msg-subject { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.msg-body { color: var(--text); font-size: 15px; white-space: pre-wrap; margin: 12px 0 16px; }

.empty-state {
  border: 1px dashed var(--line);
  padding: 60px 30px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* users table */
.user-table { width: 100%; border-collapse: collapse; max-width: 640px; }
.user-table th, .user-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.user-table th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 400;
}
.badge-you {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  vertical-align: middle;
}

.form-row { display: flex; gap: 16px; }
.form-row .field { flex: 1; }

/* ---------- Reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(24px); animation: reveal 0.9s ease forwards; }
.reveal:nth-child(2) { animation-delay: 0.12s; }
.reveal:nth-child(3) { animation-delay: 0.24s; }
.reveal:nth-child(4) { animation-delay: 0.36s; }

@keyframes reveal {
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr; }
  /* timeline stacks vertically */
  .timeline { grid-template-columns: 1fr; gap: 44px; }
  .timeline-item { padding-left: 88px; min-height: 64px; }
  .timeline-year { position: absolute; left: 0; top: 0; }
  .nav-links { gap: 20px; }
  .brand-name { display: none; }
  .section { padding: 80px 0; }
  .admin-header-inner { flex-wrap: wrap; height: auto; padding: 14px 0; }
  .form-row { flex-direction: column; gap: 0; }
  /* slide cards: 2x2 grid, no separators */
  .ft-cards { flex-wrap: wrap; }
  .ft-card { flex: 1 1 42%; }
  .ft-sep { display: none; }
}
