/* TGA HRIS SaaS · dark editorial style */
:root {
  --bg: #050506;
  --bg-2: #0d0d10;
  --bg-3: #17181c;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.16);
  --ink: #fff;
  --muted: #b7b7bd;
  --dim: #7f8085;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --serif: 'Playfair Display', 'Cardo', Georgia, serif;
  --wrap: 1120px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }

/* Typography */
.kicker { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); font-weight: 500; margin-bottom: 20px; }
.h-display { font-family: var(--serif); font-weight: 500; font-size: 72px; line-height: 1.05; letter-spacing: -.015em; }
.h-display em { font-style: italic; }
.h-md { font-family: var(--serif); font-weight: 500; font-size: 46px; line-height: 1.1; letter-spacing: -.005em; margin-bottom: 40px; }
.h-md em { font-style: italic; }
@media (max-width: 720px) {
  .h-display { font-size: 44px; }
  .h-md { font-size: 32px; }
}

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(5,5,6,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand-lock .brand-word { font-family: var(--serif); font-style: italic; font-size: 22px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.cta { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; background: var(--ink); color: var(--bg); border-radius: 999px; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; transition: transform .12s, background .12s; }
.cta:hover { transform: translateY(-1px); background: #eaeaea; }
.cta-sm { padding: 8px 16px; font-size: 13px; }
.cta-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.cta-ghost:hover { background: rgba(255,255,255,.06); }
.cta-big { padding: 20px 40px; font-size: 18px; }

/* Hero */
.hero { padding: 96px 0 80px; text-align: center; border-bottom: 1px solid var(--line); }
.hero .kicker { text-align: center; }
.lead { max-width: 640px; margin: 32px auto 40px; color: var(--muted); font-size: 19px; line-height: 1.55; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.hero-note { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; font-size: 14px; color: var(--dim); }
.hero-note span { display: inline-flex; align-items: center; }

/* Why / chaos curve */
.why { padding: 96px 0 40px; }
.chaos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-bottom: 56px; }
.chaos-step { background: var(--bg-2); border: 1px solid var(--line); padding: 24px; border-radius: 12px; }
.chaos-step .n { font-family: var(--serif); font-style: italic; font-size: 40px; color: var(--dim); display: block; margin-bottom: 8px; }
.chaos-step h3 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 20px; margin-bottom: 6px; }
.chaos-step p { font-size: 14px; color: var(--muted); }
.quote { max-width: 720px; margin: 40px auto 0; border-left: 3px solid var(--line-2); padding: 16px 0 16px 28px; }
.quote p { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.5; color: #e6e6e8; margin-bottom: 12px; }
.quote cite { font-style: normal; color: var(--dim); font-size: 13px; letter-spacing: .04em; }

/* How */
.how { padding: 88px 0; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.step { padding: 28px 4px; }
.step-num { font-family: var(--serif); font-style: italic; font-size: 56px; color: var(--dim); display: block; margin-bottom: 12px; }
.step h3 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 15px; }

/* Features */
.features { padding: 96px 0; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feat { background: var(--bg-2); border: 1px solid var(--line); padding: 24px; border-radius: 12px; }
.feat h4 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 20px; margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: 14px; line-height: 1.55; }

/* Pricing */
.pricing { padding: 96px 0; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pricing-note { color: var(--muted); max-width: 640px; margin-bottom: 32px; font-size: 16px; }
.billing-toggle { display: inline-flex; background: var(--bg-3); border-radius: 999px; padding: 4px; margin-bottom: 40px; border: 1px solid var(--line); }
.billing-toggle button { background: transparent; border: 0; color: var(--muted); padding: 10px 22px; border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; transition: .12s; display: inline-flex; align-items: center; gap: 8px; }
.billing-toggle button.active { background: var(--ink); color: var(--bg); }
.billing-toggle .badge { background: #e6b96b; color: var(--bg); padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.tier { background: var(--bg-3); border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; position: relative; display: flex; flex-direction: column; }
.tier-featured { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.tier-flag { position: absolute; top: -12px; right: 24px; background: var(--ink); color: var(--bg); padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.tier h3 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 30px; margin-bottom: 12px; }
.tier-price { margin-bottom: 6px; }
.tier-price .amt { font-family: var(--serif); font-weight: 500; font-size: 34px; }
.tier-price .per { color: var(--muted); font-size: 15px; margin-left: 6px; }
.tier-monthly { color: var(--dim); font-size: 13px; margin-bottom: 16px; }
.tier-limit { color: var(--muted); font-size: 14px; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.tier-limit b { color: var(--ink); font-weight: 600; }
.tier ul { list-style: none; margin-bottom: 28px; flex: 1; }
.tier ul li { padding: 8px 0 8px 24px; position: relative; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tier ul li::before { content: '✓'; position: absolute; left: 0; color: var(--ink); font-weight: 600; }
.tier .cta { width: 100%; justify-content: center; }
.pricing-fine { margin-top: 32px; font-size: 13px; color: var(--dim); max-width: 720px; }

/* FAQ */
.faq { padding: 96px 0; }
.faq-list { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq summary { font-family: var(--serif); font-style: italic; font-size: 20px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: '+'; font-size: 24px; color: var(--dim); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* Final CTA */
.final-cta { padding: 96px 0 128px; text-align: center; background: var(--bg-2); border-top: 1px solid var(--line); }
.final-cta p { color: var(--muted); max-width: 560px; margin: 20px auto 32px; font-size: 17px; }

/* Footer */
.foot { padding: 32px 0; border-top: 1px solid var(--line); }
.foot-inner { display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); flex-wrap: wrap; gap: 14px; }

/* ============ CHECKOUT & SETUP PAGES ============ */
.co-page, .setup-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.03), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(255,255,255,.02), transparent 60%),
    var(--bg);
}
.co-card, .setup-card { width: 100%; max-width: 520px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 44px 40px; }
.co-back { color: var(--dim); font-size: 13px; text-decoration: none; margin-bottom: 24px; display: inline-flex; align-items: center; gap: 6px; }
.co-back:hover { color: var(--muted); }
.co-title { font-family: var(--serif); font-style: italic; font-size: 34px; margin-bottom: 8px; line-height: 1.15; }
.co-sub { color: var(--muted); margin-bottom: 32px; font-size: 15px; line-height: 1.55; }
.co-order-summary { background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 24px; }
.co-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.co-line .lbl { color: var(--muted); }
.co-line .val { color: var(--ink); font-weight: 500; }
.co-total { padding-top: 12px; border-top: 1px solid var(--line); margin-top: 8px; font-size: 18px; font-weight: 600; }
.co-total .val { font-family: var(--serif); font-size: 22px; }
.co-methods { display: grid; gap: 10px; margin-bottom: 24px; }
.co-method { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: .12s; }
.co-method:hover, .co-method.selected { border-color: var(--ink); background: rgba(255,255,255,.03); }
.co-method-ic { width: 40px; height: 40px; background: var(--bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; letter-spacing: .05em; }
.co-method-name { font-weight: 500; font-size: 15px; flex: 1; }
.co-method-desc { color: var(--dim); font-size: 12px; }
.co-btn, .setup-btn { width: 100%; padding: 16px; background: var(--ink); color: var(--bg); border: 0; border-radius: 999px; font-weight: 600; font-size: 16px; cursor: pointer; margin-top: 8px; transition: .12s; }
.co-btn:hover, .setup-btn:hover { transform: translateY(-1px); }
.co-btn:disabled, .setup-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.co-fine { text-align: center; color: var(--dim); font-size: 12px; margin-top: 20px; }

/* Setup */
.setup-field { margin-bottom: 20px; }
.setup-field label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.setup-field input { width: 100%; padding: 14px 18px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-size: 15px; font-family: inherit; }
.setup-field input:focus { outline: none; border-color: var(--ink); }
.setup-subdomain { display: flex; align-items: stretch; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.setup-subdomain input { border: 0; background: transparent; padding: 14px 12px 14px 18px; flex: 1; color: var(--ink); font-size: 15px; font-family: inherit; }
.setup-subdomain input:focus { outline: none; }
.setup-suffix { padding: 14px 18px; background: rgba(255,255,255,.03); color: var(--muted); font-size: 14px; border-left: 1px solid var(--line); display: flex; align-items: center; font-family: 'SF Mono', monospace; }
.setup-hint { color: var(--dim); font-size: 12px; margin-top: 6px; }
.setup-err { color: #ff8a8a; font-size: 13px; margin-top: 8px; }

/* Progress screen */
.provisioning { display: none; }
.provisioning.active { display: block; }
.setup-form.hidden { display: none; }
.prov-title { font-family: var(--serif); font-style: italic; font-size: 30px; text-align: center; margin: 24px 0 8px; }
.prov-sub { text-align: center; color: var(--muted); margin-bottom: 32px; font-size: 15px; }
.prov-steps { list-style: none; }
.prov-steps li { padding: 14px 0 14px 40px; position: relative; color: var(--muted); font-size: 15px; border-bottom: 1px solid var(--line); }
.prov-steps li:last-child { border-bottom: 0; }
.prov-steps li::before { content: ''; position: absolute; left: 0; top: 16px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line); }
.prov-steps li.doing::before { border-color: var(--ink); }
.prov-steps li.done::before { content: '✓'; color: var(--bg); background: var(--ink); border-color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.prov-steps li.doing { color: var(--ink); }
.prov-steps li.doing::after { content: ''; position: absolute; left: 6px; top: 22px; width: 10px; height: 10px; border: 2px solid var(--ink); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.prov-done { text-align: center; margin-top: 32px; padding: 24px; background: rgba(255,255,255,.03); border-radius: 12px; border: 1px solid var(--line); display: none; }
.prov-done.active { display: block; }
.prov-done h3 { font-family: var(--serif); font-style: italic; font-size: 26px; margin-bottom: 10px; }
.prov-done .url { color: var(--ink); font-weight: 600; margin: 12px 0 20px; font-family: 'SF Mono', monospace; }
