/*
 * Page Turner Website Styles
 * Squarespace-inspired, fluid, production-ready
 */

/* =====================
   Design tokens
===================== */

:root {
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, Arial, sans-serif;

  --color-bg: #f6f5f3;
  --color-text: #333;
  --color-heading: #282828;
  --color-muted: #4a4a4a;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
}

/* =====================
   Reset
===================== */

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.6;
  background: #fff;
}

/* =====================
   Layout
===================== */
.main-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

.content-panel {
  flex: 0 0 55%;
  background: var(--color-bg);
  display: flex;
  align-items: flex-start;

  padding-top: clamp(1.25rem, 3vw, 2.25rem);
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);

  /* 👇 this is the important part */
  padding-left: clamp(6rem, 10vw, 12rem);
  padding-right: clamp(4rem, 8vw, 8rem);
}

.content-wrapper {
  width: min(100%, clamp(400px, 34vw, 520px));
  margin-top: clamp(0.75rem, 3vh, 2rem);
}

.image-panel {
  flex: 0 0 45%;
  position: relative;
  overflow: hidden;
}

/* =====================
   Logo
===================== */

.logo img {
  width: clamp(64px, 7vw, 88px);
  height: auto;
}

/* =====================
   Headings
===================== */

h1 {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.18;

  color: var(--color-heading); /* #1a1a1a */

  font-size: clamp(
    1.75rem,
    calc(2.05vw + 1rem),
    2.7rem
  );

  margin: 1.75rem 0 1.25rem;
  white-space: pre-wrap;
}

@media (max-width: 767px) {
  h1 {
    font-size: 2.25rem;
  }
}

/* =====================
   Body text
===================== */

.description {
  font-size: clamp(1rem, 1.15vw, 1.0625rem);
  line-height: 1.75;

  color: var(--color-muted); /* #4a4a4a */
  font-weight: 300;

  margin-bottom: var(--space-md);
}

/* =====================
   Download section
===================== */

.download-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;          /* 👈 THIS is the key */
   padding-bottom: 1rem;
}

.qr-code img {
  width: clamp(100px, 12vw, 140px);
  height: auto;
}

.app-store-badge img {
  height: 48px;
  width: auto;
}

.app-store-badge {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.app-store-badge:hover {
  opacity: 0.8;
}

/* =====================
   Footer
===================== */

.footer {
  text-align: center;
  position: absolute;
  bottom: clamp(2.5rem, 5vw, 4.5rem);
  left: clamp(6rem, 10vw, 12rem);
  width: min(100%, clamp(400px, 34vw, 520px));
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.3rem;
  opacity: 0.85;
  font-size: 0.875rem;
  font-weight: 300;
}

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

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

.separator {
  opacity: 0.5;
}

/* =====================
   Hero image
===================== */

.hero-image {
  position: absolute;
  inset: 0;
}

.background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  margin-top: 0.75rem;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.instagram-link:hover {
  color: var(--color-heading);
}

.floating-device {
  position: absolute;
  top: 50%;
  left: clamp(54%, 58vw, 60%);
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

.floating-device img {
  display: block;
  height: clamp(520px, 82vh, 720px);
  width: auto;
  filter: drop-shadow(
    0 40px 80px rgba(0,0,0,0.35)
  );
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.15) 100%
  );
  pointer-events: none;
}

.copyright {
  font-size: 0.8rem;
  color: #666;
  opacity: 0.9;
}

/* Legal page styles are in css/legal.css */
.privacy-policy {
  font-family: var(--font-body);
  color: var(--color-text);
}


/* =====================
   Mobile
===================== */

@media (max-width: 768px) {
  .main-container {
    display: flex;
    flex-direction: column;
  }

  .content-panel {
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 1rem;
    display: flex;
    justify-content: center;
    order: 1;
  }

  .content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
  }

  .image-panel {
    display: none;
  }

  .download-section {
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 auto;
  }

  .content-no-footer {
    order: 1;
  }

  .floating-device {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    margin: 2rem auto;
    display: flex;
    justify-content: center;
    order: 2;
  }

  footer.footer {
    order: 3;
  }

  .image-panel {
    display: none;
  }

  .floating-device img {
    width: 80%;
    max-width: 320px;
    height: auto;
  }

  .footer {
    position: static;
    width: 100%;
    order: 3;
    padding: 1.5rem;
    background: var(--color-bg);
  }
}
}
