/* PayTapAndGo — sito di presentazione
 * Design originale, ispirato a un mood editoriale notturno.
 * Non è un clone di alcun template commerciale.
 */

/* ---------- FONT (self-hosted via Bunny Fonts, GDPR-compliant proxy EU) ---------- */
@import url('https://fonts.bunny.net/css?family=instrument-serif:400,400i|inter:300,400,500,600&display=swap');

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Palette: notturno freddo + ottone spento (non gold) */
  --ink-900: #0d1114;
  --ink-800: #131a1e;
  --ink-700: #1c2429;
  --ink-500: #3c4650;
  --line:    #2b3238;
  --paper:   #ecebe4;
  --paper-muted: #b0aca0;
  --paper-dim:   #7a766c;
  --brass:   #b8956a;
  --brass-soft: #d4b891;
  --peach:   #e8d5b7;

  /* Tipografia */
  --font-serif: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- RESET LEGGERO ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Focus visibile per accessibilità */
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- TIPOGRAFIA ---------- */
.display {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-size: clamp(2.75rem, 8vw, 6.5rem);
}
.display--m {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-size: clamp(2rem, 5vw, 3.5rem);
}
.display--s {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
}
.italic { font-style: italic; }
.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--paper-muted);
  max-width: 58ch;
}
.body-note {
  font-size: 0.875rem;
  color: var(--paper-dim);
  line-height: 1.55;
}

/* ---------- LAYOUT UTILITY ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: clamp(4rem, 10vw, 8rem) 0; }
.section--thin { padding: clamp(2rem, 5vw, 4rem) 0; }
.hairline { border: none; border-top: 1px solid var(--line); margin: 0; }
.stack > * + * { margin-top: 1.5rem; }
.grid { display: grid; gap: var(--gutter); }

/* Numero di capitolo (indice tipo taccuino) */
.chapter {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--paper-dim);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}
.chapter::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--brass);
  transform: translateY(-4px);
}

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 17, 20, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.brand em { font-style: italic; color: var(--brass-soft); }
.nav { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); align-items: center; }
.nav a {
  font-size: 0.9rem;
  color: var(--paper-muted);
  transition: color .2s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); }
.nav__cta {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.nav__cta:hover {
  border-color: var(--brass);
  color: var(--ink-900);
  background: var(--brass-soft);
}

/* Menu mobile */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--ink-800);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 1.25rem var(--gutter);
    gap: 1rem;
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
}

/* ---------- HERO ---------- */
.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 9vw, 7rem);
  position: relative;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
}
.hero__eyebrow {
  color: var(--brass);
  font-size: 0.85rem;
  font-weight: 400;
  margin: 0 0 1.5rem 0;
}
.hero__title { margin: 0 0 1.75rem 0; }
.hero__title .italic { color: var(--brass-soft); }
.hero__meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.hero__meta > div span { display: block; }
.hero__meta > div span:first-child {
  font-size: 0.75rem;
  color: var(--paper-dim);
  margin-bottom: 0.25rem;
}
.hero__meta > div span:last-child {
  font-family: var(--font-serif);
  font-size: 1.35rem;
}
.hero__image {
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
  border-radius: 2px;
}
.hero__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.05) brightness(0.9) saturate(0.85);
}
.hero__image::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(13,17,20,0.7));
  pointer-events: none;
}

/* ---------- BOTTONI ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.75rem;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s var(--ease);
  font-size: 15px;
}
.btn--primary {
  background: var(--paper);
  color: var(--ink-900);
}
.btn--primary:hover {
  background: var(--brass-soft);
}
.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--brass);
  color: var(--brass-soft);
}
.btn__arrow {
  transition: transform .2s var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(3px); }

.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- SEZIONI CONTENUTO ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.feature-grid > article {
  background: var(--ink-900);
  padding: 2rem 1.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.feature-grid h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0.5rem 0 0.25rem 0;
  color: var(--paper);
}
.feature-grid p {
  color: var(--paper-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}
.feature-grid .num {
  color: var(--brass);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

/* Sezione con immagine full ---------------------------------------- */
.showcase {
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  display: grid;
  place-items: center;
  color: var(--paper);
  isolation: isolate;
}
.showcase__bg { position: absolute; inset: 0; z-index: -1; }
.showcase__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.55) contrast(1.1);
}
.showcase__inner {
  max-width: 720px;
  padding: 4rem var(--gutter);
  text-align: center;
}

