/* ========================================
   StatIQa — Style System
   ======================================== */

/* --- Custom Properties --- */
:root {
  --color-terra: #E07A5F;
  --color-terra-light: #e8967f;
  --color-sand: #F2CC8F;
  --color-sand-light: #f7e0b8;
  --color-sage: #81B29A;
  --color-sage-dark: #6a9a82;
  --color-charcoal: #3D405B;
  --color-charcoal-light: #545776;
  --color-cream: #F4F1DE;
  --color-white: #FEFCF6;
  --color-warm-gray: #A8A4A0;

  --font-stack: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', ui-monospace, 'Cascadia Code', monospace;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 3px rgba(61, 64, 91, 0.06);
  --shadow-md: 0 4px 16px rgba(61, 64, 91, 0.08);
  --shadow-lg: 0 8px 32px rgba(61, 64, 91, 0.1);
  --shadow-xl: 0 16px 48px rgba(61, 64, 91, 0.12);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-charcoal);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

/* --- Container --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section Utilities --- */
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-terra);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-charcoal);
  margin-bottom: 48px;
}

/* --- Button --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

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

.btn--primary:hover {
  background: var(--color-charcoal-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   Header
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all var(--transition);
}

.header--scrolled {
  background: rgba(254, 252, 246, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 rgba(61, 64, 91, 0.06);
  padding: 12px 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.logo-stat { color: var(--color-charcoal); }
.logo-iq { color: var(--color-terra); }
.logo-a { color: var(--color-charcoal); }

.header__nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-charcoal-light);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-terra);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav__link:hover {
  color: var(--color-charcoal);
}

.nav__link:hover::after {
  width: 100%;
}

/* Mobile Menu Button */
.header__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.header__menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-charcoal);
  border-radius: 2px;
  transition: all var(--transition);
}

.header__menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.header__menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Hero
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, var(--color-cream) 0%, var(--color-sand-light) 50%, var(--color-sand) 100%);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 120px 0 80px;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--color-charcoal);
  margin-bottom: 24px;
}

.hero__subtitle {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--color-charcoal-light);
  margin-bottom: 40px;
  max-width: 480px;
}

/* Hero decorative shapes */
.hero__visual {
  position: relative;
  height: 400px;
}

.hero__shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
}

.hero__shape--1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at 30% 30%, var(--color-terra), var(--color-terra-light));
  top: 20px;
  right: 0;
  animation: float 8s ease-in-out infinite;
}

.hero__shape--2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at 70% 30%, var(--color-sage), var(--color-sage-dark));
  bottom: 20px;
  right: 120px;
  animation: float 10s ease-in-out infinite reverse;
}

.hero__shape--3 {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at 50% 50%, var(--color-sand), var(--color-sand-light));
  top: 60px;
  right: 250px;
  animation: float 6s ease-in-out infinite 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.03); }
}

/* ========================================
   About
   ======================================== */
.about {
  padding: 120px 0;
  background: var(--color-white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about__text p {
  font-size: 1.05rem;
  color: var(--color-charcoal-light);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about__text strong {
  color: var(--color-charcoal);
}

.about__cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about__card {
  padding: 28px 32px;
  background: var(--color-cream);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.about__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.about__card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-sand);
  border-radius: var(--radius-sm);
  color: var(--color-terra);
  margin-bottom: 16px;
}

.about__card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-charcoal);
}

.about__card p {
  font-size: 0.9rem;
  color: var(--color-charcoal-light);
  line-height: 1.6;
}

/* ========================================
   Approach
   ======================================== */
.approach {
  padding: 120px 0;
  background: var(--color-cream);
}

.approach__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.approach__card {
  padding: 40px 32px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.approach__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.approach__number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-terra);
  font-family: var(--font-mono);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.approach__card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-charcoal);
}

.approach__card p {
  font-size: 0.92rem;
  color: var(--color-charcoal-light);
  line-height: 1.7;
}

/* ========================================
   Sprout
   ======================================== */
.sprout {
  padding: 120px 0;
  background: var(--color-white);
}

.sprout__intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 80px;
}

.sprout__lead {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--color-charcoal);
  margin-bottom: 20px;
}

.sprout__intro-text p {
  font-size: 1rem;
  color: var(--color-charcoal-light);
  line-height: 1.8;
  margin-bottom: 16px;
}

.sprout__coming {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--color-cream);
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-charcoal);
}

.sprout__coming svg {
  color: var(--color-charcoal-light);
}

/* --- Sprout Screenshots in iPhone Frames --- */
.sprout__screenshots {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: flex-start;
}

.iphone-frame {
  position: relative;
  background: #1a1a1a;
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 0 0 2px #2a2a2a,
    0 20px 60px rgba(0, 0, 0, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  width: 260px;
  flex-shrink: 0;
}

.iphone-frame__notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 28px;
  background: #1a1a1a;
  border-radius: 0 0 18px 18px;
  z-index: 3;
}

