/* ---------------------------------------------------------------------
   Listoria — promotional website styles
   Mobile-first. Structural layout inspired by todoist.com (header, hero,
   feature highlights, footer) — not a visual clone.
--------------------------------------------------------------------- */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f7f6f3;
  --color-text: #1c1c1e;
  --color-text-muted: #5c5c66;
  --color-border: #e5e4e0;
  --color-primary: #2e9ef0;
  --color-primary-dark: #0e74bf;
  --color-primary-contrast: #ffffff;
  --color-accent: #2f6f4e;
  --color-placeholder-bg: #ece9ff;
  --color-placeholder-border: #b9b0f0;
  --color-placeholder-text: #4b3fa0;
  --color-focus: #2b6fd1;

  --max-width: 1160px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Fixed, because the mobile menu is positioned below the header by height. */
  --app-banner-height: 64px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  font-size: 16px;
}

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

a {
  color: inherit;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}

p {
  margin: 0 0 var(--space-4);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-4);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.3rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

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

.btn-primary:hover {
  background: var(--color-primary-dark);
}

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

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

.btn-large {
  padding: 0.9rem 1.8rem;
  font-size: 1.05rem;
}

.btn[aria-disabled="true"],
.icon-link[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --- Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
}

/* The blur lives on a pseudo-element: backdrop-filter on the header itself
   would become the containing block of the fixed mobile menu and collapse it. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

/* "Get the app" banner: first thing in the header, phones only (js/main.js). */
.app-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: var(--app-banner-height);
  padding: 0 var(--space-4) 0 var(--space-2);
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

/* The class's display would otherwise beat the hidden attribute. */
.app-banner[hidden] {
  display: none;
}

.app-banner-close {
  flex: none;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.app-banner-icon {
  flex: none;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.app-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  font-size: 0.95rem;
}

.app-banner-subtitle {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-banner-cta {
  flex: none;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.header-signin {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  text-decoration: none;
}

.nav-signin {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: transform 0.15s ease;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.primary-nav {
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--color-bg);
  padding: var(--space-5);
  display: none;
  flex-direction: column;
  gap: var(--space-5);
  overflow-y: auto;
  border-top: 1px solid var(--color-border);
}

.primary-nav.is-open {
  display: flex;
}

html.has-app-banner .primary-nav {
  top: calc(64px + var(--app-banner-height));
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
  padding: var(--space-2) 0;
}

.nav-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.lang-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-select-icon {
  position: absolute;
  left: 0.65rem;
  color: var(--color-text-muted);
  pointer-events: none;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.75rem 0.5rem 2.15rem;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='14' height='14' fill='none' stroke='%235c5c66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}

.lang-select:hover {
  background-color: var(--color-bg-alt);
  border-color: var(--color-border);
}

@media (min-width: 860px) {
  .nav-toggle,
  .header-signin {
    display: none;
  }

  .nav-signin {
    display: inline;
  }

  .primary-nav {
    position: static;
    inset: auto;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border-top: none;
    gap: var(--space-6);
    flex: 1;
    justify-content: flex-end;
    overflow: visible;
  }

  .nav-links {
    flex-direction: row;
    gap: var(--space-6);
  }

  .nav-actions {
    flex-direction: row;
    align-items: center;
  }
}

/* --- Hero --- */

.hero {
  padding: var(--space-8) 0;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.hero .container {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.hero-copy {
  container-type: inline-size;
}

/* Capped by the column width (cqi) so the first two sentences fit on one line. */
.hero-tagline {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-size: min(clamp(2rem, 6vw, 3.2rem), 9.5cqi);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

/* Longer sentences in these languages. */
:lang(it) .hero-tagline,
:lang(fr) .hero-tagline {
  font-size: min(clamp(2rem, 6vw, 3.2rem), 8.25cqi);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.placeholder-box {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-placeholder-bg);
  border: 2px dashed var(--color-placeholder-border);
  color: var(--color-placeholder-text);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.95rem;
  padding: var(--space-5);
  min-height: 220px;
}

.hero-image {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
}

@media (min-width: 860px) {
  .hero .container {
    grid-template-columns: 1.1fr 1fr;
  }
}

/* --- Section shared --- */

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

.section-alt {
  background: var(--color-bg-alt);
}

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-7);
}

.section-heading h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.section-heading p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* --- Use case carousel --- */

.usecases {
  position: relative;
}

.usecase-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: var(--space-6);
  padding-bottom: var(--space-4);
  scrollbar-width: none;
}

.usecase-track::-webkit-scrollbar {
  display: none;
}

.usecase-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: grid;
  gap: var(--space-5);
  align-items: center;
}

.usecase-slide:nth-child(even) .usecase-copy {
  order: 2;
}

@media (min-width: 860px) {
  .usecase-slide {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-7);
  }
}

.usecase-copy h3 {
  font-size: 1.5rem;
}

.usecase-copy p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.usecase-image {
  min-height: 220px;
}

img.usecase-image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Use-case slides: three screenshots cross-fading in a loop (4s each). */
.usecase-fader {
  position: relative;
  aspect-ratio: 1566 / 1353;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.usecase-fader img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: usecase-fade 12s infinite both;
}

.usecase-fader img:nth-child(1) {
  object-position: right center;
  animation-delay: -1s;
}

.usecase-fader img:nth-child(2) {
  animation-delay: 3s;
}

.usecase-fader img:nth-child(3) {
  animation-delay: 7s;
}

@keyframes usecase-fade {
  0% { opacity: 0; }
  8.333% { opacity: 1; }
  33.333% { opacity: 1; }
  41.667% { opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .usecase-fader img {
    animation: none;
  }

  .usecase-fader img:first-child {
    opacity: 1;
  }
}

.usecase-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.usecase-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

.usecase-nav:hover {
  border-color: var(--color-text-muted);
}

.usecase-dots {
  display: flex;
  gap: var(--space-2);
}

.usecase-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--color-border);
  cursor: pointer;
  padding: 0;
}

.usecase-dot.is-active {
  background: var(--color-primary);
}

/* --- Pricing --- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
  align-items: stretch;
  gap: var(--space-5);
}

@media (max-width: 640px) {
  .pricing-grid {
    grid-template-columns: minmax(0, 380px);
  }
}

.pricing-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.pricing-card-highlight {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg, var(--shadow-md));
}

.pricing-plan-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
}

.pricing-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.pricing-amount {
  font-size: 2.6rem;
  font-weight: 800;
}

.pricing-suffix {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.pricing-note {
  font-size: 0.85rem;
  color: var(--color-primary-dark);
  background: #f1f9fe;
  border: 1px solid #d0e9fc;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-5);
}

.pricing-note--warning {
  color: #b45309;
  background: #fff4e6;
  border-color: #fcd9ad;
}

.pricing-features-heading {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.pricing-features {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.pricing-features li::before {
  content: "\2713";
  color: var(--color-accent);
  font-weight: 700;
  flex: none;
}

.pricing-card .btn {
  width: 100%;
}

/* --- Download --- */

.download {
  text-align: center;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  background: var(--color-bg);
}

.store-badge:hover {
  border-color: var(--color-text-muted);
}

.store-badge-icon {
  font-size: 1.4rem;
}

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

.store-badge-text small {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.download-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0 0;
}

.download-qr[hidden] {
  display: none;
}

.download-qr img {
  width: 168px;
  height: 168px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-1);
  background: #ffffff;
}