/* Timeline / passi -------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 0; }
.steps li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .step-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--brass);
  line-height: 1;
}
.steps h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
}
.steps p { color: var(--paper-muted); margin: 0; }

/* FAQ --------------------------------------------------------------- */
details {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
}
details:last-of-type { border-bottom: 1px solid var(--line); }
details summary {
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.3;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+';
  color: var(--brass);
  font-size: 1.5rem;
  transition: transform .2s var(--ease);
}
details[open] summary::after { transform: rotate(45deg); }
details p {
  color: var(--paper-muted);
  margin: 1rem 0 0;
  max-width: 65ch;
}

/* ---------- FORM CONTATTI ---------- */
.form {
  display: grid;
  gap: 1.25rem;
}
.form label {
  display: block;
  font-size: 0.85rem;
  color: var(--paper-muted);
  margin-bottom: 0.4rem;
}
.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--ink-800);
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  border-radius: 2px;
  transition: border-color .15s var(--ease);
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--brass);
}
.form textarea { resize: vertical; min-height: 140px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--paper-muted);
  line-height: 1.5;
}
.consent input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 3px;
  accent-color: var(--brass);
  flex-shrink: 0;
}
.consent a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; }
.form-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 2px;
  font-size: 0.9rem;
  display: none;
}
.form-status[data-state="ok"] {
  display: block;
  background: rgba(184,149,106,0.1);
  border: 1px solid var(--brass);
  color: var(--brass-soft);
}
.form-status[data-state="err"] {
  display: block;
  background: rgba(255,90,90,0.08);
  border: 1px solid #b8524b;
  color: #e8b0ac;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--ink-800);
  border-top: 1px solid var(--line);
  margin-top: 6rem;
  padding: 4rem 0 2rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 780px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h5 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--paper-dim);
  margin: 0 0 1rem 0;
  letter-spacing: 0.03em;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.site-footer a { color: var(--paper-muted); font-size: 0.9rem; }
.site-footer a:hover { color: var(--paper); }
.site-footer__bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--paper-dim);
}

/* ---------- PAGINE STATICHE (privacy, cookie) ---------- */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
}
.doc h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 0.5rem 0;
}
.doc h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 3rem 0 1rem 0;
  color: var(--paper);
}
.doc h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  color: var(--paper);
  margin: 1.75rem 0 0.5rem 0;
}
.doc p, .doc li {
  color: var(--paper-muted);
  line-height: 1.7;
}
.doc ul { padding-left: 1.25rem; }
.doc a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; }
.doc .meta { font-size: 0.85rem; color: var(--paper-dim); margin-bottom: 3rem; }

/* ---------- 404 ---------- */
.notfound {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem var(--gutter);
}
.notfound__num {
  font-family: var(--font-serif);
  font-size: clamp(8rem, 20vw, 14rem);
  line-height: 1;
  color: var(--brass);
  margin: 0;
}

/* ---------- HERO REVEAL (unico momento di motion, page load) ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.hero__eyebrow { animation: rise .7s .05s var(--ease) both; }
.hero__title { animation: rise .8s .15s var(--ease) both; }
.hero .lead { animation: rise .8s .25s var(--ease) both; }
.hero .cta-row { animation: rise .8s .35s var(--ease) both; }
.hero__image { animation: rise 1s .1s var(--ease) both; }
.hero__meta { animation: rise .8s .5s var(--ease) both; }
