/* Bella Copia: "paper and ink" palette, the same as the app (src/app.css). */
:root {
  --paper: #f5efe3;
  --sheet: #fffdf8;
  --sheet-2: #f0e9db;
  --ink: #1d2a3f;
  --muted: #5f6576; /* a little darker than the app: 4.5:1 on paper */
  --line: #e4dccb;
  --accent: #23406b;
  --on-accent: #ffffff;
  --terracotta: #c2643a;
  --terracotta-2: #dd8a4f;
  --terracotta-text: #a8532e; /* terracotta readable as small text */
  --studio: #3b5f94;
  --todo-bg: #ffe28a;
  --todo-ink: #3d2c00;
  --radius: 14px;
  --shadow-1: 0 1px 2px rgb(40 30 10 / 6%), 0 2px 8px rgb(40 30 10 / 5%);
  --shadow-2: 0 2px 6px rgb(40 30 10 / 8%), 0 22px 48px rgb(40 30 10 / 14%);
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14171c;
    --sheet: #1c2027;
    --sheet-2: #252a33;
    --ink: #ece7dd;
    --muted: #a3aab8;
    --line: #313744;
    --accent: #8db0e8;
    --on-accent: #0f141c;
    --terracotta: #e08a58;
    --terracotta-2: #f0a873;
    --terracotta-text: #e89a6c;
    --studio: #8db0e8;
    --todo-bg: #6b5300;
    --todo-ink: #fff3c4;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-2: 0 2px 6px rgb(0 0 0 / 35%), 0 22px 48px rgb(0 0 0 / 45%);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5vw + 0.5rem, 3.3rem);
  margin: 0 0 0.4em;
}

h2 {
  font-size: clamp(1.6rem, 2.5vw + 0.6rem, 2.2rem);
  margin: 0 0 0.5em;
}

h3 {
  font-size: 1.25rem;
  margin: 0 0 0.4em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--sheet-2);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  overflow-wrap: anywhere;
}

mark.todo {
  background: var(--todo-bg);
  color: var(--todo-ink);
  font-weight: 600;
  padding: 0.05em 0.3em;
  border-radius: 4px;
  outline: 1px dashed currentColor;
}

.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

.wrap.narrow {
  width: min(760px, 100% - 32px);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* --- Header and footer ----------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand img,
.footer-brand img {
  border-radius: 8px;
  outline: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.site-header ul,
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.site-header nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-header nav a:hover {
  background: var(--sheet-2);
}

.site-header nav a[aria-current="page"] {
  background: var(--sheet-2);
  font-weight: 600;
}

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

  .site-header nav a {
    padding: 8px 9px;
  }

  .brand {
    font-size: 1.15rem;
  }
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: var(--sheet);
  padding: 36px 0 44px;
  font-size: 0.92rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 32px;
  align-items: center;
}

.footer-brand {
  font-size: 1.15rem;
}

.site-footer nav ul {
  justify-content: flex-end;
  gap: 4px 20px;
}

.footer-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .site-footer nav ul {
    justify-content: flex-start;
  }
}

/* --- Buttons ---------------------------------------------------------------- */

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 16px;
}

.store-button,
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 20px 8px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: var(--shadow-1);
}

.store-button small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

a.store-button:hover,
.button:hover {
  filter: brightness(1.15);
}

.store-button.is-soon {
  background: var(--sheet);
  color: var(--ink);
  border: 1.5px dashed var(--line);
  box-shadow: none;
  cursor: default;
}

.store-button.is-soon small {
  color: var(--terracotta-text);
  opacity: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  vertical-align: middle;
}

.badge-pro {
  background: var(--terracotta-text);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .badge-pro {
    color: #1d1208;
  }
}

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

.hero {
  padding: 56px 0 40px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta-text);
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36em;
}

.hero-small {
  font-size: 0.95rem;
  color: var(--muted);
}

.hero-figure {
  margin: 0;
}

.paper-stack {
  position: relative;
  transform: rotate(1.5deg);
}

