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

html, body {
  min-height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  color: #0f2027;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

:root { --header-h: 68px; }

/* ── static blob background (Hopia-style) ── */
.bg-scene {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
  background: #fff;
}
.bg-scene::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(15,23,42,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 60% at 60% 30%, #000 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 60% 30%, #000 40%, transparent 85%);
}
.bg-scene .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
}
.bg-scene .blob.b1 {
  width: 480px; height: 480px;
  background: #B8D9FE;
  top: -140px; right: -120px;
}
.bg-scene .blob.b2 {
  width: 420px; height: 420px;
  background: #C5D4FC;
  top: 180px; left: -160px;
  opacity: .45;
}

/* ── header ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 250;
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, backdrop-filter .2s ease;
}
.site-header.scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(67,41,254,.12);
  box-shadow: 0 1px 20px rgba(67,41,254,.06);
}
.site-header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 3.5rem;
  display: flex; justify-content: space-between; align-items: center;
  gap: 2rem; min-height: 64px;
}
.logo, .footer-logo { height: 34px; width: auto; display: block; }
.footer-brand .footer-logo { height: 30px; margin-bottom: .6rem; }
.nav-logo { display: inline-flex; align-items: center; height: 100%; cursor: pointer; flex-shrink: 0; text-decoration: none; }

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3.5rem;
}

.site-main .page {
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 3.5rem;
  padding-bottom: 3rem;
  min-height: calc(100vh - var(--header-h));
}

/* ── navbar ── */
.nav-links {
  display: flex; align-items: center; gap: .4rem;
  margin: 0 auto;
}
.nav-link {
  display: inline-block;
  font-size: .85rem; font-weight: 500; color: #6b6882;
  text-decoration: none; padding: .5rem .9rem; border-radius: 100px;
  transition: color .2s, background .2s;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
}
.nav-link:hover { color: #4329fe; background: rgba(67,41,254,.05); }
.nav-link.active { color: #4329fe; background: rgba(67,41,254,.08); font-weight: 600; }
.nav-link:focus-visible,
.nav-login:focus-visible,
.nav-cta:focus-visible,
.nav-logo:focus-visible,
.form-submit:focus-visible,
.person-link:focus-visible,
.success-reset:focus-visible {
  outline: 2px solid #4329fe;
  outline-offset: 2px;
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.nav-toggle svg { width: 26px; height: 26px; stroke: #0c1e1a; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.nav-actions {
  display: flex; align-items: center; gap: .35rem; flex-shrink: 0;
}
.nav-login {
  display: inline-flex; align-items: center;
  font-size: .85rem; font-weight: 500; color: #6b6882;
  text-decoration: none; padding: .5rem .9rem; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav-login:hover { color: #4329fe; background: rgba(67,41,254,.05); }
.nav-login.active { color: #4329fe; background: rgba(67,41,254,.08); font-weight: 600; }

.nav-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.3rem; background: #4329fe; color: #fff;
  font-weight: 600; font-size: .82rem; border-radius: 100px;
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(67,41,254,.28);
  font-family: 'DM Sans', sans-serif; white-space: nowrap;
  transition: background .2s, box-shadow .2s, transform .2s;
}
.nav-cta:hover { background: #3620d4; box-shadow: 0 6px 22px rgba(67,41,254,.38); transform: translateY(-1px); }
.nav-cta:focus-visible { outline: 2px solid #4329fe; outline-offset: 2px; }

.nav-menu-actions { display: none; }

@media (max-width: 1024px) {
  .page { padding-left: 2rem; padding-right: 2rem; }
}
@media (max-width: 768px) {
  .page { padding-left: 1.25rem; padding-right: 1.25rem; }
  .site-main .page { padding-top: 2.5rem; padding-bottom: 2rem; }
}
@media (max-width: 480px) {
  .page { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 900px) {
  .nav-links { display: none; position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; background: #fff;
    border-bottom: 1px solid rgba(67,41,254,.12); padding: .5rem 1.25rem 1rem; z-index: 150;
    box-shadow: 0 12px 24px rgba(67,41,254,.08); margin: 0; }
  .nav-links.open { display: flex; }
  .nav-link { padding: .8rem .6rem; border-radius: 8px; }
  .nav-toggle { display: block; }
  .nav-actions { display: none !important; }
  .nav-menu-actions {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin-top: .75rem;
    padding-top: .85rem;
    border-top: 1px solid rgba(67,41,254,.1);
  }
  .nav-menu-actions .nav-login {
    justify-content: center;
    padding: .75rem .9rem;
    border-radius: 10px;
    font-size: .9rem;
  }
  .nav-menu-actions .nav-cta {
    justify-content: center;
    width: 100%;
    padding: .85rem 1.1rem;
    border-radius: 12px;
    font-size: .9rem;
  }
}
@media (max-width: 560px) {
  .nav-cta { padding: .5rem 1rem; font-size: .78rem; }
  .nav-login { padding: .5rem .65rem; font-size: .78rem; }
  .nav-menu-actions .nav-cta { padding: .85rem 1.1rem; font-size: .9rem; }
  .nav-menu-actions .nav-login { padding: .75rem .9rem; font-size: .9rem; }
}

/* ── main legal content ── */
.site-main {
  flex: 1;
  padding-top: var(--header-h);
  position: relative; z-index: 1;
}
.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 4.5rem 3.5rem 4rem;
}
.legal-card {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(67,41,254,.14);
  border-radius: 22px;
  padding: 2.5rem 2.4rem;
  box-shadow: 0 4px 30px rgba(67,41,254,.05);
}
.legal-card h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800; color: #0c1e1a;
  letter-spacing: -.02em; margin-bottom: .4rem;
}
.legal-updated {
  font-size: .82rem; color: #9b91b5; margin-bottom: 2rem;
}
.legal-card h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem; font-weight: 700; color: #4329fe;
  margin: 1.8rem 0 .6rem;
}
.legal-card h2:first-of-type { margin-top: 0; }
.legal-card p {
  font-size: .92rem; color: #4a4560; line-height: 1.75;
  margin-bottom: .75rem; font-weight: 300;
}
.legal-card ul {
  margin: .4rem 0 .9rem 1.2rem;
  font-size: .92rem; color: #4a4560; line-height: 1.75; font-weight: 300;
}
.legal-card li { margin-bottom: .35rem; }
.legal-card a {
  color: #4329fe; text-decoration: none; font-weight: 500;
}
.legal-card a:hover { text-decoration: underline; }

/* ── login ── */
.auth-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 4.5rem 3.5rem 4rem;
}
.auth-card {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(67,41,254,.14);
  border-radius: 22px;
  padding: 2.5rem 2.2rem;
  box-shadow: 0 4px 30px rgba(67,41,254,.05);
}
.auth-card h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800; color: #0c1e1a;
  letter-spacing: -.02em; margin-bottom: .35rem;
}
.auth-lead {
  font-size: .88rem; color: #9b91b5; margin-bottom: 1.8rem; font-weight: 300;
}
.auth-field { margin-bottom: 1.1rem; }
.auth-field label {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .82rem; font-weight: 700; color: #0c1e1a;
  margin-bottom: .45rem;
}
.auth-field input {
  width: 100%; padding: .8rem .95rem;
  font-size: .9rem; font-family: 'DM Sans', sans-serif;
  border: 1px solid rgba(67,41,254,.18); border-radius: 10px;
  background: #F6F8FB; color: #0c1e1a;
  transition: border-color .2s, box-shadow .2s;
}
.auth-field input:focus {
  outline: none; border-color: #4329fe;
  box-shadow: 0 0 0 3px rgba(67,41,254,.12); background: #fff;
}
.auth-submit {
  display: flex; align-items: center; justify-content: center; width: 100%;
  padding: .9rem 1.5rem; margin-top: .4rem;
  background: #4329fe; color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: .92rem;
  border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(67,41,254,.28);
  transition: background .2s, transform .2s;
}
.auth-submit:hover { background: #3620d4; transform: translateY(-1px); }
.auth-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.auth-error {
  margin-bottom: 1rem; padding: .85rem 1rem; border-radius: 10px;
  background: rgba(224,64,91,.08); border: 1px solid rgba(224,64,91,.25);
  color: #c03050; font-size: .85rem; line-height: 1.5;
}

/* ── footer ── */
.site-footer {
  position: relative; z-index: 1; margin-top: auto;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(67,41,254,.1);
}
.site-footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 2.5rem 3.5rem 1rem;
  display: grid; grid-template-columns: 1.3fr 1fr 1.4fr; gap: 2.5rem;
}
.footer-col h4 {
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: #4329fe; margin-bottom: .55rem;
}
.footer-brand .footer-logo { display: inline-block; height: 30px; width: auto; margin-bottom: .6rem; }
.footer-brand p { font-size: .75rem; color: #9b91b5; line-height: 1.45; max-width: 260px; }
.footer-nav { display: flex; flex-direction: column; gap: .5rem; }
.footer-nav a {
  display: flex; align-items: center; min-height: 20px;
  font-size: .8rem; color: #6b6882; line-height: 1.45;
  text-decoration: none; transition: color .2s;
}
.footer-nav a:hover { color: #4329fe; }
.footer-contact { display: flex; flex-direction: column; gap: .65rem; }
.footer-contact-item {
  display: flex; align-items: flex-start; gap: .65rem;
  font-size: .8rem; color: #6b6882; line-height: 1.45;
}
.footer-contact-item svg {
  width: 16px; height: 16px; stroke: #4329fe; fill: none;
  flex-shrink: 0; margin-top: 2px;
}
.footer-contact-item a { color: #6b6882; text-decoration: none; transition: color .2s; }
.footer-contact-item a:hover { color: #4329fe; }
.site-footer-bottom {
  max-width: 1200px; margin: 0 auto; padding: .75rem 3.5rem;
  border-top: 1px solid rgba(67,41,254,.08);
  font-size: .68rem; color: #b5aad0; text-align: center;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem .6rem;
}
.site-footer-bottom a { color: #9b91b5; text-decoration: none; transition: color .2s; }
.site-footer-bottom a:hover { color: #4329fe; }
.footer-bottom-sep { color: #d8d4e8; user-select: none; }

@media (max-width: 1024px) {
  .legal-wrap, .site-header-inner, .site-footer-inner, .site-footer-bottom, .page, .auth-wrap { padding-left: 2rem; padding-right: 2rem; }
  .site-footer-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
@media (max-width: 768px) {
  .legal-wrap, .site-header-inner, .site-footer-inner, .site-footer-bottom, .page, .auth-wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
  .legal-wrap { padding-top: 3rem; padding-bottom: 2.5rem; }
  .auth-wrap { padding-top: 3rem; padding-bottom: 2.5rem; }
  .legal-card { padding: 1.8rem 1.4rem; }
  .auth-card { padding: 1.8rem 1.4rem; }
  .site-footer-inner { grid-template-columns: 1fr; gap: .9rem; }
  .logo { height: 28px; }
}
