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

:root {
  --bg:      #101213;
  --bg-elev: #1A1D1F;
  --bg-section: #15181A;
  --text:    #ECEDEE;
  --muted:   #9BA1A6;
  --faint:   #6E747A;
  --accent:  #1D9E75;
  --accent-soft: rgba(29, 158, 117, 0.14);
  --accent-hover: #178a65;
  --negative: #D85A30;
  --reminder: #378ADD;
  --warm: #E6A23C;
  --border:  rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --radius:  12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem clamp(1.5rem, 8vw, 5.5rem);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand .logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
  line-height: 1;
}

.brand .tagline {
  font-size: 0.8125rem;
  color: var(--faint);
  font-style: italic;
}

.nav {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 500;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.875rem;
}

.nav-cta:hover {
  opacity: 0.9;
  color: #fff !important;
}

.page-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── Hero / opis ───────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 72.5rem;
  margin: 0 auto;
  padding: 2.5rem clamp(1.5rem, 8vw, 5.5rem) 5.5rem;
  width: 100%;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.125rem, 5vw, 3.375rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 28rem;
  margin-bottom: 1.875rem;
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.8125rem 1.375rem;
  border-radius: var(--radius);
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.88;
  color: #fff;
}

.btn-outline {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-outline:hover {
  color: var(--text);
  opacity: 1;
  border-color: var(--muted);
}

.btn-dark {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-dark:hover {
  color: var(--text);
  border-color: var(--muted);
}

.btn-block {
  width: 100%;
  justify-content: center;
  border: none;
  cursor: pointer;
  margin-top: 0.25rem;
}

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

/* Decorative habit cards collage */
.hero-visual {
  position: relative;
  height: 22.5rem;
}

.demo-card {
  position: absolute;
  width: 14.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  border-left-width: 4px;
}

.demo-card .type {
  font-size: 0.65625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.demo-card .name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.demo-card .meta {
  font-size: 0.8125rem;
  color: var(--muted);
}

.demo-card.positive { border-left-color: var(--accent); top: 1.875rem; left: 0.625rem; transform: rotate(-6deg); }
.demo-card.positive .type { color: var(--accent); }

.demo-card.negative { border-left-color: var(--negative); top: 8.125rem; right: 0; transform: rotate(4deg); }
.demo-card.negative .type { color: var(--negative); }

.demo-card.reminder { border-left-color: var(--reminder); bottom: 0.625rem; left: 3.75rem; transform: rotate(-2deg); }
.demo-card.reminder .type { color: var(--reminder); }

.demo-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  margin-left: auto;
}

.demo-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
}

.demo-dots span.on { background: var(--accent); }
.demo-card.negative .demo-dots span.on { background: var(--negative); }

/* ── Download band ─────────────────────────────────────────── */

.download-band {
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 5rem clamp(1.5rem, 8vw, 5.5rem);
  text-align: center;
}

.download-band .soft-eyebrow {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 0.625rem;
}

.download-band h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.download-band p {
  font-size: 0.96875rem;
  color: var(--muted);
  max-width: 30rem;
  margin: 0 auto 2rem;
}

.download-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── About ─────────────────────────────────────────────────── */

.about {
  max-width: 56.25rem;
  margin: 0 auto;
  padding: 5.5rem clamp(1.5rem, 8vw, 5.5rem);
  text-align: center;
  width: 100%;
}

.about h2 {
  font-size: clamp(1.625rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.625rem;
}

.about-quote {
  font-size: 1.1875rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 auto 2.5rem;
  max-width: 38.75rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  text-align: left;
}

.feature-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.375rem;
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.feature-card p {
  font-size: 0.84375rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Site footer ───────────────────────────────────────────── */

.site-footer {
  background: #0A0B0C;
  color: var(--text);
  margin-top: auto;
}

.footer-grid {
  max-width: 72.5rem;
  margin: 0 auto;
  padding: 3.75rem clamp(1.5rem, 8vw, 5.5rem) 1.875rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-brand .logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.footer-brand .tagline {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--faint);
}

.footer-col-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.875rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  font-size: 0.875rem;
}

.footer-links a {
  color: var(--muted);
}

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

.footer-copy {
  max-width: 72.5rem;
  margin: 0 auto;
  padding: 1.25rem clamp(1.5rem, 8vw, 5.5rem);
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--faint);
}

/* ── Cookie banner ─────────────────────────────────────────── */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 1.25rem;
  animation: cookie-up 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-card {
  max-width: 47.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.125rem 1.375rem;
}

.cookie-card p {
  flex: 1;
  min-width: 13.75rem;
  font-size: 0.84375rem;
  line-height: 1.5;
  color: var(--muted);
}

.cookie-actions {
  display: flex;
  gap: 0.625rem;
  flex: 0 0 auto;
}

.btn-chip {
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-sm);
  background: var(--bg-section);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.84375rem;
  border: 1px solid var(--border);
}

.btn-chip:hover {
  color: var(--text);
}

.btn-accept {
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.84375rem;
}

.btn-accept:hover {
  opacity: 0.9;
}

@keyframes cookie-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.rise {
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .cookie-banner { animation: none; }
}

/* ── Legal page ────────────────────────────────────────────── */

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem clamp(1.5rem, 8vw, 5.5rem);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.legal-header .logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.legal-back {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--faint);
}

.legal-back:hover {
  color: var(--text);
}

.legal-body {
  max-width: 53.75rem;
  margin: 0 auto;
  padding: 0.625rem clamp(1.5rem, 8vw, 5.5rem) 6.25rem;
  width: 100%;
}

.legal-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.25rem;
  margin-bottom: 2.5rem;
  max-width: 28.75rem;
}

.legal-tabs button {
  flex: 1;
  text-align: center;
  padding: 0.5625rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--faint);
  cursor: pointer;
}

.legal-tabs button.active {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
}

.legal-panel[hidden] {
  display: none;
}

.legal-updated {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.legal-panel h1 {
  font-size: clamp(1.75rem, 4vw, 2.375rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}

.legal-intro {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1.625rem;
}

.legal-panel h2 {
  font-size: 1.25rem;
  font-weight: 600;
  font-style: italic;
  margin: 2.125rem 0 0.75rem;
}

.legal-panel p {
  font-size: 0.96875rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 0.625rem;
}

/* ── Auth / centered pages (reset, invite) ─────────────────── */

.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  text-align: center;
}

.auth-main > .eyebrow {
  margin-bottom: 1rem;
}

.auth-main > h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.auth-main > .tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 36ch;
  font-style: normal;
}

.simple-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.simple-header .logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.simple-footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 28rem;
  width: 100%;
  margin: 0 auto 2rem;
  text-align: left;
}

.card h2 {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card p {
  font-size: 0.9375rem;
  color: var(--text);
}

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.form-card {
  text-align: left;
}

.form-card .eyebrow {
  margin-bottom: 0.75rem;
}

.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.form-hint {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.field-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  padding: 0.875rem 1rem;
}

.field input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.form-error {
  font-size: 0.875rem;
  color: #E5484D;
}

.download-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.375rem;
  max-width: 28rem;
  width: 100%;
  margin: 2.5rem auto 0;
  text-align: left;
}

.download-card h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.download-card p {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 3rem;
  }

  .hero-visual {
    height: 18rem;
    max-width: 22rem;
    margin: 0 auto;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 520px) {
  .nav {
    gap: 1rem;
  }

  .nav a:not(.nav-cta) {
    display: none;
  }

  .demo-card {
    width: 12.5rem;
  }
}