.download-qr figcaption {
  max-width: 30ch;
  text-wrap: balance;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* --- Link groups --- */

.link-groups {
  background: var(--color-bg-alt);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.link-groups .container {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .link-groups .container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .link-groups .container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.link-group h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.link-group ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.link-group a {
  text-decoration: none;
  font-weight: 500;
}

.link-group a:hover {
  text-decoration: underline;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  font-weight: 500;
}

.icon-link svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) 0;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

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

.footer-legal-links a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* --- Legal stub pages --- */

.legal-main {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-5);
}

.legal-main h1 {
  font-size: 1.8rem;
}

.legal-placeholder {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
}

/* --- Legal pages' text (legal/privacy.html) --- */

.legal-content h2 {
  margin: var(--space-6) 0 var(--space-2);
  font-size: 1.25rem;
  /* Keeps a section linked by #id clear of the sticky header. */
  scroll-margin-top: 5rem;
}

.legal-content h3 {
  margin: var(--space-5) 0 var(--space-2);
  font-size: 1.05rem;
  scroll-margin-top: 5rem;
}

.legal-content p,
.legal-content ul {
  margin: var(--space-2) 0 0;
}

/* The site-wide reset removes list markers; these are real bullet points. */
.legal-content ul {
  padding-left: var(--space-5);
  list-style: disc;
}

.legal-content li + li {
  margin-top: var(--space-2);
}

.legal-content a:not(.back-home) {
  color: var(--color-primary-dark);
}

.legal-updated {
  color: var(--color-text-muted);
}

/* A fact still to fill in before the page is published. */
.legal-todo {
  padding: 0 0.3em;
  border: 1px dashed var(--color-placeholder-border);
  border-radius: var(--radius-sm);
  color: var(--color-placeholder-text);
  background: var(--color-placeholder-bg);
}

/* --- Glossary page --- */

.glossary-list {
  margin: var(--space-6) 0 0;
}

.glossary-list dt {
  position: relative;
  margin-top: var(--space-5);
  padding-left: 3rem;
  min-height: 2.25rem;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  /* Keeps a term linked by #id clear of the sticky header. */
  scroll-margin-top: 5rem;
}

/* Colored icon next to a glossary term or an FAQ question. Each one sets
   its own --icon-color inline (glossary.html, faq.html). */
.icon-tile {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--icon-color, var(--color-primary));
  background: color-mix(in srgb, var(--icon-color, var(--color-primary)) 14%, transparent);
}

.glossary-list dd {
  margin: var(--space-1) 0 0 3rem;
  color: var(--color-text-muted);
}

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

.faq-list {
  margin-top: var(--space-6);
}

.faq-item {
  position: relative;
  padding: var(--space-5) 0 var(--space-5) 3rem;
  border-top: 1px solid var(--color-border);
  /* Keeps a question linked by #id clear of the sticky header. */
  scroll-margin-top: 5rem;
}

.faq-item .icon-tile {
  top: var(--space-5);
}

.faq-item h2 {
  margin: 0;
  min-height: 2.25rem;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.faq-item p,
.faq-item ul,
.faq-item ol {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
}

/* The site-wide reset removes list markers; these are real bullet points
   (and, in delete-account.html, numbered steps). */
.faq-item ul,
.faq-item ol {
  padding-left: var(--space-5);
  list-style: disc;
}

.faq-item ol {
  list-style: decimal;
}

/* A button under an item's text (delete-account.html). */
.faq-item-action {
  margin-top: var(--space-4);
}

.faq-item li + li {
  margin-top: var(--space-1);
}

.back-home {
  display: inline-block;
  margin-top: var(--space-6);
  text-decoration: none;
  font-weight: 600;
  color: var(--color-primary);
}
