/*! PhotoPiper Design System | Based on HTML5 Boilerplate v9.0.1 */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* Typography */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";

  /* Colors - Text */
  --text: rgba(245, 248, 255, 0.92);
  --muted: rgba(245, 248, 255, 0.70);
  --faint: rgba(245, 248, 255, 0.55);

  /* Colors - Background */
  --bg0: #070B14;
  --bg1: #0A1020;
  --grid: rgba(255, 255, 255, 0.06);

  /* Colors - Glass Effect */
  --glass: rgba(255, 255, 255, 0.08);
  --glass2: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.14);
  --border2: rgba(255, 255, 255, 0.18);
  --blur: 18px;

  /* Radii */
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-2xl: 32px;

  /* Shadows */
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --shadow2: 0 14px 40px rgba(0, 0, 0, 0.35);

  /* Accent Colors */
  --ok1: #00B7FF;
  --ok2: #00E5A7;
  --ring: rgba(0, 183, 255, 0.35);
  --green: #4BE176;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

/* Selection */
::selection {
  background: var(--ok1);
  color: var(--bg0);
}

/* Links */
a {
  color: var(--ok1);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* Images */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.page {
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 18% 18%, rgba(0, 183, 255, 0.16), transparent 55%),
    radial-gradient(900px 600px at 78% 32%, rgba(160, 120, 255, 0.16), transparent 58%),
    radial-gradient(900px 700px at 45% 90%, rgba(0, 229, 167, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  position: relative;
  overflow-x: hidden;
}

/* Subtle grid overlay */
.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.18;
  pointer-events: none;
  mask-image: radial-gradient(80% 60% at 50% 20%, #000 40%, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 20%, #000 40%, transparent 78%);
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  position: relative;
}

.section {
  padding: var(--space-2xl) 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-sm);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(24px, 3.5vw, 36px);
}

h3 {
  font-size: clamp(18px, 2.5vw, 24px);
}

h4 {
  font-size: 18px;
}

p {
  margin: 0 0 var(--space-md);
  color: var(--muted);
  line-height: 1.65;
  font-size: 17px;
}

.text-muted { color: var(--muted); }
.text-faint { color: var(--faint); }
.text-center { text-align: center; }

/* ==========================================================================
   Glass Components
   ========================================================================== */

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
}

.card {
  background: var(--glass2);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(calc(var(--blur) - 6px)) saturate(150%);
  -webkit-backdrop-filter: blur(calc(var(--blur) - 6px)) saturate(150%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin: 16px auto 0;
  width: min(1120px, calc(100% - 32px));
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 14px 18px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: inherit;
}

.nav-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
}

.nav-brand-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-brand-text span {
  display: block;
  font-size: 12px;
  color: var(--faint);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  border-bottom: 2px solid transparent;
  position: relative;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: var(--text);
  background: rgba(0, 183, 255, 0.12);
  border-bottom-color: var(--ok1);
}

/* Mobile Navigation Toggle */
.nav-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--r-md);
  transition: background 0.15s;
}

.nav-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.hamburger {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: background 0.2s;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

/* Hamburger animation when open */
.nav-mobile-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-mobile-toggle[aria-expanded="true"] .hamburger::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-mobile-toggle[aria-expanded="true"] .hamburger::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Menu */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
  border-top: 1px solid var(--border);
  margin-top: var(--space-sm);
}

.nav-mobile:not([hidden]) {
  display: flex;
}

.nav-mobile-link {
  display: block;
  padding: 12px 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 12px;
  transition: color 0.15s, background 0.15s;
}

.nav-mobile-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 11px 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  color: var(--text);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 6px var(--ring);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--ok1), var(--ok2));
  color: rgba(0, 0, 0, 0.85);
  border-color: rgba(255, 255, 255, 0.20);
  box-shadow: 0 4px 16px rgba(0, 183, 255, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--ok1), var(--ok2));
  color: rgba(0, 0, 0, 0.85);
  filter: brightness(1.08);
  box-shadow: 0 8px 28px rgba(0, 183, 255, 0.35);
}

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
  border-radius: var(--r-lg);
}

/* ==========================================================================
   Badge
   ========================================================================== */

.badge {
  display: inline-flex;
  gap: var(--space-xs);
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(75, 225, 118, 0.18);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(75, 225, 118, 0.18);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(75, 225, 118, 0.25);
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  margin-top: 22px;
  padding: var(--space-xl);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-lg);
  align-items: stretch;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  margin: var(--space-sm) 0 var(--space-md);
}

.hero p {
  max-width: 52ch;
}

.hero .cta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.hero .sub {
  color: var(--faint);
  font-size: 13px;
  margin-top: var(--space-sm);
}

