/* Tassa Silenziosa website. Same palette and fonts as the app (ios/TassaSilenziosa/Design/Theme.swift). */

@font-face { font-family: "Manrope"; src: url("fonts/Manrope-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/Manrope-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("fonts/Bricolage-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --page: #EDF1EF;
  --ink: #14201C;
  --muted: #56655F;
  --soft: #3B4A45;
  --surface: #FFFFFF;
  --line: #CDD7D3;
  --tile: #F3F6F5;
  --red: #B0392C;
  --accent: #C0402F;
  --green: #17695C;
  --shadow: 0 10px 30px rgba(20, 32, 28, 0.08);
  --shadow-lift: 0 22px 50px -12px rgba(20, 32, 28, 0.22);
  --glass: rgba(237, 241, 239, 0.72);
  --bezel: #1A2421;
  --aura-green: rgba(23, 105, 92, 0.13);
  --aura-red: rgba(192, 64, 47, 0.11);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0B1210;
    --ink: #E4ECE9;
    --muted: #95A6A0;
    --soft: #B7C4BF;
    --surface: #17221F;
    --line: #2C3A36;
    --tile: #1F2C28;
    --red: #FF8A75;
    --accent: #E8705F;
    --green: #4DB6A3;
    --shadow: none;
    --shadow-lift: 0 22px 50px -12px rgba(0, 0, 0, 0.6);
    --glass: rgba(11, 18, 16, 0.7);
    --bezel: #2A3632;
    --aura-green: rgba(77, 182, 163, 0.16);
    --aura-red: rgba(232, 112, 95, 0.12);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.6 "Manrope", system-ui, -apple-system, sans-serif;
}

a { color: var(--green); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 700; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* Header: glass bar that stays on top */
.top {
  position: sticky; top: 0; z-index: 10; padding: 14px 0;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.top.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(0, 0, 0, 0.5); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 11px; transition: transform 0.4s var(--ease); }
.brand:hover img { transform: rotate(-6deg) scale(1.05); }
.brand span { font: 800 20px/1.05 "Bricolage", "Manrope", sans-serif; }
.brand span em { display: block; font-style: normal; color: var(--muted); }
.nav { display: flex; gap: 20px; font-weight: 700; font-size: 15px; }
.nav a { position: relative; color: var(--soft); text-decoration: none; padding: 4px 0; transition: color 0.2s; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Hero */
.hero { position: relative; padding: 40px 0 72px; overflow: hidden; isolation: isolate; }
/* Slow coloured aura behind the hero */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); pointer-events: none;
}
.hero::before { width: 560px; height: 560px; right: -120px; top: -140px; background: var(--aura-green); }
.hero::after { width: 460px; height: 460px; left: -160px; bottom: -200px; background: var(--aura-red); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
h1, h2, h3 { font-family: "Bricolage", "Manrope", sans-serif; font-weight: 800; line-height: 1.12; margin: 0 0 16px; }
h1 { font-size: clamp(34px, 5.4vw, 58px); letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 3.4vw, 36px); margin-top: 8px; }
h3 { font-size: 21px; }
.lead { font-size: 20px; color: var(--soft); margin: 0 0 24px; }
.define { font-size: 16px; color: var(--soft); margin: -8px 0 24px; max-width: 34em; }
.kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 10px; }
.red { color: var(--red); }
h1 .red {
  background: linear-gradient(var(--red), var(--red)) no-repeat left 94% / 100% 0.08em;
  padding-bottom: 0.04em;
}
.soon {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lift);
  background: var(--ink); color: var(--page);
  border-radius: 14px; padding: 12px 18px; font-weight: 700; font-size: 16px;
}
.soon small { font-weight: 400; opacity: 0.75; }
.soon::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
}

