/*
 * Polish Insights – themeable styles with organic dark mode + native animations
 * Mobile-first. No libraries.
 */

/* ---------- Design tokens ---------- */
:root {
  --font-family: 'Inter', Arial, sans-serif;
  --max-width: 1100px;
  --header-height: 60px;

  /* Light (default) palette */
  --surface-0: #f9fafa;     /* page background */
  --surface-1: #ffffff;     /* cards / sections */
  --text-0:   #0d1e40;      /* main text */
  --text-muted:#6c7a96;     /* secondary */
  --border:   #e5eaf5;      /* strokes */
  --brand:    #007783;      /* teal accents */
  --cta:      #f5a623;      /* amber CTA */
  --cta-hover:#e98f1a;
  --header-bg: rgba(255,255,255,0.75);
  --footer-bg: #0d1e40;
  --shadow:   0 8px 30px rgba(13,30,64,0.07);

  --easing: cubic-bezier(.2,.8,.2,1);
  --radius: 6px;
}

/* Organic dark theme (moss + amber on charcoal) */
html[data-theme="dark"] {
  --surface-0: #0c1110;
  --surface-1: #121917;
  --text-0:   #e6f0ea;
  --text-muted:#a9b3ae;
  --border:   #1c2421;
  --brand:    #76c7a8;
  --cta:      #e2a93b;
  --cta-hover:#d7941c;
  --header-bg: rgba(12,17,16,0.7);
  --footer-bg: #0c1110;
  --shadow:   0 8px 30px rgba(0,0,0,0.35);
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-family);
  line-height: 1.6;
  background-color: var(--surface-0);
  color: var(--text-0);
  scroll-behavior: smooth;
  transition: background-color .35s var(--easing), color .35s var(--easing);
}

a { color: var(--brand); text-decoration: none; transition: color .25s var(--easing); }
a:hover { opacity: .9; }

.container { width: 90%; max-width: var(--max-width); margin: 0 auto; }

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; width: 100%; z-index: 1000;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(10px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-height);
}
.logo { display: flex; align-items: center; font-weight: 600; font-size: 1.1rem; }
.logo-mark { font-size: 1.4rem; margin-right: .35rem; }
.logo-text { color: var(--text-0); }

/* Header CTA */
nav { display: flex; gap: .6rem; align-items: center; }
nav .header-cta {
  padding: .5rem 1rem; border-radius: var(--radius);
  background-color: var(--cta); color: #fff; font-weight: 600; font-size: .9rem;
  transition: background-color .2s var(--easing), transform .2s var(--easing);
}
nav .header-cta:hover { background-color: var(--cta-hover); transform: translateY(-1px); }

/* Theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 36px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-1);
  cursor: pointer; transition: background-color .25s var(--easing), border-color .25s var(--easing), transform .2s var(--easing);
}
.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle .theme-icon { font-size: 1rem; line-height: 1; display: none; }
html[data-theme="light"] .theme-toggle [data-sun] { display: inline; }
html[data-theme="dark"]  .theme-toggle [data-moon]{ display: inline; }

.hero {
  position: relative;
  overflow: hidden; /* щоб фон не вилазив за межі */
}

/* Фон-картинка + затемнення для читабельності тексту */
.hero-bg{
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.25)), /* мʼякий градієнт зверху */
    url('assets/hero-bg.png'); /* <-- твій шлях до зображення */
  background-size: cover;        /* заповнити весь блок */
  background-position: center;   /* центр кадру */
  background-repeat: no-repeat;
  z-index: -1;                   /* позаду контенту */
}

@keyframes drift {
  from { transform: translate3d(0,0,0) rotate(0.001deg); }
  to   { transform: translate3d(20px,14px,0) rotate(0.001deg); }
}