.hero-screenshot {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.hero-screenshot img {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-screenshot .sub {
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

/* ==========================================================================
   Features Grid
   ========================================================================== */

.features {
  margin-top: var(--space-lg);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature {
  padding: var(--space-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 183, 255, 0.15), rgba(0, 229, 167, 0.15));
  border: 1px solid rgba(0, 183, 255, 0.25);
  border-radius: 12px;
  margin-bottom: var(--space-sm);
  font-size: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover .feature-icon {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 183, 255, 0.2);
}

.feature h3 {
  margin: 0 0 var(--space-xs);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ==========================================================================
   Video Section
   ========================================================================== */

.video-section {
  margin-top: var(--space-2xl);
}

.video-section h2 {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.video-wrapper {
  padding: var(--space-md);
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  width: calc(100% - var(--space-md) * 2);
  height: calc(100% - var(--space-md) * 2);
  border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  margin-top: var(--space-2xl);
}

.cta-section h2 {
  margin-bottom: var(--space-md);
}

.cta-section p {
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

.cta-section .cta {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ==========================================================================
   Prose (Long-form content)
   ========================================================================== */

.prose {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl);
}

.prose h1 {
  margin-bottom: var(--space-xs);
}

.prose .date {
  color: var(--faint);
  font-size: 14px;
  margin-bottom: var(--space-xl);
}

.prose h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-size: 22px;
}

.prose p {
  margin-bottom: var(--space-md);
}

.prose ul, .prose ol {
  margin: 0 0 var(--space-md);
  padding-left: var(--space-lg);
  color: var(--muted);
}

.prose li {
  margin-bottom: var(--space-xs);
  line-height: 1.6;
}

.prose code {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ==========================================================================
   Steps (How-To)
   ========================================================================== */

.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 800px;
  margin: var(--space-xl) auto;
}

.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--space-md);
  padding: var(--space-lg);
  align-items: start;
}

.step-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ok1), var(--ok2));
  color: rgba(0, 0, 0, 0.85);
  font-size: 20px;
  font-weight: 700;
  border-radius: 14px;
  flex-shrink: 0;
}

.step-content h3 {
  margin: 0 0 var(--space-xs);
  font-size: 18px;
}

.step-content p {
  margin: 0;
  font-size: 15px;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */

.faq-list {
  max-width: 800px;
  margin: var(--space-xl) auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-md);
}

.faq-expand-btn {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.faq-expand-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.faq-item {
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.04);
}

.faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.faq-icon::before {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 var(--space-lg);
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: var(--space-sm) var(--space-lg) var(--space-md);
}

.faq-answer p {
  margin: 0;
  font-size: 15px;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  max-width: 800px;
  margin: var(--space-xl) auto;
}

.contact-card {
  padding: var(--space-lg);
  text-align: center;
}

.contact-card h3 {
  margin-bottom: var(--space-xs);
  font-size: 16px;
}

.contact-card p {
  margin: 0;
  font-size: 14px;
}

.contact-card p.mt-md { margin-top: var(--space-md); }
.contact-card p.mb-md { margin-bottom: var(--space-md); }

.contact-card a {
  font-weight: 600;
}

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

.footer {
  margin-top: var(--space-xl);
  padding: var(--space-lg) 0;
  color: var(--faint);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

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

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

/* ==========================================================================
   Page Header (for inner pages)
   ========================================================================== */

.page-header {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  margin-top: var(--space-lg);
}

.page-header h1 {
  margin-bottom: var(--space-sm);
}

.page-header p {
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ==========================================================================
   Accessibility
   ========================================================================== */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--ok1);
  color: var(--bg0);
  padding: 8px 16px;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--ok1);
  outline-offset: 2px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: var(--space-lg);
  }

  .hero-screenshot {
    order: -1;
    animation: none; /* Disable float on mobile for better performance */
    max-width: 400px;
    margin: 0 auto;
  }

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

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

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

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  /* Better touch targets for mobile */
  .btn {
    min-height: 44px;
    padding: 12px 18px;
  }

  .nav-mobile-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .faq-question {
    min-height: 48px;
  }
}

@media (max-width: 600px) {
  .container {
    width: calc(100% - 32px);
  }

  .nav {
    width: calc(100% - 24px);
    top: 12px;
  }

  .nav-brand-text span {
    display: none;
  }

  .hero {
    padding: var(--space-md);
  }

  .hero-screenshot {
    max-width: 100%;
  }

  .hero .cta {
    flex-direction: column;
  }

  .hero .cta .btn {
    width: 100%;
    justify-content: center;
  }

  .prose {
    padding: var(--space-md);
  }

  .step {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .step-number {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-section .cta {
    flex-direction: column;
  }

  .cta-section .cta .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .page::before {
    display: none;
  }

  .nav,
  .nav-mobile-toggle,
  .skip-link {
    display: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  .glass,
  .card {
    border: 1px solid #ccc;
    backdrop-filter: none;
  }
}
