/* Home page styles */
/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 60px;
  padding: 40px 0 60px;
  min-height: 70vh;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-availability {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.title {
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.0;
  margin-bottom: 20px;
}

.title-line {
  display: block;
  padding-right: 0.1em;
  white-space: nowrap;
}

.title-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #6dd400 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.05em;
}

.subtitle {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 28px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  align-items: center;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
}

.app-store-badge-img {
  height: 52px;
  width: auto;
  display: block;
}

.badge-dark {
  display: none;
}

.dark-mode .badge-light {
  display: none;
}

.dark-mode .badge-dark {
  display: block;
}

.app-store-badge-large .app-store-badge-img {
  height: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--theme-transition), border-color var(--theme-transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--bg-elev), var(--text) 4%);
  border-color: var(--border-strong);
}

.trust-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.trust-item svg {
  color: var(--accent);
  transition: transform var(--transition);
}

.trust-item:hover {
  color: var(--text);
}

.trust-item:hover svg {
  transform: scale(1.1);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  padding: 0 40px;
}

.screenshot-wrapper {
  position: relative;
  width: 100%;
  max-width: 680px;
  overflow: visible;
}

.screenshot-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse at center, var(--accent-soft) 0%, rgba(var(--accent-rgb), 0.035) 40%, transparent 72%);
  opacity: 0.5;
  z-index: -1;
}

.screenshot-frame {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  /* Keep the screenshot in the normal paint path for crisp UI text. */
  transition: box-shadow var(--transition-slow);
}

.screenshot-frame:hover {
  box-shadow: 0 40px 100px rgba(12, 14, 17, 0.2);
}

.dark-mode .screenshot-frame:hover {
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.window-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  background: linear-gradient(180deg, var(--bg-elev) 0%, color-mix(in srgb, var(--bg-elev), var(--bg) 30%) 100%);
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.screenshot-frame:hover .window-dot {
  transform: scale(1.1);
}

.window-dot.red {
  background: #ff5f57;
}

.window-dot.yellow {
  background: #febc2e;
}

.window-dot.green {
  background: #28c840;
}

.window-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.window-body {
  background: transparent;
}

.screenshot {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-dark {
  display: none;
}

.dark-mode .screenshot-light {
  display: none;
}

.dark-mode .screenshot-dark {
  display: block;
}

.window-title-dark {
  display: none;
}

.dark-mode .window-title-light {
  display: none;
}

.dark-mode .window-title-dark {
  display: block;
}

/* Section headings */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-top: 16px;
  max-width: 500px;
  margin-inline: auto;
}

/* Features */
.features {
  padding: clamp(40px, 5vw, 64px);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  margin-bottom: 80px;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: radial-gradient(ellipse at top left, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}

.feature-card {
  position: relative;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent), var(--border) 50%);
  box-shadow: var(--shadow), 0 0 0 1px var(--accent-soft);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card-large {
  grid-column: span 1;
  grid-row: span 2;
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: var(--accent);
  transition: transform var(--transition);
}

.feature-card:hover .feature-icon {
  transform: scale(1.05) rotate(-3deg);
  background: color-mix(in srgb, var(--accent-soft), var(--accent) 15%);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-visual {
  margin-top: 24px;
}

.drop-zone-demo {
  position: relative;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.drop-zone-border {
  position: absolute;
  inset: 0;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

.drop-zone-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-files {
  display: flex;
  gap: 8px;
  transform: rotate(-3deg);
}

.drop-file {
  width: 50px;
  height: 60px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.feature-card:not(.faq-item) {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  align-content: start;
}

.feature-card:not(.faq-item) .feature-icon {
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 10px;
}

.feature-card:not(.faq-item) .feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card:not(.faq-item) h3 {
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
}

.feature-card:not(.faq-item) > p,
.feature-card:not(.faq-item) .feature-visual {
  grid-column: 1 / -1;
}

.feature-card:not(.faq-item) .feature-visual {
  margin-top: 0;
}

/* FAQ uses the same native disclosures at every screen size. */
.faq-item summary {
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 5px;
  border-radius: 4px;
}

#faq .features-grid {
  grid-template-columns: 1fr;
  max-width: 640px;
  margin-inline: auto;
  gap: 12px;
  align-items: start;
}

.faq-item {
  padding: 0;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 16px;
}

.faq-item summary h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  text-wrap: initial;
}

.faq-item summary::after {
  content: '';
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-right: 3px;
}

.faq-item[open] summary::after {
  transform: rotate(225deg);
}

.faq-item p {
  padding: 0 16px 20px;
}

.faq-item:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}

.faq-item:hover::before {
  opacity: 0;
}

.faq-item summary:focus-visible {
  outline-offset: -4px;
}

/* Supported formats */
.formats-section {
  margin-top: 32px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

.formats-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.formats-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.formats-arrow {
  display: flex;
  align-items: center;
  color: var(--accent);
}

.formats-output {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-text);
  padding: 6px 14px;
  background: var(--accent-soft);
  border-radius: 999px;
}

.formats-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.format-chip {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  transition: transform var(--transition);
}

.format-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* Download call to action */
.cta-section {
  margin-bottom: 80px;
}

.cta-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 56px 64px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at bottom right, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 500px;
}

.cta-content h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.cta-content p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.cta-decoration {
  position: relative;
  z-index: 1;
}

.cta-logo {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 20px 40px rgba(138, 226, 52, 0.3));
}

