/* Vault — black & white minimalism. resend.com / linear.app register.
   Pure black bg, white text, gray borders. NO red except rare functional
   safety warnings (none here). Inherited from the 1code.id palette so the
   family is visually consistent. */

:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #141414;
  --surface-3: #1a1a1a;
  --border: #262626;
  --border-strong: #3a3a3a;
  --text: #fafafa;
  --text-soft: #e5e5e5;
  --muted: #a3a3a3;
  --muted-2: #737373;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.6);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ── centered card layout (auth/error/consent) ─────────────────── */

body.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

main.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  width: 100%;
  max-width: 520px;
}

/* ── brand row ─────────────────────────────────────────────────── */

.brand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.logo { font-weight: 600; letter-spacing: -0.02em; font-size: 16px; }
.phase {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* ── typography ────────────────────────────────────────────────── */

h1 { font-size: 30px; line-height: 1.15; margin: 0 0 12px; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 28px 0 10px; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 13px; margin: 18px 0 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
p  { color: var(--text-soft); }
.muted { color: var(--muted); }
.fineprint { font-size: 12px; color: var(--muted-2); margin-top: 18px; }
strong { color: var(--text); font-weight: 600; }

/* ── buttons ───────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 500;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  text-decoration: none;
}
.btn:hover { background: var(--surface-3); border-color: #4a4a4a; text-decoration: none; }
.btn.primary { background: var(--text); color: #000; border-color: var(--text); font-weight: 600; }
.btn.primary:hover { background: #e2e2e2; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── form fields ───────────────────────────────────────────────── */

.field { display: block; margin: 14px 0; }
.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.field input, input.txt {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.field input:focus, input.txt:focus { outline: none; border-color: #5a5a5a; }
form .btn { margin-top: 10px; }

/* ── landing + login: shared page chrome ───────────────────────── */

body.landing, body.login { display: block; min-height: 100vh; }

.nav {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1040px; margin: 0 auto; padding: 22px 24px;
}
.nav-brand { display: inline-flex; align-items: center; }
.nav-logo { height: 36px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .nav-login {
  color: var(--text); border: 1px solid var(--border-strong);
  padding: 7px 14px; border-radius: var(--radius-sm);
}
.nav-links .nav-login:hover { background: var(--surface-2); border-color: #4a4a4a; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }

.site-footer {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  max-width: 1040px; margin: 0 auto; padding: 28px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted-2); font-size: 13px; margin-top: 72px;
}
.site-footer .footer-links { display: flex; gap: 20px; }
.site-footer .footer-links a { color: var(--muted-2); }
.site-footer .footer-links a:hover { color: var(--text-soft); text-decoration: none; }

/* ── landing: hero ─────────────────────────────────────────────── */

.hero {
  max-width: 1040px; margin: 0 auto; padding: 104px 24px 72px;
  text-align: center;
}
.eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 22px;
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px;
}
.hero h1 {
  font-size: 76px; line-height: 1.02; letter-spacing: -0.035em;
  margin: 0 auto; max-width: 16ch; font-weight: 600;
  overflow-wrap: break-word;
}
.hero .lede {
  font-size: 20px; color: var(--muted); max-width: 50ch;
  margin: 24px auto 34px; line-height: 1.5;
}
.hero .hero-foot { font-size: 13px; color: var(--muted-2); margin-top: 28px; }
.hero .cta-row { justify-content: center; }

/* ── landing: value-prop grid ──────────────────────────────────── */

/* A bordered grid box; the 1px gap reveals --border as hairlines between
   cells (linear.app register). Centered via max-width + margin; the page
   gutter is the margin, never inner padding, so the hairlines stay even. */
.props {
  max-width: 992px; margin: 24px auto 0;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.prop { background: var(--bg); padding: 36px 32px; position: relative; }
.prop-num {
  font-family: var(--mono); font-size: 12px; color: var(--muted-2);
  letter-spacing: 0.08em; display: block; margin-bottom: 16px;
}
.prop h2 {
  font-size: 18px; margin: 0 0 10px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--text);
}
.prop p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ── landing: closing band ─────────────────────────────────────── */

.closer {
  max-width: 1040px; margin: 96px auto 0; padding: 0 24px;
  text-align: center;
}
.closer h2 {
  font-size: 34px; line-height: 1.15; letter-spacing: -0.025em;
  font-weight: 600; max-width: 20ch; margin: 0 auto 28px; color: var(--text);
}
.closer .btn { text-transform: none; }

/* ── landing: pricing ──────────────────────────────────────────── */

.pricing { max-width: 1040px; margin: 112px auto 0; padding: 0 24px; }
.pricing-head { text-align: center; margin-bottom: 40px; }
.pricing-head .eyebrow { margin-bottom: 18px; }
.pricing-head h2 {
  font-size: 38px; line-height: 1.1; letter-spacing: -0.03em;
  font-weight: 600; margin: 0 0 12px; color: var(--text);
}
.pricing-sub { color: var(--muted); font-size: 16px; max-width: 52ch; margin: 0 auto; }

.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  align-items: stretch;
}
.tier {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 22px; position: relative;
}
.tier-featured { border-color: var(--border-strong); background: var(--surface-2); }
.tier-flag {
  position: absolute; top: -10px; left: 22px;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--text); color: #000; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.tier-head { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.tier-name {
  display: block; font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.tier-storage { font-size: 15px; color: var(--muted-2); font-family: var(--mono); margin-bottom: 6px; }
.tier-price { display: flex; align-items: baseline; gap: 4px; }
.tier-price .amount { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.tier-price .per { font-size: 13px; color: var(--muted-2); }
.tier-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; line-height: 1.45; }
.tier-feats { list-style: none; margin: 0 0 22px; padding: 0; flex: 1; }
.tier-feats li {
  font-size: 13.5px; color: var(--text-soft); padding: 7px 0 7px 22px;
  position: relative; line-height: 1.4;
}
.tier-feats li::before {
  content: ""; position: absolute; left: 2px; top: 12px;
  width: 8px; height: 8px; border-radius: 2px;
  border: 1px solid var(--border-strong);
}
.tier-cta { width: 100%; text-transform: none; }

.pricing-foot {
  text-align: center; font-size: 13px; color: var(--muted-2);
  max-width: 70ch; margin: 32px auto 0; line-height: 1.6;
}

/* ── login page ────────────────────────────────────────────────── */

.login-main {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 200px); padding: 40px 24px;
}
.login-card {
  width: 100%; max-width: 400px; text-align: center;
}
.login-card h1 {
  font-size: 26px; letter-spacing: -0.02em; margin: 0 0 8px; font-weight: 600;
}
.login-sub { color: var(--muted); font-size: 15px; margin: 0 0 28px; }

.qr-frame {
  display: inline-flex; padding: 0;
  background: transparent; border: 0;
  border-radius: 0; box-shadow: none;
}
.qr { display: block; width: 240px; height: 240px; }

.login-divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--muted-2); font-size: 13px; margin: 32px 0 20px;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

.store-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 14px; color: var(--text); background: var(--surface-2);
  transition: background 120ms ease, border-color 120ms ease;
}
.store-badge:hover { background: var(--surface-3); border-color: #4a4a4a; text-decoration: none; }
.store-badge svg { flex: none; color: var(--text); }
.store-label { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-label small { font-size: 9px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.store-label strong { font-size: 14px; font-weight: 600; color: var(--text); }

.login-fine { font-size: 12px; color: var(--muted-2); margin-top: 30px; }
.login-fine a { color: var(--muted); }
.login-fine a:hover { color: var(--text); }

/* ── responsive: landing + login ───────────────────────────────── */

@media (max-width: 920px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1040px) {
  /* keep the bordered grid off the screen edges once it loses its centering gap */
  .props { margin-left: 24px; margin-right: 24px; }
}

@media (max-width: 720px) {
  .hero { padding: 72px 20px 56px; }
  .hero h1 { font-size: 52px; }
  .hero h1 br { display: none; }
  .hero .lede { font-size: 18px; }
  .props { grid-template-columns: 1fr; }
  .prop { padding: 28px 24px; }
  .closer h2 { font-size: 28px; }
  .pricing-head h2 { font-size: 30px; }
}

@media (max-width: 560px) {
  .nav { padding: 18px 20px; }
  .nav-links { gap: 14px; font-size: 13px; }
  .nav-links a:not(.nav-login) { display: none; }
  .hero h1 { font-size: 38px; }
  .hero .cta-row { flex-direction: column; }
  .hero .cta-row .btn { width: 100%; }
  .pricing-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .store-row { flex-direction: column; }
  .store-badge { justify-content: center; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 32px; }
  .pricing-head h2 { font-size: 26px; }
}

/* ── app shell (dashboard) ─────────────────────────────────────── */

body.app { display: block; min-height: 100vh; }
.app-top {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); z-index: 10;
}
.app-top .logo { font-size: 15px; }
.app-top .spacer { flex: 1; }
.who { font-size: 13px; color: var(--muted); }
.who .device { color: var(--text-soft); }

.app-body { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 49px); }
.side { border-right: 1px solid var(--border); padding: 16px; }
.side .navitem { display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--muted); font-size: 14px; cursor: pointer; }
.side .navitem:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side .navitem.active { background: var(--surface-2); color: var(--text); }

