/* edgarsoauth — EDGAR'S dark theme with cyan accent */
:root {
  --bg-deep: #0a0e14;
  --bg-surface: #121820;
  --bg-elevated: #1a2230;
  --border: rgba(64, 196, 255, 0.14);
  --text: #e8edf4;
  --text-muted: #8b9cb3;
  --accent: #40c4ff;
  --accent-bright: #4dd0e1;
  --accent-dim: rgba(64, 196, 255, 0.1);
  --accent-glow: rgba(64, 196, 255, 0.32);
  --brand-teal: #2a9d8f;
  --brand-coral: #e76f51;
  --brand-navy: #1d3557;
  --radius: 12px;
  --radius-lg: 20px;
  --font: "DM Sans", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-display: "Instrument Sans", "DM Sans", "Noto Sans TC", sans-serif;
  --max-width: 980px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(64, 196, 255, 0.09), transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 80%, rgba(42, 157, 143, 0.06), transparent),
    radial-gradient(ellipse 40% 30% at 0% 90%, rgba(231, 111, 81, 0.04), transparent),
    var(--bg-deep);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(64, 196, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 196, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #7dd8ff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px) saturate(1.2);
  background: rgba(10, 14, 20, 0.88);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
  opacity: 0.95;
}

.brand-mark-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0.2rem;
  border-radius: 10px;
  background: rgba(64, 196, 255, 0.06);
  border: 1px solid var(--border);
  overflow: hidden;
}

.brand-mark {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.site-nav a {
  padding: 0.42rem 0.8rem;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Main layout ── */
main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.hero-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: min(560px, 92vw);
  margin: 0 auto 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(64, 196, 255, 0.06);
  border: 1px solid var(--border);
  box-shadow: 0 0 32px rgba(64, 196, 255, 0.08);
}

.hero-logo {
  display: block;
  width: min(520px, 86vw);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center center;
  border-radius: 0;
  filter: drop-shadow(0 0 28px var(--accent-glow));
}

.hero h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .subtitle {
  margin: 0 auto 1.75rem;
  max-width: 38em;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.auth-banner {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}

/* ── Hero CTAs ── */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

a.btn {
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: rgba(64, 196, 255, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.72rem 1.35rem;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #1a1f28;
  background: linear-gradient(180deg, #f8fbff 0%, #e8edf4 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(64, 196, 255, 0.15),
    0 8px 24px rgba(64, 196, 255, 0.18);
}

.btn-primary:hover {
  color: #0a0e14;
  background: #fff;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(64, 196, 255, 0.28),
    0 12px 32px rgba(64, 196, 255, 0.24);
}

.btn-secondary {
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  color: #7dd8ff;
  background: var(--accent-dim);
  border-color: rgba(64, 196, 255, 0.35);
}

.btn-icon {
  flex-shrink: 0;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border);
}

/* ── Brand showcase (colorful gear) ── */
.brand-showcase {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin: 2.5rem 0;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 80% 70% at 20% 50%, rgba(42, 157, 143, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 85% 60%, rgba(231, 111, 81, 0.07), transparent),
    var(--bg-surface);
  border: 1px solid rgba(42, 157, 143, 0.2);
}

@media (min-width: 720px) {
  .brand-showcase {
    grid-template-columns: minmax(180px, 260px) 1fr;
    gap: 2.5rem;
    padding: 2.25rem 2.5rem;
  }
}

.brand-showcase-visual {
  display: flex;
  justify-content: center;
}

.brand-emblem {
  width: min(240px, 80vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center center;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(42, 157, 143, 0.15);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.brand-showcase:hover .brand-emblem {
  transform: scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 20px 56px rgba(0, 0, 0, 0.5),
    0 0 72px rgba(231, 111, 81, 0.12);
}

.brand-showcase-copy h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text);
}

.brand-showcase-copy .brand-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-coral);
}

.brand-showcase-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.brand-showcase-copy p + p {
  margin-top: 0.75rem;
}

/* ── Highlight / purpose box ── */
.highlight-box {
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--accent-dim), transparent 65%);
  border: 1px solid var(--border);
  margin: 2rem 0;
}

.highlight-box h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent-bright);
}

.highlight-box p,
.highlight-box li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.highlight-box ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.highlight-box li + li {
  margin-top: 0.4rem;
}

/* ── Cards ── */
.card-grid {
  display: grid;
  gap: 1.15rem;
  margin: 2rem 0;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.card:hover {
  border-color: rgba(64, 196, 255, 0.28);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

.card h2,
.card h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--accent);
}

.card p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-muted);
}

.card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card li + li {
  margin-top: 0.3rem;
}

/* ── Section blocks ── */
.section {
  margin: 2.5rem 0;
}

.section h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text);
}

.section p,
.section li {
  color: var(--text-muted);
}

.section ul {
  padding-left: 1.2rem;
}

.section li + li {
  margin-top: 0.35rem;
}

.section-lead {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Access boundary ── */
.access-boundary {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.access-grid {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 640px) {
  .access-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.access-panel {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.access-panel h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.access-public h3 {
  color: var(--brand-teal);
}

.access-protected h3 {
  color: var(--brand-coral);
}

.access-icon {
  font-size: 0.75rem;
  opacity: 0.85;
}

.access-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.access-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(64, 196, 255, 0.08);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.access-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.access-path {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.72;
  font-family: "DM Sans", ui-monospace, monospace;
}

.access-label {
  color: var(--text);
}

/* ── OAuth flow ── */
.oauth-flow {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--accent-dim), transparent 70%);
  border: 1px solid var(--border);
}

.flow-steps {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.flow-steps li + li {
  margin-top: 0.85rem;
}

.flow-steps strong {
  color: var(--text);
  font-weight: 600;
}

.flow-portal-link {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(64, 196, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.flow-portal-link a {
  font-weight: 600;
}

.flow-note {
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.86rem;
  color: var(--text-muted);
  background: rgba(10, 14, 20, 0.45);
  border: 1px solid rgba(64, 196, 255, 0.1);
}

/* ── Legal pages ── */
.legal-page h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.legal-meta {
  margin: 0 0 2rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.legal-page h2 {
  margin: 2rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--text);
}

.legal-page p,
.legal-page li {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.legal-page ul {
  padding-left: 1.2rem;
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ── Responsive ── */
@media (max-width: 560px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .site-nav {
    width: 100%;
  }

  .brand-tag {
    display: none;
  }

  .brand-showcase {
    padding: 1.5rem;
    text-align: center;
  }

  .brand-showcase-copy .brand-label {
    display: block;
  }

  .brand-mark-wrap {
    width: 40px;
    height: 40px;
  }

  .hero-logo-frame {
    padding: 1rem 1.1rem;
    max-width: min(480px, 94vw);
  }

  .hero-logo {
    width: min(420px, 88vw);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    max-width: 320px;
  }
}