.phones { display: flex; gap: 22px; justify-content: center; align-items: flex-start; perspective: 1400px; }
/* An iPhone-like frame around each screenshot */
.device {
  width: 48%; max-width: 260px; padding: 7px; border-radius: 40px;
  background: var(--bezel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 60px -20px rgba(20, 32, 28, 0.45);
  transform: rotateY(10deg) rotateX(2deg);
}
.device + .device { margin-top: 56px; transform: rotateY(-10deg) rotateX(2deg); }
.device img { display: block; width: 100%; height: auto; border-radius: 33px; background: var(--surface); }

/* Sections */
section { padding: 56px 0; }
section.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.card {
  background: var(--tile); border-radius: 20px; padding: 24px;
  border: 1px solid transparent;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line); }
.example.card:hover { border-color: var(--line); }
.example.etf.card:hover { border-color: var(--green); }
.band .card { background: var(--page); }
.card p { margin: 0; color: var(--soft); }
.card h3 { margin-bottom: 8px; }
.num { font: 800 44px/1 "Bricolage", sans-serif; color: var(--red); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.num.green { color: var(--green); }

/* Long text pages (privacy, support) */
.doc { padding: 24px 0 64px; }
.doc h1 { font-size: clamp(32px, 4.6vw, 46px); }
.doc h2 { font-size: 26px; margin-top: 40px; }
.doc h3 { font-size: 19px; margin-top: 24px; margin-bottom: 8px; font-family: "Manrope", sans-serif; font-weight: 700; }
.doc p, .doc li { color: var(--soft); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .updated { color: var(--muted); font-size: 15px; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 24px; margin: 24px 0; }
.summary ul, .summary p { margin: 0; }
.summary li { color: var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 700; color: var(--ink); }
td { color: var(--soft); }
.table-wrap { overflow-x: auto; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin: 12px 0; transition: border-color 0.3s, box-shadow 0.3s; }
details:hover, details[open] { border-color: var(--green); }
details[open] { box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 12px 0 0; }

/* Examples page (generated: site/public/esempi/) */
.examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 28px 0; }
.example { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.example.etf { border: 2px solid var(--green); }
.example h2 { font-size: 20px; margin: 0 0 8px; }
.example .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 18px; }
.example .facts div { background: var(--tile); border-radius: 12px; padding: 10px 12px; }
.example dt { font-size: 12px; color: var(--muted); }
.example dd { margin: 0; font-weight: 700; color: var(--ink); }
.example .num { font-size: 40px; margin-bottom: 2px; }
.bar { height: 8px; border-radius: 4px; background: var(--line); margin: 12px 0 14px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 4px; background: var(--red); transform-origin: left; }
.etf .bar span { background: var(--green); }
.example .small { font-size: 15px; }

/* "Esempio completo" page: one chapter of the sheet per step, phone and text side by side */
.intro { padding: 32px 0 48px; }
.intro h1 { font-size: clamp(32px, 4.6vw, 46px); }
.button {
  display: inline-block; background: var(--ink); color: var(--page); text-decoration: none;
  border-radius: 14px; padding: 12px 20px; font-weight: 700; box-shadow: var(--shadow-lift);
  transition: transform 0.3s var(--ease);
}
.button:hover { transform: translateY(-2px); }
.note { color: var(--muted); font-size: 15px; }
.pro {
  display: inline-block; vertical-align: middle; margin-left: 6px; padding: 1px 9px; border-radius: 999px;
  background: var(--ink); color: var(--page); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: none;
}
.real {
  display: inline-block; margin: 0 0 12px; padding: 3px 12px; border-radius: 999px; border: 1.5px solid var(--red);
  color: var(--red); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
}
.card .real { margin: 0 0 10px; font-size: 12px; padding: 2px 10px; width: fit-content; align-self: flex-start; }
.history { margin-top: 24px; padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.history h3 { margin: 0 0 8px; }
.history table { width: 100%; border-collapse: collapse; margin: 12px 0; font-variant-numeric: tabular-nums; }
.history th, .history td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); }
.history th:first-child { text-align: left; }
.history td:first-of-type { color: var(--red); font-weight: 700; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 72px; }
.step { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: center; perspective: 1400px; }
.step:nth-child(even) { grid-template-columns: 1fr 260px; }
.step:nth-child(even) .device { order: 2; }
.step .text h2 { margin-top: 0; }
.step .text p, .step .text li { color: var(--soft); }
.step .text ul { padding-left: 20px; margin: 0; }
.step .text li { margin-bottom: 8px; }
.device.flat { width: 100%; max-width: 260px; justify-self: center; transform: none; }