/* Product previews and support */
.preview-showcase {
  max-width: 1000px;
  margin: 0 auto 48px;
  text-align: center;
}

.preview-showcase img {
  display: block;
  width: 100%;
  height: auto;
}

.resize-showcase {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 32px;
  align-items: center;
  padding: 64px 0;
}

.resize-showcase .section-title {
  margin: 0;
}

.resize-showcase .section-subtitle {
  margin-inline: 0;
  line-height: 1.6;
  text-align: left;
}

.resize-showcase img {
  width: 100%;
  height: auto;
}

.support-section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.support-section h2 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.4;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}

.support-section p {
  max-width: 620px;
  color: var(--text-muted);
  line-height: 1.7;
}

.support-section .keep-together {
  white-space: nowrap;
}

.support-section h2 a {
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  white-space: nowrap;
}

.support-section h2 a:hover {
  text-decoration-color: currentColor;
}

/* Responsive layout: tablet, compact, and phone. */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    min-height: auto;
    padding: 24px 0 48px;
  }

  .hero-content {
    max-width: 600px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card-large {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .resize-showcase {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 0;
  }
  .preview-showcase {
    margin-bottom: 32px;
  }

  .hero-visual {
    padding: 0 20px;
  }

  .screenshot-glow {
    inset: -20px;
  }

  .features {
    padding: 32px 24px;
  }

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

  .feature-card-large {
    grid-column: span 1;
  }

  .cta-card {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 40px 24px;
  }

  .cta-content {
    text-align: left;
  }

  .cta-actions {
    justify-content: flex-start;
  }

  .cta-actions .app-store-badge {
    width: auto;
  }

  .cta-decoration {
    order: -1;
  }

  .cta-logo {
    width: 80px;
    height: 80px;
  }
}

/* Phones: prioritize readable copy and the actual app screenshots. */
@media (max-width: 560px) {
  .hero {
    gap: 24px;
    padding: 16px 0 40px;
  }

  .hero-visual {
    padding: 0;
  }

  .hero .window-bar,
  .hero .screenshot-glow {
    display: none;
  }

  .hero .screenshot-frame,
  .hero .screenshot-frame:hover {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .title {
    font-size: clamp(32px, 9vw, 44px);
  }

  .title-line {
    white-space: normal;
  }

  .cta-row {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 24px;
  }

  .cta-row .app-store-badge {
    width: auto;
    flex-shrink: 0;
  }

  .cta-row .btn-secondary {
    width: auto;
    min-height: 44px;
    height: auto;
    min-width: 0;
    flex: 1;
    gap: 5px;
    padding: 10px 0;
    background: transparent;
    border-color: transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
  }

  .cta-row .btn-secondary svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .cta-row .btn-secondary:hover {
    color: var(--text-muted);
  }

  .app-store-badge {
    width: 100%;
  }

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

  .app-store-badge-large .app-store-badge-img {
    height: 52px;
  }

  .trust-signals {
    flex-wrap: nowrap;
    justify-content: space-evenly;
    margin-inline: -4px;
    gap: 0;
  }

  .trust-item {
    font-size: clamp(9px, 2.6vw, 12px);
    line-height: 1.5;
    white-space: nowrap;
    gap: 4px;
  }

  .trust-item svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
  }

  .features {
    padding: 24px 0;
    margin-bottom: 24px;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .features::before {
    display: none;
  }

  .section-header {
    margin-bottom: 24px;
  }

  .section-title {
    font-size: clamp(26px, 7vw, 32px);
    line-height: 1.2;
    text-wrap: balance;
  }

  .section-title .desktop-break {
    display: none;
  }

  .section-title .heading-line {
    display: block;
  }

  .section-subtitle {
    font-size: 16px;
    line-height: 1.6;
    text-wrap: pretty;
  }

  .features-grid {
    gap: 12px;
  }

  .feature-card:not(.faq-item) {
    padding: 24px 20px;
  }

  .formats-section {
    padding: 20px 16px;
    margin-top: 20px;
  }

  .formats-header {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .formats-label {
    font-size: clamp(9px, 2.8vw, 12px);
    white-space: nowrap;
  }

  .formats-arrow svg {
    width: 16px;
    height: 16px;
  }

  .formats-output {
    font-size: 13px;
    padding: 5px 10px;
  }

  .format-chip {
    padding: 7px 10px;
  }

  .resize-showcase {
    gap: 24px;
    padding: 24px 0 40px;
  }

  .support-section {
    padding: 32px 0;
  }

  .support-section h2 {
    font-size: clamp(16px, 4.4vw, 22px);
    white-space: nowrap;
  }

  .cta-section {
    margin-bottom: 32px;
  }

  .cta-card {
    padding: 28px 20px;
    gap: 24px;
  }

  .cta-content h2 {
    font-size: clamp(24px, 6vw, 28px);
    text-wrap: balance;
    line-height: 1.2;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .faq-item summary::after {
    transition: transform 250ms ease-in-out;
  }
}
