/* Pip - coming-soon site
   Palette mirrors the in-app PipPalette so the marketing site, app icon,
   and shipping product all read as the same brand. Keep edits in sync
   with app/Pip/Theme/PipPalette.swift if either side changes.
*/

:root {
  /* Mirror of PipPalette */
  --paper-warm: #FDFAF4;
  --paper-deep: #F4ECD8;
  --white: #FFFFFF;
  --berry-tint: #FBE5EA;
  --berry: #E07A8C;
  --pip-orange-light: #FFB088;
  --pip-orange: #FF8C42;
  --pip-orange-dark: #E5713A;
  --slate: #3A4A5A;
  --slate-muted: #7C8896;
  --mustard-light: #F5DC9C;
  --leaf-green-light: #A8E89E;
  --leaf-green: #7DC97A;
  --leaf-green-dark: #4FA34F;
  --night-blue: #2A3640;

  /* Derived tokens */
  --shadow-soft: 0 4px 14px rgba(58, 74, 90, 0.08);
  --shadow-card: 0 6px 24px rgba(58, 74, 90, 0.10);
  --shadow-cta: 0 8px 20px rgba(255, 140, 66, 0.32);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Rounded",
    "SF Pro Text", "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-stack);
  color: var(--slate);
  background:
    radial-gradient(ellipse at 20% -10%, rgba(255, 176, 136, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(168, 232, 158, 0.30) 0%, transparent 55%),
    linear-gradient(180deg, var(--paper-warm) 0%, var(--paper-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ----- Top nav ----- */

.topnav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: block;
  /* drop-shadow follows the icon's baked-in squircle silhouette via the
     PNG alpha channel; box-shadow would trace the rectangular img bounds
     instead and leak shadow into the transparent corners. */
  filter: drop-shadow(0 2px 4px rgba(58, 74, 90, 0.18));
}

.brand-name {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--slate-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--pip-orange);
}

/* ----- Hero ----- */

.hero {
  text-align: center;
  padding: 4rem 0 5rem;
}

.hero-logo {
  width: 96px;
  height: 96px;
  display: block;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 6px 18px rgba(58, 74, 90, 0.22));
}

h1 {
  font-size: clamp(2.2rem, 5vw + 1rem, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--slate);
  margin: 0 0 1rem;
}

h1 .accent {
  color: var(--pip-orange);
}

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--slate-muted);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

/* ----- Signup form ----- */

.signup {
  display: flex;
  gap: 0.5rem;
  max-width: 30rem;
  margin: 0 auto 0.75rem;
}

.signup input {
  flex: 1;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(124, 136, 150, 0.25);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--slate);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.signup input::placeholder {
  color: var(--slate-muted);
  opacity: 0.7;
}

.signup input:disabled {
  background: rgba(255, 255, 255, 0.55);
  cursor: not-allowed;
}

.signup button {
  padding: 0.85rem 1.25rem;
  background: var(--slate-muted);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: not-allowed;
  white-space: nowrap;
  opacity: 0.7;
}

.signup-helper {
  font-size: 0.85rem;
  color: var(--slate-muted);
  margin: 0 0 2rem;
}

/* ----- App store coming-soon buttons ----- */
/* Custom badges (NOT Apple's official "Download on the App Store" badge)
   since the official badge can't legally be modified to say Coming soon.
   These read as store-style CTAs while making the unavailable state
   honest. */

.store-badges {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.1rem;
  background: var(--night-blue);
  color: var(--white);
  border-radius: var(--radius-md);
  text-decoration: none;
  min-width: 200px;
  box-shadow: var(--shadow-soft);
  cursor: default;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.badge svg {
  flex-shrink: 0;
  fill: var(--white);
}

.badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.badge-small {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mustard-light);
  font-weight: 600;
}

.badge-large {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.launch-date {
  font-size: 0.95rem;
  color: var(--slate-muted);
  margin: 0;
}

/* ----- Section scaffolding ----- */

section {
  padding: 4rem 0;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pip-orange);
  background: rgba(255, 140, 66, 0.12);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin: 0 0 0.85rem;
}

h2 {
  font-size: clamp(1.8rem, 3vw + 0.5rem, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--slate);
  margin: 0 0 1rem;
}

.section-lede {
  color: var(--slate-muted);
  font-size: 1.05rem;
  max-width: 38rem;
  margin: 0 0 2.5rem;
}

.section-head {
  text-align: center;
}

.section-head .section-lede {
  margin-left: auto;
  margin-right: auto;
}

/* ----- Features ----- */

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

.feature {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature.tint-orange .feature-icon { background: rgba(255, 140, 66, 0.15); color: var(--pip-orange); }
.feature.tint-orange .feature-icon svg { stroke: var(--pip-orange); }
.feature.tint-green .feature-icon { background: rgba(125, 201, 122, 0.18); color: var(--leaf-green-dark); }
.feature.tint-green .feature-icon svg { stroke: var(--leaf-green-dark); }
.feature.tint-berry .feature-icon { background: var(--berry-tint); color: var(--berry); }
.feature.tint-berry .feature-icon svg { stroke: var(--berry); }
.feature.tint-mustard .feature-icon { background: rgba(245, 220, 156, 0.45); color: #C39A3F; }
.feature.tint-mustard .feature-icon svg { stroke: #C39A3F; }

.feature h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate);
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--slate-muted);
  line-height: 1.55;
}

/* ----- Preview ----- */

.preview {
  text-align: center;
}

.phone-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.phone-frame {
  width: min(280px, 80%);
  aspect-ratio: 9 / 19.5;
  background: var(--night-blue);
  border-radius: 38px;
  padding: 10px;
  box-shadow: var(--shadow-card), 0 30px 60px rgba(58, 74, 90, 0.18);
  position: relative;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 176, 136, 0.7) 0%, transparent 55%),
    linear-gradient(180deg, var(--paper-warm) 0%, var(--paper-deep) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 26px;
  background: var(--night-blue);
  border-radius: 999px;
}

.phone-placeholder-mark {
  width: 64px;
  height: 64px;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(58, 74, 90, 0.18));
}

.phone-placeholder-label {
  font-size: 0.85rem;
  color: var(--slate-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ----- FAQ ----- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

details {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.18s ease;
}

details[open] {
  box-shadow: var(--shadow-card);
}

summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--slate);
  outline: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  font-weight: 600;
  color: var(--pip-orange);
  font-size: 1.3rem;
  margin-left: 1rem;
  transition: transform 0.2s ease;
}

details[open] summary::after {
  content: "\2013"; /* en dash */
}

details p {
  margin: 0.75rem 0 0;
  color: var(--slate-muted);
  font-size: 0.97rem;
  line-height: 1.6;
}

/* ----- Footer ----- */

footer {
  margin-top: 2rem;
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
  border-top: 1px solid rgba(124, 136, 150, 0.18);
}

.links, .meta {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--slate-muted);
  line-height: 1.7;
}

.links a, .meta a {
  color: var(--leaf-green-dark);
  text-decoration: none;
  margin: 0 0.3rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.links a:hover, .meta a:hover {
  border-bottom-color: var(--leaf-green-dark);
}

.copy {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--slate-muted);
  opacity: 0.75;
}

/* ----- Visually hidden ----- */

.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;
}

/* ----- Responsive ----- */

@media (min-width: 640px) {
  .signup {
    flex-direction: row;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  section {
    padding: 5.5rem 0;
  }
  .hero {
    padding: 5rem 0 6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    transition: none !important;
    animation: none !important;
  }
}
