:root {
  --primary: #4118b8;
  --tertiary: #2b0b98;
  --accent: #7b5cf0;
  --surface: #f6f1ff;
  --text: #2c1e4a;
  --muted: #6b4fb3;
  --outline: #dcd2ff;
  --danger: #b71c1c;
  --ok: #2e7d32;
  --white: #ffffff;
  --footer: #9e82d4;
  --font-display: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --font-body: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(123, 92, 240, 0.28), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(43, 11, 152, 0.22), transparent 50%),
    linear-gradient(180deg, var(--surface) 0%, #efe8ff 45%, #f8f5ff 100%);
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-underline-offset: 0.15em; }
a:hover { color: var(--tertiary); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--tertiary);
  text-decoration: none;
}

.brand-logo {
  width: 1.55rem;
  height: 1.55rem;
  flex-shrink: 0;
  display: block;
  /* Leaves sit above the berry; nudge down so the fruit aligns with the word */
  transform: translateY(0.08em);
}

.lang-switch {
  display: flex;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
}

.lang-switch a[aria-current="true"] {
  background: rgba(65, 24, 184, 0.1);
  color: var(--primary);
  font-weight: 600;
}

.lang-switch a:hover { background: rgba(65, 24, 184, 0.08); }

main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.hero {
  padding: 3.5rem 0 2.5rem;
  max-width: 36rem;
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  margin: 0 0 0.85rem;
}

.hero-logo {
  width: clamp(3.75rem, 12vw, 5rem);
  height: clamp(3.75rem, 12vw, 5rem);
  display: block;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--tertiary);
}

.hero .tagline {
  margin: 0 0 1.75rem;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 28rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--tertiary);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--outline);
}

.btn-ghost:hover {
  background: rgba(65, 24, 184, 0.06);
  color: var(--tertiary);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover { filter: brightness(0.92); color: var(--white); }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.doc {
  padding: 1.5rem 0 2rem;
  max-width: 42rem;
}

.doc h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--tertiary);
}

.doc .meta {
  color: var(--footer);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.doc h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  color: var(--text);
}

.doc h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
}

.doc p, .doc li { line-height: 1.6; color: var(--muted); }
.doc ul { padding-left: 1.2rem; }
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
.doc th, .doc td {
  border: 1px solid var(--outline);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
.doc th { background: rgba(65, 24, 184, 0.06); color: var(--text); }

.panel {
  max-width: 28rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--outline);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(65, 24, 184, 0.08);
}

.panel h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--tertiary);
}

.panel p { color: var(--muted); line-height: 1.55; }

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 1rem 0 0.4rem;
}

input[type="email"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--outline);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
}

input[type="email"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.msg {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.95rem;
  display: none;
}

.msg.show { display: block; }
.msg.ok { background: #f1faf3; color: var(--ok); }
.msg.err { background: #fff4f4; color: var(--danger); }

.site-footer {
  padding: 1.5rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  border-top: 1px solid rgba(220, 210, 255, 0.8);
  color: var(--footer);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-end;
  justify-content: space-between;
}

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

.site-footer a {
  color: var(--footer);
  text-decoration: none;
}

.site-footer a:hover { color: var(--muted); text-decoration: underline; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.footer-muted {
  opacity: 0.85;
}

.powered-by {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  opacity: 0.72;
  user-select: none;
}

.powered-by-label {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--footer);
  line-height: 1;
}

.powered-by-logo {
  height: 1.15rem;
  width: auto;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

@media (max-width: 560px) {
  .hero { padding-top: 2rem; }
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .powered-by { align-items: flex-start; }
}