@media (max-width: 820px) {
  .step { grid-template-columns: 1fr; gap: 28px; }
  .step:nth-child(even) { grid-template-columns: 1fr; }
  .step:nth-child(even) .device { order: 0; }
  .device.flat { max-width: 240px; }
  .steps { gap: 56px; }
}

/* Footer */
footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer p { margin: 0 0 6px; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .device { transform: rotateY(6deg); }
  .device + .device { transform: rotateY(-6deg); }
  .grid3 { grid-template-columns: 1fr; }
  .hero { padding-top: 16px; }
}

/* Motion. Nothing moves with "Reduce motion" on; without the script, scroll reveals are skipped and the page is static. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  @keyframes underline { from { background-size: 0% 0.08em; } to { background-size: 100% 0.08em; } }
  @keyframes drift-a { 50% { transform: translate(-60px, 50px) scale(1.12); } }
  @keyframes drift-b { 50% { transform: translate(70px, -40px) scale(0.92); } }
  @keyframes float-a { 50% { translate: 0 -10px; } }
  @keyframes float-b { 50% { translate: 0 10px; } }
  @keyframes device-in { from { opacity: 0; translate: 0 60px; } to { opacity: 1; translate: 0 0; } }
  @keyframes shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

  .hero::before { animation: drift-a 18s ease-in-out infinite; }
  .hero::after { animation: drift-b 22s ease-in-out infinite; }

  .hero .kicker, .hero h1, .hero .lead, .hero .define, .hero .soon { animation: rise 0.9s var(--ease) both; }
  .hero h1 { animation-delay: 0.08s; }
  .hero .lead { animation-delay: 0.22s; }
  .hero .define { animation-delay: 0.28s; }
  .hero .soon { animation-delay: 0.34s; }
  h1 .red { animation: underline 0.9s var(--ease) 1s both; }
  .soon::after { animation: shine 5s ease-in-out 2s infinite; }

  .device { animation: device-in 1.1s var(--ease) 0.25s both, float-a 7s ease-in-out 1.4s infinite; }
  .device + .device { animation: device-in 1.1s var(--ease) 0.42s both, float-b 8s ease-in-out 1.6s infinite; }

  .doc > .wrap > h1, .doc > .wrap > .kicker, .doc > .wrap > .lead, .doc > .wrap > p:first-of-type { animation: rise 0.8s var(--ease) both; }
  .doc > .wrap > h1 { animation-delay: 0.06s; }

  .intro .kicker, .intro h1, .intro .lead { animation: rise 0.8s var(--ease) both; }
  .intro h1 { animation-delay: 0.06s; }
  .intro .lead { animation-delay: 0.16s; }
  .device.flat { animation: none; }
  .motion .step.reveal .device { transform: rotateY(14deg) translateX(-24px); transition: transform 1.1s var(--ease) 0.1s; }
  .motion .step.reveal:nth-child(even) .device { transform: rotateY(-14deg) translateX(24px); }
  .motion .step.reveal.in .device { transform: none; }

  /* Scroll reveal (classes set by site.js) */
  .motion .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--delay, 0ms); }
  .motion .reveal.in { opacity: 1; transform: none; }
  .motion .card.reveal.in { transition: opacity 0.8s var(--ease) var(--delay, 0ms), transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s; }
  .motion .card.reveal.in:hover { transform: translateY(-4px); }
  .motion .reveal .bar span { transform: scaleX(0); transition: transform 1.4s var(--ease) calc(var(--delay, 0ms) + 0.3s); }
  .motion .reveal.in .bar span { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .card:hover { transform: none; }
}