.paper-stack::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--sheet-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  transform: rotate(-4deg) translate(-10px, 8px);
}

.paper-stack img {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #e4dccb;
  box-shadow: var(--shadow-2);
  background: #fff;
}

.hero-figure figcaption {
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .hero {
    padding-top: 32px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-figure {
    max-width: 520px;
    margin-inline: auto;
    padding-inline: 8px;
  }
}

/* --- Sections ---------------------------------------------------------------- */

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--sheet);
  border-block: 1px solid var(--line);
}

.section-lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 32px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.steps li {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-1);
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.step-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 28px;
}

/* Quattro schede: 2×2 sugli schermi medi, mai 3 + 1. */
.features-four {
  grid-template-columns: 1fr;
}

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

@media (min-width: 1100px) {
  .features-four { grid-template-columns: repeat(4, 1fr); }
}

.feature p {
  color: var(--muted);
  margin: 0;
}

.feature p + p {
  margin-top: 10px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  fill: none;
  stroke: var(--terracotta);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Plans -------------------------------------------------------------------- */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.plan {
  display: flex;
  flex-direction: column;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-1);
}

.plan header {
  margin-bottom: 18px;
}

.plan h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
}

.price {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
}

.price small {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}

.price-note {
  margin: 2px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.plan-pro {
  border: 2px solid var(--terracotta);
  box-shadow: 0 8px 28px rgb(194 100 58 / 16%);
}

.plan-pro .price-note {
  color: var(--terracotta-text);
  font-weight: 600;
}

.plan-studio {
  border: 2px solid var(--studio);
}

.plan-foot {
  margin: auto 0 0;
  padding-top: 18px;
  font-size: 0.92rem;
  color: var(--muted);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist li {
  position: relative;
  padding-left: 28px;
  line-height: 1.45;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.32em;
  width: 16px;
  height: 9px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg) scale(0.8);
}

.plan-pro .checklist li::before {
  border-color: var(--terracotta);
}

.plan-studio .checklist li::before {
  border-color: var(--studio);
}

.fine-print {
  margin-top: 22px;
  font-size: 0.92rem;
  color: var(--muted);
}

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

.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 48px 16px 20px;
  font-weight: 600;
  position: relative;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--terracotta-text);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
}

.faq-more {
  margin-top: 24px;
}

/* --- Call to action ---------------------------------------------------------- */

.cta-inner {
  text-align: center;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 44px 24px;
  box-shadow: var(--shadow-1);
}

.cta-inner .store-buttons {
  justify-content: center;
}

.cta-inner p {
  color: var(--muted);
}

/* --- Text pages ---------------------------------------------------------------- */

main > article,
.not-found {
  padding-top: 48px;
}

.legal h2 {
  font-size: 1.5rem;
  margin-top: 1.8em;
}

.legal h3 {
  font-size: 1.15rem;
  margin-top: 1.4em;
}

.legal ul,
.support-section ol {
  padding-left: 1.3em;
}

.legal li,
.support-section li {
  margin-bottom: 0.4em;
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
}

.summary {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0;
}

.summary h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.legal .summary ul {
  padding-left: 0;
}

.notice {
  border-left: 4px solid var(--terracotta);
  background: var(--sheet);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin: 20px 0;
}

.contact-card {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 28px 0 8px;
  box-shadow: var(--shadow-1);
}

.contact-card h2 {
  font-size: 1.3rem;
}

.contact-card p:last-child {
  margin: 0;
  color: var(--muted);
}

.contact-email {
  font-size: 1.25rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.support-section {
  margin-top: 40px;
}

.support-section h3 {
  margin-top: 1em;
}

.not-found {
  text-align: center;
  min-height: 50vh;
}

.not-found-code {
  font-family: var(--serif);
  font-size: 5rem;
  font-weight: 600;
  line-height: 1;
  margin: 0 0 8px;
  color: var(--terracotta-text);
}

.not-found .lead {
  margin-inline: auto;
}

.not-found .button {
  margin: 8px 0 16px;
}

.section.cta {
  padding-bottom: 0;
}
