/* ================================================================
   astrein.kiefergruen.com — main stylesheet
   ================================================================ */

:root {
  --bg:           #0b1710;
  --surface:      #101e14;
  --card:         #152019;
  --card-hover:   #1a2b1f;
  --border:       #1d3122;
  --border-light: #253f2c;
  --accent:       #5ae07c;
  --accent-dim:   #3bba59;
  --accent-glow:  rgba(90, 224, 124, 0.13);
  --text:         #edfff3;
  --text-2:       #96c4a2;
  --text-3:       #4e6755;
  --warn:         #f59e0b;
  --danger:       #ef4444;
  --mono:         'Courier New', Courier, monospace;
  --sans:         'Inter', system-ui, -apple-system, sans-serif;
  --r-sm:         0.375rem;
  --r:            0.75rem;
  --r-lg:         1.125rem;
  --shadow:       0 8px 32px rgba(0, 0, 0, 0.55);
  --ease:         0.17s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

/* ── Layout ───────────────────────────────────────── */
.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease);
}
a:hover { color: var(--text); }

/* ── Navigation ──────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 23, 16, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-brand:hover { color: var(--text); }

.nav-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  padding: 5.5rem 0 4.5rem;
  text-align: center;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-glow);
  border: 1px solid rgba(90, 224, 124, 0.28);
  color: var(--accent);
  border-radius: 2rem;
  padding: 0.3rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto 2.75rem;
  line-height: 1.75;
}

.hero-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.35rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--ease);
  line-height: 1;
  font-family: var(--sans);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0b1710;
}
.btn-primary:hover {
  background: #7df09f;
  color: #0b1710;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-light);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ── Section ──────────────────────────────────────── */
.section {
  padding: 3.75rem 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.section-desc {
  color: var(--text-2);
  line-height: 1.78;
  max-width: 640px;
}

/* ── How-it-works steps ───────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 1rem;
  margin-top: 2.25rem;
}

.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.4rem;
  transition: border-color var(--ease), background var(--ease);
}

.step-card:hover {
  border-color: var(--border-light);
  background: var(--card-hover);
}

.step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(90, 224, 124, 0.3);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.step-card p {
  font-size: 0.825rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── Password table section ───────────────────────── */
.table-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.refresh-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.3rem 0.9rem;
  font-size: 0.77rem;
  color: var(--text-2);
  white-space: nowrap;
}

.pulse-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2.2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%       { opacity: 0.3; transform: scale(0.8); }
}

.pw-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.pw-wrap-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.pw {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

table.pw thead th {
  background: var(--surface);
  text-align: left;
  padding: 0.8rem 1.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.pw tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--ease);
}

table.pw tbody tr:last-child {
  border-bottom: none;
}

table.pw tbody tr:hover {
  background: var(--card-hover);
}

table.pw tbody tr.row-copied {
  background: rgba(90, 224, 124, 0.07);
}

table.pw td {
  padding: 0.6rem 1.2rem;
  vertical-align: middle;
}

td.col-num {
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 700;
  width: 3.75rem;
  white-space: nowrap;
  font-family: var(--mono);
}

td.col-pass {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text);
  word-break: break-all;
}

td.col-copy {
  text-align: right;
  width: 5.5rem;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-2);
  border-radius: var(--r-sm);
  padding: 0.28rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
  transition: all var(--ease);
  white-space: nowrap;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.copy-btn.is-copied {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ── Enhanced / PIN section ───────────────────────── */
.enh-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 6.5rem;
  gap: 2rem;
  align-items: center;
  margin-top: 2.25rem;
}

.enh-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.enh-card > div > p {
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1.75;
  margin-bottom: 1.35rem;
}

.pin-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

input.pin-input {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  padding: 0.6rem 0.9rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.2rem;
  letter-spacing: 0.22em;
  width: 7.5rem;
  text-align: center;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

input.pin-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(90, 224, 124, 0.12);
}

input.pin-input::placeholder {
  color: var(--text-3);
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.enh-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.shield-wrap {
  width: 4.5rem;
  height: 4.5rem;
  background: var(--accent-glow);
  border: 2px solid rgba(90, 224, 124, 0.22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
}

.enh-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
  line-height: 1.5;
}

/* ── Enhanced page banner ─────────────────────────── */
.enh-banner {
  background: var(--accent-glow);
  border: 1px solid rgba(90, 224, 124, 0.2);
  border-radius: var(--r);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-2);
  margin-bottom: 2rem;
}

.enh-banner i {
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.enh-banner strong {
  color: var(--text);
}

/* ── Toast ────────────────────────────────────────── */
#toast-root {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--card);
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: toastIn 0.18s ease both;
  white-space: nowrap;
}

.toast i {
  color: var(--accent);
  font-size: 0.88rem;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(0.5rem) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)     scale(1);    }
}

.toast.fade-out {
  animation: toastOut 0.22s ease forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(0.4rem); }
}

/* ── Footer ───────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 1rem;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-copy,
.footer-contact {
  font-size: 0.78rem;
  color: var(--text-3);
}

.footer-contact a {
  color: var(--text-2);
}
.footer-contact a:hover { color: var(--text); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { gap: 1rem; }
  .hero { padding: 3.5rem 0 3rem; }
  .enh-card {
    grid-template-columns: 1fr;
  }
  .enh-visual { display: none; }
}

@media (max-width: 400px) {
  .nav-links li:not(:last-child) { display: none; }
}

/* ── Share channel card ───────────────────────────── */
.share-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.6rem 2rem;
  margin-bottom: 1.75rem;
}

.share-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.share-inner h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.share-inner > div > p {
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1.72;
  margin-bottom: 1.1rem;
}

.share-url-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.share-url-input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.73rem;
  outline: none;
  cursor: text;
  transition: border-color var(--ease);
}

.share-url-input:focus {
  border-color: var(--accent);
}

.share-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.share-qr img {
  display: block;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-light);
}

.share-qr-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
}

@media (max-width: 640px) {
  .share-inner {
    grid-template-columns: 1fr;
  }
  .share-qr {
    flex-direction: row;
    gap: 1.25rem;
  }
}

/* ── TOTP-style time bar ──────────────────────────── */
.time-bar-track {
  position: sticky;
  top: 3.5rem;      /* sits flush under the sticky nav */
  z-index: 49;
  height: 2px;
  background: var(--border);
  overflow: hidden;
}

.time-bar-fill {
  height: 100%;
  width: 100%;                       /* set by JS */
  background: var(--accent);         /* overridden by JS to warn/danger */
  transition: width 1s linear, background-color 1.5s ease;
}

/* ── Password breakdown tooltip ───────────────────── */
.pw-tip {
  position: fixed;
  z-index: 300;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--r);
  padding: 0.8rem 0.95rem;
  box-shadow: var(--shadow);
  pointer-events: none;
  min-width: 185px;
  animation: toastIn 0.13s ease both;
}

.pw-tip-head {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

.pw-tip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.18rem 0;
  font-size: 0.8rem;
  color: var(--text-2);
}

.pw-tip-row strong {
  color: var(--text);
  font-weight: 700;
  font-family: var(--mono);
  font-size: 0.82rem;
  min-width: 1.5rem;
  text-align: right;
}

.pw-tip-segs {
  display: flex;
  gap: 3px;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.pw-tip-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border-light);
}

.pw-tip-seg.on {
  background: var(--accent);
}

/* cursor hint on password cells */
td.col-pass { cursor: help; }

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }
