/* =============================================
   My Fellow AI — Wellnesstöd i verkligheten
   Public Website
   ============================================= */

/* --- Self-hosted Inter (replaces Google Fonts @import) --- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/inter-700.woff2') format('woff2'); }

/* --- Design Tokens (app-aligned: sage + clay + linen) --- */
:root {
  --primary: #5A6F66;
  --primary-dark: #3E4F48;
  --primary-light: #CAD3CA;
  --accent: #C08165;
  --accent-dark: #A56B52;
  --bg: #F4EFE6;
  --surface: #FBF8F2;
  --text: #2E332E;
  --text-secondary: #5E645E;
  --border: #E0D8C6;
  --shadow: 0 2px 12px rgba(46, 51, 46, 0.06);
  --shadow-hover: 0 4px 20px rgba(46, 51, 46, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
  --transition: 0.25s ease;
  --max-width: 1200px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 242, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

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

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--primary-dark);
}

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition: background var(--transition);
}

.nav-cta:hover {
  background: var(--accent-dark);
  color: #fff !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.75rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

.btn-ghost {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--primary);
}

.btn-ghost:hover {
  background: var(--primary);
  color: #fff;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 6rem 0 5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: #fff;
}

.hero-subtitle {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.85;
  margin-top: 0.5rem;
}

.hero-tagline {
  font-size: 1.2rem;
  opacity: 0.92;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-cta-note {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 1.25rem auto 0;
  max-width: 480px;
  line-height: 1.5;
}

.hero .btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.hero .btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

/* --- Sections --- */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--surface);
}

.section h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-intro {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

.section-alt .card {
  background: var(--bg);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-icon {
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Steps --- */
.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.step {
  text-align: center;
  max-width: 320px;
}

.step-circle {
  margin: 0 auto 1rem;
  width: 64px;
  height: 64px;
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.step-connector {
  width: 2px;
  height: 40px;
  background: var(--primary-light);
  margin: 0.5rem auto;
}

/* --- FAQ --- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  background: var(--surface);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow);
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text);
  transition: color var(--transition);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item[open] summary {
  color: var(--primary-dark);
}

.faq-item p {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Contact --- */
.contact-section {
  text-align: center;
}

.contact-details {
  margin-bottom: 2rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
}

.contact-item a {
  font-weight: 500;
  color: var(--primary-dark);
}

.contact-item a:hover {
  color: var(--primary);
}

/* --- Footer --- */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.footer-links {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0.25rem;
}

.footer-links a:hover {
  color: #fff;
}

/* --- Legal pages (privacy / terms) --- */
.legal-content {
  max-width: 760px;
}

.legal-content h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.legal-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.7;
}

.legal-content a {
  color: var(--accent);
  font-weight: 500;
}

.legal-content a:hover {
  color: var(--accent-dark);
}

.legal-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  text-align: left;
}

.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  text-align: left;
}

.legal-content ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.legal-content li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

.legal-content strong {
  color: var(--text);
  font-weight: 600;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive: Tablet (768px+) --- */
@media (min-width: 768px) {
  .hero {
    padding: 8rem 0 6rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
  }

  .step-connector {
    width: 60px;
    height: 2px;
    margin: 32px 0.5rem 0;
    flex-shrink: 0;
  }
}

/* --- Responsive: Desktop (1024px+) --- */
@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.4rem;
  }

  .hero-tagline {
    font-size: 1.3rem;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: 6rem 0;
  }

  .step-connector {
    width: 80px;
  }
}

/* --- Mobile Nav --- */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-cta {
    text-align: center;
    width: 100%;
    display: block;
  }
}