.iphone-frame__screen {
  width: 100%;
  height: auto;
  border-radius: 32px;
  display: block;
  position: relative;
  z-index: 1;
}

/* ========================================
   Contact
   ======================================== */
.contact {
  padding: 120px 0;
  background: var(--color-cream);
}

.contact__inner {
  max-width: 560px;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact__item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.contact__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  color: var(--color-terra);
  flex-shrink: 0;
}

.contact__item h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-warm-gray);
  margin-bottom: 4px;
}

.contact__item p,
.contact__item a {
  font-size: 1rem;
  color: var(--color-charcoal);
  line-height: 1.6;
}

.contact__item a:hover {
  color: var(--color-terra);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 48px 0 32px;
  background: var(--color-charcoal);
  color: var(--color-cream);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer__brand .logo-stat,
.footer__brand .logo-a {
  color: var(--color-cream);
}

.footer__brand p {
  font-size: 0.9rem;
  color: rgba(244, 241, 222, 0.6);
}

.footer__links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 0.85rem;
  color: rgba(244, 241, 222, 0.6);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--color-cream);
}

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(244, 241, 222, 0.1);
}

.footer__bottom p {
  font-size: 0.8rem;
  color: rgba(244, 241, 222, 0.4);
}

/* ========================================
   Privacy Page
   ======================================== */
.privacy-page {
  padding: 140px 0 80px;
}

.privacy-page h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.privacy-page .privacy-date {
  font-size: 0.85rem;
  color: var(--color-warm-gray);
  margin-bottom: 48px;
}

.privacy-page h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--color-charcoal);
}

.privacy-page p,
.privacy-page li {
  font-size: 1rem;
  color: var(--color-charcoal-light);
  line-height: 1.8;
  margin-bottom: 12px;
}

.privacy-page ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.privacy-page li {
  margin-bottom: 6px;
}

.privacy-page a {
  color: var(--color-terra);
}

.privacy-page a:hover {
  text-decoration: underline;
}

/* ========================================
   Support Page
   ======================================== */
.support-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
  margin-top: 16px;
}

.support-info h2,
.support-form-wrap h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-charcoal);
  margin-bottom: 24px;
  margin-top: 0;
}

.support-info__items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.support-info__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.support-info__item svg {
  flex-shrink: 0;
  color: var(--color-terra);
  margin-top: 2px;
}

.support-info__item strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-warm-gray);
  margin-bottom: 2px;
}

.support-info__item p {
  font-size: 0.95rem;
  color: var(--color-charcoal);
  line-height: 1.5;
  margin-bottom: 0;
}

.support-info__note {
  margin-top: 32px;
  font-size: 0.85rem;
  color: var(--color-warm-gray);
  font-style: italic;
}

/* Form */
.support-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-charcoal);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-stack);
  font-size: 0.95rem;
  color: var(--color-charcoal);
  background: var(--color-cream);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: all var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-warm-gray);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-terra);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.12);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23A8A4A0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.support-form__submit {
  align-self: flex-start;
  margin-top: 4px;
}

/* Form messages */
.form-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-message--success {
  background: rgba(129, 178, 154, 0.15);
  color: var(--color-sage-dark);
}

.form-message--error {
  background: rgba(224, 122, 95, 0.12);
  color: var(--color-terra);
}

.form-message a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .support-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ========================================
   Reveal Animations
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(254, 252, 246, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    padding: 48px;
    transition: right var(--transition);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.1);
  }

  .header__nav.open {
    right: 0;
  }

  .header__nav .nav__link {
    font-size: 1.2rem;
  }

  .header__menu-btn {
    display: flex;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    padding: 140px 0 60px;
    gap: 40px;
  }

  .hero__visual {
    height: 240px;
  }

  .hero__shape--1 {
    width: 180px;
    height: 180px;
    right: 10%;
  }

  .hero__shape--2 {
    width: 120px;
    height: 120px;
    right: 40%;
  }

  .hero__shape--3 {
    width: 80px;
    height: 80px;
    right: 60%;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .sprout__intro {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sprout__screenshots {
    order: -1;
  }

  .iphone-frame {
    width: 200px;
    border-radius: 34px;
    padding: 10px;
  }

  .iphone-frame__notch {
    width: 70px;
    height: 22px;
    top: 10px;
    border-radius: 0 0 14px 14px;
  }

  .iphone-frame__screen {
    border-radius: 24px;
  }

  .footer__brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero__title {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 36px;
  }

  .about, .approach, .sprout, .contact {
    padding: 80px 0;
  }

  .iphone-frame {
    width: 160px;
    border-radius: 28px;
    padding: 8px;
  }

  .iphone-frame__notch {
    width: 56px;
    height: 18px;
    top: 8px;
    border-radius: 0 0 11px 11px;
  }

  .iphone-frame__screen {
    border-radius: 20px;
  }
}
