/* Tovena public homepage — calm Nordic palette aligned with the app */

:root {
  --bg: #f6f2ea;
  --bg-deep: #efe8dc;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #6b7280;
  --primary: #6f9788;
  --primary-dark: #5d8577;
  --border: #e7e0d5;
  --shadow: 0 10px 30px rgba(47, 52, 49, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --shell: 1080px;
  --header-h: 4.25rem;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 12% -10%, rgba(111, 151, 136, 0.16), transparent 60%),
    radial-gradient(900px 420px at 90% 8%, rgba(217, 140, 95, 0.1), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary-dark);
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 3px solid rgba(111, 151, 136, 0.55);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 1000;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.shell {
  width: min(100% - 2rem, var(--shell));
  margin-inline: auto;
}

.shell.narrow {
  width: min(100% - 2rem, 42rem);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(246, 242, 234, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 24px rgba(47, 52, 49, 0.04);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.7rem;
  background: linear-gradient(160deg, #7eaa9a 0%, var(--primary-dark) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-mark-sm {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.55rem;
  font-size: 0.85rem;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.35rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0.15rem;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.05rem;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Hero */

.hero {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-inner {
  max-width: 40rem;
  animation: rise 0.7s var(--ease) both;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.lede {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  max-width: 36rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(93, 133, 119, 0.22);
}

.button-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--border);
  color: var(--text);
}

.button-secondary:hover {
  background: var(--surface);
  border-color: #d8d0c3;
  color: var(--text);
}

/* Sections */

.section {
  padding: clamp(3rem, 6vw, 4.75rem) 0;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.section p:last-child {
  margin-bottom: 0;
}

.about p + p {
  margin-top: 0.9rem;
}

.section-intro {
  max-width: 36rem;
  margin-bottom: 1.75rem;
}

.section-intro p {
  margin: 0;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(47, 52, 49, 0.08);
}

.feature-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  letter-spacing: -0.015em;
}

.feature-card p {
  margin: 0;
  font-size: 0.98rem;
}

.panel {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  box-shadow: var(--shadow);
}

.panel .hero-actions {
  margin-top: 1.35rem;
}

.email-link {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--primary-dark);
  border-bottom: 1px solid rgba(93, 133, 119, 0.35);
  padding-bottom: 0.1rem;
}

.email-link:hover {
  color: var(--text);
  border-bottom-color: rgba(31, 41, 51, 0.35);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.45);
  padding: 2rem 0 2.4rem;
  margin-top: 1rem;
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.footer-copy {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Reveal on scroll */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

/* Responsive */

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.65rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 0.85rem;
    border-radius: 0.7rem;
  }

  .site-nav a:hover {
    background: var(--bg);
  }

  .header-inner {
    position: relative;
  }

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

  .hero-actions .button {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .feature-card:nth-child(3),
  .feature-card:nth-child(4) {
    grid-column: span 1;
  }
}
