@import url("/static/fonts/onest/400.css");
@import url("/static/fonts/onest/500.css");
@import url("/static/fonts/onest/600.css");
@import url("/static/fonts/literata/wght.css");

:root {
  --bg: #11100e;
  --bg-2: #171510;
  --card: #1b1813;
  --card-2: #211d17;
  --paper: #ece3d2;
  --paper-2: #e1d5c0;
  --paper-ink: #211c15;
  --paper-muted: #6b5f4f;
  --border: rgba(236, 227, 210, 0.10);
  --border-strong: rgba(236, 227, 210, 0.16);
  --text: #ece5d8;
  --secondary: #b6ab99;
  --muted: #8f8473;
  --accent: #e45b3f;
  --accent-ink: #b83d27;
  --accent-soft: rgba(228, 91, 63, 0.12);
  --success: #7d9b80;
  --danger: #e06052;
  --warn: #d5a15a;
  --radius: 12px;
  --sans: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Literata Variable", Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--paper); }

h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(17, 16, 14, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--paper); }
.brand-mark {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--accent);
  flex: none;
}
.brand-mark svg { width: 22px; height: 22px; }

.nav-links { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.nav-links a { color: var(--secondary); font-size: 14px; }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-muted { color: var(--muted); }
.nav-links .nav-login { color: var(--secondary); }
.nav-links .btn { margin-left: 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--paper);
  color: var(--paper-ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), opacity 160ms var(--ease);
}
.btn:hover {
  background: #f2eadc;
  color: var(--paper-ink);
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; border-radius: 6px; }
.btn-quiet {
  background: var(--card);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.btn-quiet:hover { background: var(--card-2); color: var(--text); border-color: rgba(236, 227, 210, 0.24); }
.btn-ghost {
  background: transparent;
  color: var(--secondary);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--card); color: var(--text); }
.btn-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--secondary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.btn-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.btn-link.danger { color: var(--danger); }
.inline { display: inline-block; margin-left: 8px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--secondary);
  font-size: 14px;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.text-link span { transition: transform 160ms var(--ease); }
.text-link:hover { color: var(--text); border-color: var(--accent); }
.text-link:hover span { transform: translateX(2px); }

.container {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 0 0 96px;
  flex: 1;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
}
.footer-meta { color: var(--muted); }

/* Landing */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 64px;
  align-items: center;
  padding: 96px 0 88px;
}

.hero-copy { max-width: 620px; }
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.hero-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 3.8vw, 52px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 24px;
}

.lead {
  max-width: 54ch;
  margin: 0 0 32px;
  color: var(--secondary);
  font-size: 17px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 0 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.hero-meta span { white-space: nowrap; }

.hero-visual { display: flex; justify-content: center; align-items: center; }

.docket {
  position: relative;
  width: min(100%, 460px);
  padding: 28px 28px 24px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--paper-ink);
  transform: rotate(-1.2deg);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.docket::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 10px;
  height: 100%;
  background: radial-gradient(circle at 6px 6px, var(--bg) 3px, transparent 3.5px) 0 0 / 10px 12px repeat-y;
}

.docket-top,
.docket-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--paper-muted);
  font-family: var(--mono);
  font-size: 11px;
}

.docket-address {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 28px 0 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(33, 28, 21, 0.18);
}
.docket-name { font-size: 13px; color: var(--paper-muted); }
.docket-email {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.docket-rows { display: flex; flex-direction: column; }
.docket-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 88px 10px 0;
  border-bottom: 1px dashed rgba(33, 28, 21, 0.22);
  font-family: var(--mono);
  font-size: 12px;
}
.docket-rows span { color: var(--paper-muted); }
.docket-rows b { font-weight: 400; text-align: right; overflow-wrap: anywhere; }
.docket-status { color: var(--accent-ink); }

.docket-bottom { margin-top: 20px; }