.hero-content { padding: 3rem 0 2rem; text-align: center; }
.hero-title   { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.3; color: white;}
.hero-subtitle{ font-size: 1.1rem; font-weight: 400; margin-bottom: 2rem; color: #f2f4f8; }

/* ---------- Signup ---------- */
.signup-wrapper { max-width: 500px; margin: 0 auto; }
.signup-form { display: flex; flex-direction: column; gap: .6rem; }
.email-input {
  padding: .8rem 1rem; border: 1px solid var(--border); background: var(--surface-1);
  border-radius: var(--radius); font-size: 1rem; width: 100%; color: var(--text-0);
  transition: box-shadow .2s var(--easing), border-color .2s var(--easing), background-color .35s var(--easing), color .35s var(--easing);
}
.email-input:focus { outline: none; box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand) 45%, transparent); border-color: color-mix(in oklab, var(--brand) 60%, var(--border)); }

.cta-button {
  padding: .8rem 1rem; background-color: var(--cta); color: #fff; border: none; border-radius: var(--radius);
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: background-color .2s var(--easing), transform .12s var(--easing), box-shadow .2s var(--easing);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.cta-button:hover { background-color: var(--cta-hover); transform: translateY(-1px); box-shadow: 0 10px 20px rgba(0,0,0,.12); }
.cta-button:active{ transform: translateY(0); }

.privacy-note { font-size: .8rem; color: #d6dbea; margin-top: .5rem; }
html[data-theme="dark"] .privacy-note { color: #b9c3d0; }

/* ---------- Benefits ---------- */
.benefits-list {
  list-style: none; margin-top: 2rem; color: #d6dbea;
  display: flex; flex-direction: column; gap: .5rem; font-size: .95rem; justify-content: center; align-items: flex-start;
}
.benefits-list li { display: flex; align-items: center; }
.benefit-icon { font-size: 1rem; margin-right: .4rem; color: var(--brand); }

/* ---------- About ---------- */
.about { background-color: var(--surface-1); padding: 4rem 0; color: var(--text-0); transition: background-color .35s var(--easing); }
.about-inner h2 { font-size: 1.8rem; margin-bottom: 1rem; text-align: center; }
.about-inner p  { font-size: 1rem; margin-bottom: 2rem; max-width: 800px; text-align: center; margin-left: auto; margin-right: auto; color: var(--text-muted); }
.features { display: flex; flex-direction: column; gap: 2rem; }
.feature-item {
  background-color: var(--surface-0); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; text-align: left; flex: 1;
  transition: transform .25s var(--easing), box-shadow .25s var(--easing), background-color .35s var(--easing), border-color .35s var(--easing);
}
.feature-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon { font-size: 2rem; color: var(--brand); margin-bottom: .5rem; }
.feature-item h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; }
.feature-item p  { color: var(--text-0); font-size: .95rem; line-height: 1.5; }

/* ---------- Plans ---------- */
.plans { background-color: var(--surface-0); padding: 4rem 0; color: var(--text-0); }
.plans-inner h2 { text-align: center; font-size: 1.8rem; margin-bottom: .5rem; }
.plans-intro { text-align: center; max-width: 650px; margin: 0 auto 2rem; color: var(--text-muted); }
.plans-grid { display: flex; flex-direction: column; gap: 2rem; }
.plan-box {
  background-color: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem 1.5rem; text-align: center; flex: 1; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .25s var(--easing), box-shadow .25s var(--easing), background-color .35s var(--easing), border-color .35s var(--easing);
}
.plan-box:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.plan-title { font-size: 1.4rem; font-weight: 600; margin-bottom: .3rem; }
.plan-price { font-size: 1.2rem; color: var(--brand); margin-bottom: 1rem; }
.plan-features { list-style: none; margin-bottom: 1.5rem; color: var(--text-0); }
.plan-features li { margin-bottom: .5rem; position: relative; padding-left: 1.2rem; }
.plan-features li::before { content: '✔'; position: absolute; left: 0; color: var(--brand); }
.plan-cta {
  display: inline-block; padding: .7rem 1rem; border-radius: var(--radius);
  text-align: center; font-weight: 600; font-size: .95rem; margin-top: auto; color: #fff;
  background-color: var(--brand); transition: background-color .2s var(--easing), transform .12s var(--easing);
}
.plan-cta:hover { background-color: color-mix(in oklab, var(--brand) 85%, black); transform: translateY(-1px); }
.plan-cta-primary { background-color: var(--cta); }
.plan-cta-primary:hover { background-color: var(--cta-hover); }
.plan-free    { border-width: 2px; border-color: var(--brand); }
.plan-premium { border-width: 2px; border-color: var(--cta); }
.plan-custom  { border-width: 2px; border-color: var(--brand); }

/* ---------- Testimonials ---------- */
.testimonials { background-color: var(--surface-1); padding: 4rem 0; transition: background-color .35s var(--easing); }
.testimonials-inner h2 { text-align: center; font-size: 1.8rem; margin-bottom: 2rem; }
.testimonial-cards { display: flex; flex-direction: column; gap: 1.5rem; max-width: 800px; margin: 0 auto; }
.testimonial-card {
  background-color: var(--surface-0); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; font-size: .95rem; color: var(--text-0);
  transition: transform .25s var(--easing), box-shadow .25s var(--easing), background-color .35s var(--easing), border-color .35s var(--easing);
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.testimonial-text { margin-bottom: .8rem; font-style: italic; }
.testimonial-author { font-weight: 600; color: var(--brand); }

/* ---------- Team ---------- */
.team { background-color: var(--surface-0); padding: 4rem 0; color: var(--text-0); }
.team-inner h2 { text-align: center; font-size: 1.8rem; margin-bottom: 1rem; }
.mission { text-align: center; max-width: 700px; margin: 0 auto 2rem; color: var(--text-muted); }
.team-members { display: flex; flex-direction: column; gap: 2rem; align-items: center; }
.team-member {
  background-color: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; max-width: 350px; text-align: center;
  transition: transform .25s var(--easing), box-shadow .25s var(--easing), background-color .35s var(--easing), border-color .35s var(--easing);
}
.team-member:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.team-avatar { font-size: 2.5rem; margin-bottom: .5rem; }
.team-member h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: .3rem; }
.team-role { font-size: .9rem; color: var(--brand); margin-bottom: .5rem; }
.team-bio { font-size: .9rem; color: var(--text-0); line-height: 1.4; }

/* ---------- Footer ---------- */
footer { background-color: var(--footer-bg); color: #f2f4f8; padding: 3rem 0; transition: background-color .35s var(--easing); }
.footer-inner { display: flex; flex-direction: column; gap: 2rem; align-items: center; text-align: center; }
.footer-contact h3 { font-size: 1.3rem; margin-bottom: .7rem; }
.footer-contact p { font-size: .95rem; margin-bottom: .5rem; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: var(--brand); font-size: .9rem; }
.legal { font-size: .8rem; color: #b9c3d9; max-width: 700px; }
.legal a { color: #b9c3d9; text-decoration: underline; margin: 0 .3rem; }
.legal a:hover { color: var(--brand); }

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(8px) scale(.98); filter: saturate(.9);
  transition: opacity .6s var(--easing), transform .6s var(--easing), filter .6s var(--easing);
  will-change: transform, opacity, filter;
}
.is-visible { opacity: 1 !important; transform: none !important; filter: none !important; }

/* ---------- Media queries ---------- */
@media (min-width: 700px) {
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1.2rem; }

  .benefits-list { flex-direction: row; justify-content: center; align-items: center; }
  .benefits-list li { margin: 0 1rem; }

  .features { flex-direction: row; }
  .plans-grid { flex-direction: row; }
  .testimonial-cards { flex-direction: row; justify-content: center; }
  .team-members { flex-direction: row; justify-content: center; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; text-align: left; }
  .footer-links { justify-content: center; }
}

/* Very wide screens */
@media (min-width: 1000px) {
  .hero-title { font-size: 3rem; }
  .hero-subtitle { font-size: 1.3rem; }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
 
.logo-img {
  height: 40px;         /* висота логотипа під хедер */
  width: auto;          /* щоб зберігати пропорції */
  max-width: 150px;     /* щоб не роздувало на мобілках */
  display: block;
}
.signup-msg {
  margin-top: .6rem;
  font-size: .92rem;
  line-height: 1.4;
}
.signup-msg.success { color: #16a34a; }  /* зелений */
.signup-msg.error   { color: #dc2626; }  /* червоний */