.quota { margin-top: 24px; font-size: 12px; color: var(--muted); }
.quota .bar { height: 6px; background: var(--surface-3); border-radius: 999px; margin: 8px 0; overflow: hidden; border: 1px solid var(--border); }
.quota .bar > i { display: block; height: 100%; background: var(--text); }
.quota .upgrade { margin-top: 10px; }

.main { padding: 20px 24px; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { margin: 0 6px; color: var(--muted-2); }

/* file/folder grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); padding: 16px 14px; cursor: pointer;
  position: relative; transition: border-color 120ms ease, background 120ms ease;
}
.tile:hover { border-color: var(--border-strong); background: var(--surface-2); }
.tile .icon { font-size: 22px; line-height: 1; margin-bottom: 10px; color: var(--muted); }
.tile .name { font-size: 14px; word-break: break-word; }
.tile .meta { font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.tile .kebab { position: absolute; top: 8px; right: 8px; color: var(--muted-2); font-size: 16px; padding: 2px 6px; border-radius: 4px; }
.tile .kebab:hover { background: var(--surface-3); color: var(--text); }

.empty { color: var(--muted-2); font-size: 14px; padding: 40px 0; text-align: center; }

/* context menu */
.menu {
  position: absolute; min-width: 180px; background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; z-index: 50;
}
.menu button {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 13px;
  color: var(--text-soft); background: none; border: none; padding: 8px 10px;
  border-radius: 4px; cursor: pointer;
}
.menu button:hover { background: var(--surface-3); color: var(--text); }
.menu .div { height: 1px; background: var(--border); margin: 6px 2px; }

/* toast / hint */
.hint {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px;
  color: var(--text-soft); box-shadow: var(--shadow); max-width: 460px; z-index: 100;
}
.hint button { margin-left: 12px; }

.banner {
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px;
  color: var(--muted); margin-bottom: 16px;
}