.postmark {
  position: absolute;
  right: -28px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  border: 2px solid var(--accent-ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--accent-ink);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
  transform: rotate(-12deg);
  opacity: 0.88;
  background: transparent;
}
.postmark strong {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 4px 0;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.fact {
  display: flex;
  gap: 16px;
  padding: 24px 28px;
  border-left: 1px solid var(--border);
}
.fact:first-child { border-left: 0; padding-left: 0; }
.fact:last-child { padding-right: 0; }
.fact-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  color: var(--muted);
}
.fact-icon svg { width: 18px; height: 18px; }
.fact h3 { font-size: 14px; font-weight: 500; margin: 0 0 6px; }
.fact p { margin: 0; color: var(--secondary); font-size: 13px; line-height: 1.55; }

.section { padding: 96px 0 0; }
.section-kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.section h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.section-note { max-width: 48ch; margin: 0; color: var(--secondary); font-size: 14px; line-height: 1.6; }

.pricing { display: block; }
.pricing .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 48px;
  align-items: end;
  max-width: none;
  margin-bottom: 24px;
}
.pricing .section-head h2 { margin-bottom: 0; }
.pricing .section-note { justify-self: end; max-width: 320px; }
.section-head { max-width: 420px; }

.ledger { border-top: 1px solid var(--border); }
.ledger-head,
.ledger-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.5fr) minmax(64px, 0.7fr) minmax(96px, 0.8fr) minmax(56px, 0.5fr);
  align-items: center;
  gap: 16px;
}
.ledger-head {
  min-height: 40px;
  padding: 0 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.ledger-row {
  min-height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  transition: background-color 160ms var(--ease);
}
.ledger-row:hover { background: rgba(236, 227, 210, 0.03); }
.ledger-row.is-featured { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.ledger-name { display: flex; align-items: baseline; gap: 10px; font-size: 14px; font-weight: 500; }
.ledger-name small { color: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 400; }
.ledger-count,
.ledger-price { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--secondary); }
.ledger-price { color: var(--text); }
.ledger-action {
  justify-self: end;
  color: var(--secondary);
  font-size: 13px;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.ledger-action:hover { color: var(--text); border-color: var(--accent); }

.how { display: grid; grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.22fr); gap: 64px; align-items: start; }
.how-intro { max-width: 420px; }
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.steps li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.step-number { color: var(--muted); font-family: var(--mono); font-size: 12px; line-height: 1.7; }
.steps h3 { font-size: 15px; font-weight: 500; margin: 0 0 4px; }
.steps p { margin: 0; color: var(--secondary); font-size: 13px; line-height: 1.6; }

.closing {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.closing h2 { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 34px); font-weight: 400; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
.closing .section-note { max-width: 46ch; }

/* App pages */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 48px 0 24px;
  flex-wrap: wrap;
}
.page-head h1 { font-family: var(--serif); font-size: 36px; font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 4px; }
.page-head p { margin: 0; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.card {
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.link { color: var(--secondary); font-size: 13px; }
.link:hover { color: var(--text); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.stat span { color: var(--muted); font-size: 12px; }
.stat b { font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
.right { text-align: right; }
.empty { color: var(--muted); margin: 8px 0; }
.mt { margin-top: 32px; }
.secret { letter-spacing: 0.05em; }

table { width: 100%; border-collapse: collapse; }
th {
  padding: 10px 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(236, 227, 210, 0.025); }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-family: var(--mono); font-size: 11px; font-weight: 400; }
.badge.ok { background: rgba(125, 155, 128, 0.14); color: var(--success); }
.badge.off { background: rgba(224, 96, 82, 0.12); color: var(--danger); }
.badge.wait { background: rgba(213, 161, 90, 0.12); color: var(--warn); }

.flashes { display: flex; flex-direction: column; gap: 8px; margin: 24px 0 0; }
.flash { padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); font-size: 13px; }
.flash.ok { border-color: rgba(125, 155, 128, 0.35); background: rgba(125, 155, 128, 0.08); }
.flash.error { border-color: rgba(224, 96, 82, 0.35); background: rgba(224, 96, 82, 0.08); }

label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; color: var(--secondary); font-size: 13px; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
button.btn { font-family: var(--sans); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; align-items: end; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.inline-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 220px; }

.auth-wrap { display: grid; place-items: center; min-height: 58vh; padding: 48px 0; }
.auth-card { width: min(420px, 100%); padding: 32px; }
.auth-card h1 { font-family: var(--serif); font-size: 34px; font-weight: 400; letter-spacing: -0.02em; margin: 0 0 8px; }
.auth-card p { margin-bottom: 24px; }

.error-page { text-align: center; padding: 96px 0; }
.error-page h1 { font-family: var(--serif); font-size: 64px; font-weight: 400; color: var(--paper); margin-bottom: 8px; }
.error-page p { color: var(--secondary); margin-bottom: 24px; }

.dns-record {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
}
.dns-record > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dns-record span { color: var(--muted); font-size: 11px; }
.dns-record b { font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.dns-record .wide { grid-column: 1 / -1; }
.domain-card .dns-record { margin-bottom: 16px; }

/* Purchase page plan picker */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
.plan-grid.compact { margin-top: 16px; }
.plan-card.selectable { cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.plan-card.selectable input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.plan-card.selectable:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.plan-count { font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1; }
.plan-name { color: var(--secondary); font-size: 12px; }
.plan-price { margin-top: 4px; color: var(--text); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Admin */
.admin-body { display: flex; min-height: 100vh; padding: 0; }
.sidebar {
  display: flex;
  flex: 0 0 232px;
  flex-direction: column;
  gap: 32px;
  width: 232px;
  height: 100vh;
  padding: 20px 16px;
  border-right: 1px solid var(--border);
  background: var(--bg-2);
  position: sticky;
  top: 0;
}
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { padding: 8px 10px; border-radius: 6px; color: var(--secondary); font-size: 13px; }
.sidebar nav a:hover { background: var(--card); color: var(--text); }
.sidebar-exit { margin-top: auto; color: var(--danger); font-size: 13px; }
.admin-main { flex: 1; min-width: 0; padding: 24px 32px 64px; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding: 64px 0 72px; }
  .hero-copy { max-width: 640px; }
  .hero-visual { justify-content: flex-start; }
  .facts { grid-template-columns: 1fr; }
  .fact, .fact:first-child, .fact:last-child { padding: 20px 0; border-left: 0; border-top: 1px solid var(--border); }
  .fact:first-child { border-top: 0; }
  .how { grid-template-columns: 1fr; gap: 32px; }
  .pricing .section-head { grid-template-columns: 1fr; gap: 12px; }
  .pricing .section-note { justify-self: start; max-width: 48ch; }
  .section-head, .how-intro { max-width: 560px; }
}

@media (max-width: 760px) {
  .nav { padding: 14px 20px; gap: 16px; }
  .nav-links { gap: 14px; }
  .nav-section { display: none; }
  .nav-links .btn { margin-left: 0; }
  .container { width: calc(100% - 40px); padding-bottom: 72px; }
  .footer { padding: 20px; flex-direction: column; gap: 6px; }
  .hero { padding: 48px 0 56px; gap: 40px; }
  .hero h1 { font-size: 40px; }
  .lead { font-size: 16px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 16px; }
  .docket { transform: none; padding: 24px 20px 20px; }
  .docket-email { font-size: 21px; }
  .docket-rows > div { align-items: flex-start; flex-direction: column; gap: 2px; padding-right: 80px; }
  .docket-rows b { text-align: left; }
  .postmark { right: -12px; bottom: -8px; width: 96px; height: 96px; }
  .section { padding-top: 64px; }
  .how { gap: 24px; }
  .ledger-head { display: none; }
  .ledger-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    min-height: 0;
    padding: 16px;
  }
  .ledger-name { flex: 1 1 100%; }
  .ledger-count { order: 2; font-size: 12px; }
  .ledger-price { order: 3; font-size: 12px; }
  .ledger-action { order: 4; margin-left: auto; }
  .closing { align-items: flex-start; flex-direction: column; margin-top: 64px; }
  .page-head { margin-top: 24px; }
  .page-head h1 { font-size: 30px; }
  .card { padding: 16px; }
  .auth-card { padding: 24px; }
  .dns-record { grid-template-columns: 1fr; }
  .admin-body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-exit { margin-top: 0; }
  .admin-main { padding: 20px 20px 48px; }
}
