/* Landing Roam: stessi colori dell'app (RoamStyle in RoamApp.swift). */
:root {
  --red: #e01a30;          /* RoamStyle.red  (0.88, 0.10, 0.19) */
  --red-dark: #bd1125;
  --ink: #202024;
  --muted: #6f7078;
  --paper: #fbfaf9;        /* RoamStyle.canvas */
  --surface: #f7f7fa;      /* RoamStyle.surface */
  --blush: #fff4f0;
  --pink: #f6e6e8;
  --night: #252529;
  --line: #e8e5e4;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
em { color: var(--red); font-style: normal; }
h2 { font-size: clamp(40px, 4.4vw, 62px); line-height: 1.08; letter-spacing: -2.5px; margin: 0; }
.eyebrow { font-size: 12px; font-weight: 750; letter-spacing: 2px; color: var(--red); margin: 0 0 22px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(5%, calc((100% - 1190px) / 2)); background: rgba(251, 250, 249, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; }
.brand { display: flex; align-items: center; font-size: 34px; font-weight: 900; letter-spacing: -2px; }
.brand img { width: 40px; height: 40px; object-fit: contain; margin-right: 8px; border-radius: 11px; }
.brand span { font-size: 13px; align-self: flex-start; margin-top: 8px; letter-spacing: 0; }
nav { display: flex; gap: 30px; font-size: 14px; font-weight: 600; }
nav a:hover { color: var(--red); }

/* Buttons */
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; background: var(--red); color: #fff; border: 0; border-radius: 100px; padding: 18px 28px; font-weight: 650; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; box-shadow: 0 10px 24px rgba(224, 26, 48, .22); }
.button:hover { background: var(--red-dark); transform: translateY(-2px); }
.button.small { font-size: 14px; padding: 13px 22px; box-shadow: none; }
.button.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px #dedde0; }
.button.ghost:hover { background: #fff; color: var(--red); }
button:disabled { opacity: .6; cursor: wait; }

/* Phone frame around real screenshots */
.phone { position: relative; margin: 0; width: 300px; aspect-ratio: 1206 / 2622; padding: 10px; border-radius: 52px; background: #1d1d20; box-shadow: 0 0 0 2px #3a3a3e inset, 24px 34px 70px rgba(84, 38, 49, .18); flex-shrink: 0; }
.phone .screen { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 43px; background: var(--surface); }
/* Screenshot non ancora disponibile: niente cornice vuota, resta solo il testo. */
.feature-row.no-shot { grid-template-columns: 1fr !important; }
.feature-row.no-shot .feature-copy { max-width: 640px; justify-self: start !important; }
.feature-row.no-shot .phone { display: none; }
.hero-visual.no-shot .phone { visibility: hidden; }
.phone-pair { position: relative; display: flex; align-items: center; padding-right: 130px; margin-right: 10px; }
.phone-pair .phone { z-index: 2; }
.phone-pair .phone.back { position: absolute; right: 0; top: 50%; width: 230px; z-index: 1; transform: translateY(-46%) rotate(4deg); }
.phone.empty::after { content: 'Screenshot · ' attr(data-label); position: absolute; inset: 10px; border-radius: 43px; display: grid; place-items: center; padding: 30px; text-align: center; font-size: 13px; font-weight: 650; letter-spacing: .5px; color: #a5a5ad; background: repeating-linear-gradient(135deg, #f4f3f5 0 14px, #efeef1 14px 28px); }
.phone.empty .screen { visibility: hidden; }
.tilt { transform: rotate(5deg); }

/* Hero */
.hero { max-width: 1190px; margin: 0 auto; padding: 50px 5% 90px; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; }
h1 { font-size: clamp(54px, 6.2vw, 88px); letter-spacing: -4.5px; line-height: 1.03; margin: 0 0 26px; font-weight: 800; }
.intro { font-size: 19px; line-height: 1.7; max-width: 460px; color: var(--muted); margin: 0 0 32px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-tags { list-style: none; padding: 0; display: flex; gap: 18px; margin: 40px 0 0; font-size: 13px; color: #77777e; flex-wrap: wrap; }
.hero-tags li::before { content: '✳'; color: var(--red); margin-right: 7px; }
.hero-visual { position: relative; min-height: 680px; display: grid; place-items: center; }
.orbit { position: absolute; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff 0, var(--blush) 40%, #f5e3e3 100%); }
.orbit::after { content: ''; position: absolute; inset: -26px; border: 1px dashed #eacbd0; border-radius: 50%; }
.floating { position: absolute; z-index: 3; background: #fff; border: 1px solid #f2ecec; box-shadow: 0 14px 40px rgba(69, 43, 41, .09); }
.note { top: 90px; right: -6px; border-radius: 18px; padding: 16px 22px; font-size: 15px; line-height: 1.55; transform: rotate(-6deg); }
.note b { color: var(--red); }
.assistant { bottom: 70px; left: -10px; padding: 12px 22px 12px 12px; border-radius: 20px; display: flex; align-items: center; gap: 8px; transform: rotate(-4deg); }
.assistant img { width: 56px; height: 56px; object-fit: contain; }
.assistant b { display: block; font-size: 14px; }
.assistant span { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }

/* Manifesto */
.manifesto { max-width: 1190px; margin: 0 auto; padding: 36px 0; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.manifesto > span { font-size: 14px; color: var(--muted); }
.manifesto p { font-size: 25px; line-height: 1.4; margin: 0; letter-spacing: -.6px; text-align: right; }

/* Features: one row per key feature, text + real screenshot */
.features { max-width: 1190px; margin: 100px auto; }
.section-heading { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 30px; margin-bottom: 46px; }
.section-heading .eyebrow { grid-column: 1 / -1; }
.section-heading > p:last-child { color: var(--muted); line-height: 1.7; margin: 0; }
.feature-row { display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: center; padding: 56px 70px; margin-bottom: 24px; border-radius: 32px; background: var(--surface); overflow: hidden; }
.feature-row.reverse { grid-template-columns: auto 1fr; }
.feature-row.reverse .phone { order: -1; }
.feature-row:nth-of-type(odd):not(.dark) { background: var(--pink); }
.feature-row.dark { background: var(--night); color: #fff; }
.feature-row.dark p, .feature-row.dark .points li { color: #c9c9cf; }
.feature-row .phone { width: 280px; }
.feature-copy { max-width: 470px; }
.feature-row.reverse .feature-copy { justify-self: end; }
.tag { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 100px; background: #fff; color: var(--red); font-size: 13px; font-weight: 700; }
.tag img { width: 20px; height: 20px; object-fit: contain; }
.dark .tag { background: var(--red); color: #fff; }
.feature-copy h3 { font-size: 40px; line-height: 1.1; letter-spacing: -1.6px; margin: 22px 0 16px; }
.feature-copy p { font-size: 17px; line-height: 1.65; color: #55565d; margin: 0; }
.points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 11px; }
.points li { position: relative; padding-left: 28px; font-size: 15px; color: #45464c; }
.points li::before { content: ''; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.bubble { display: inline-block; padding: 15px 18px; background: #fff; border-radius: 18px 18px 18px 4px; font-size: 15px; margin-top: 24px; box-shadow: 0 8px 24px rgba(69, 43, 41, .07); }

/* Signup */
.signup { max-width: 1190px; margin: 90px auto; display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; padding: 65px; border-radius: 32px; background: linear-gradient(135deg, #fff4f0, #fff 45%, #fae0de); }
.signup h2 { font-size: clamp(48px, 5.6vw, 78px); }
.signup-copy > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.signup-copy img { width: 120px; height: 120px; object-fit: contain; margin-top: 10px; }
form { padding: 34px; background: #fff; border-radius: 24px; box-shadow: 0 20px 50px rgba(84, 38, 49, .08); }
form h3 { font-size: 27px; letter-spacing: -.8px; margin: 0 0 8px; }
form > p { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 0; }
label { display: block; font-size: 14px; font-weight: 600; margin: 20px 0 8px; }
input { width: 100%; min-width: 0; border: 1px solid #dddde1; border-radius: 12px; padding: 14px; background: #fafafb; color: var(--ink); }
input:focus { outline: 2px solid var(--red); outline-offset: 2px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 90px; }
.password-wrap button { position: absolute; right: 10px; top: 0; bottom: 0; background: none; border: 0; color: var(--red); font-size: 13px; font-weight: 600; cursor: pointer; }
form .button { width: 100%; margin-top: 26px; }
#form-status { font-size: 14px; color: var(--red); line-height: 1.5; margin-top: 14px; min-height: 1px; }
#form-status.success { color: #27643a; background: #eaf5ec; padding: 12px 14px; border-radius: 12px; }
.form-note { font-size: 12px !important; line-height: 1.6; color: var(--muted); margin-top: 8px !important; }

/* FAQ + footer */
.faq { max-width: 850px; margin: 95px auto; }
.faq h2 { font-size: 40px; margin-bottom: 26px; }
details { border-bottom: 1px solid #dddde1; padding: 22px 0; }
summary { font-weight: 600; cursor: pointer; }
details p { color: var(--muted); line-height: 1.7; max-width: 720px; }
footer { max-width: 1190px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 35px 0; border-top: 1px solid #e0dfe1; }
footer p, footer > span { font-size: 13px; color: var(--muted); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #9b0e20; outline-offset: 5px; }

@media (max-width: 1250px) {
  .manifesto, .features, .signup, .faq, footer { margin-left: 5%; margin-right: 5%; }
  .feature-row { padding: 50px; }
}
@media (max-width: 900px) {
  .top { height: 70px; }
  nav { display: none; }
  .brand { font-size: 29px; }
  .brand img { width: 32px; height: 32px; }
  .hero { grid-template-columns: 1fr; padding-top: 30px; gap: 10px; text-align: center; }
  h1 { font-size: 58px; letter-spacing: -3px; }
  .intro { margin-left: auto; margin-right: auto; font-size: 17px; }
  .cta-row, .hero-tags { justify-content: center; }
  .hero-visual { min-height: 620px; }
  .orbit { width: 360px; height: 360px; }
  .phone, .feature-row .phone { width: 250px; }
  .note { right: 0; top: 60px; font-size: 13px; }
  .assistant { left: 0; bottom: 40px; }
  .manifesto { display: block; text-align: center; }
  .manifesto p { margin-top: 16px; font-size: 22px; text-align: center; }
  .section-heading { display: block; }
  .section-heading > p:last-child { margin-top: 16px; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 36px; padding: 34px 26px; justify-items: center; }
  .feature-row.reverse .phone { order: 0; }
  .feature-row.reverse .feature-copy { justify-self: auto; }
  .feature-copy h3 { font-size: 32px; }
  .phone-pair { padding-right: 70px; }
  .phone-pair .phone.back { width: 190px; }
  .signup { grid-template-columns: 1fr; padding: 30px; gap: 20px; }
  .signup h2 { font-size: 60px; }
  .signup-copy { text-align: center; }
  .signup-copy img { display: none; }
  form { padding: 24px; }
  footer { flex-wrap: wrap; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Onboarding dopo la registrazione (stessi passi dell'app) */
dialog#onboarding { width: min(560px, 100vw); max-height: min(860px, 100dvh); padding: 0; border: 0; border-radius: 28px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(37, 37, 41, .3); overflow: hidden; }
dialog#onboarding[open] { display: flex; flex-direction: column; }
dialog#onboarding::backdrop { background: rgba(37, 37, 41, .45); backdrop-filter: blur(6px); }
.ob-bar { display: flex; align-items: center; gap: 14px; padding: 18px 22px; }
.ob-back, .ob-skip { background: none; border: 0; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.ob-back { font-size: 28px; line-height: 1; color: var(--ink); width: 28px; }
.ob-back[hidden], .ob-skip[hidden] { visibility: hidden; display: block; }
.ob-progress { flex: 1; height: 5px; border-radius: 5px; background: #ececef; overflow: hidden; }
.ob-progress span { display: block; height: 100%; width: 0; background: var(--red); border-radius: 5px; transition: width .3s; }
.ob-body { flex: 1; overflow-y: auto; padding: 8px 30px 20px; }
.ob-body h2 { font-size: 34px; letter-spacing: -1.3px; }
.ob-body .eyebrow { margin-bottom: 12px; }
.ob-sub { color: var(--muted); line-height: 1.6; margin: 10px 0 20px; }
.ob-group { font-size: 15px; margin: 22px 0 10px; }
.ob-welcome, .ob-persona { text-align: center; padding-top: 20px; }
.ob-welcome img { width: 130px; height: 130px; object-fit: contain; }
.ob-meta { font-size: 13px; font-weight: 600; color: var(--muted); }
.ob-big { display: grid; gap: 10px; }
.ob-choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; border: 1.5px solid #e6e5e8; border-radius: 18px; background: #fff; cursor: pointer; transition: border-color .2s, background .2s; }
.ob-choice b { display: block; font-size: 16px; }
.ob-choice small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.ob-choice > span:nth-child(2) { flex: 1; }
.ob-icon { font-size: 26px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--surface); }
.ob-check { color: var(--red); font-size: 18px; }
.ob-choice.on { border-color: var(--red); background: #fff6f6; }
.ob-tiles { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 8px; }
.ob-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border: 1.5px solid #e6e5e8; border-radius: 16px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; }
.ob-tile span { font-size: 22px; }
.ob-tile.on { border-color: var(--red); background: #fff6f6; color: var(--red); }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-chips.center { justify-content: center; margin-bottom: 10px; }
.ob-chip { padding: 9px 14px; border-radius: 100px; border: 1px solid #e2e1e5; background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; }
.ob-chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.ob-link { margin-top: 18px; background: none; border: 0; color: var(--red); font-weight: 700; cursor: pointer; padding: 0; }
#ob-dream { margin-bottom: 10px; }
.ob-badge { width: 110px; height: 110px; margin: 10px auto 18px; display: grid; place-items: center; font-size: 50px; border-radius: 50%; background: radial-gradient(circle, #fff 0, #fde3e3 100%); box-shadow: 0 0 0 8px #fff4f2, 0 14px 30px rgba(224, 26, 48, .18); }
.ob-dream { font-size: 15px; }
.ob-actions { padding: 14px 30px 24px; border-top: 1px solid var(--line); background: #fff; }
.ob-actions .button { width: 100%; }
#ob-status { margin: 10px 0 0; font-size: 13px; color: var(--red); text-align: center; }
#ob-status:empty { display: none; }
@media (max-width: 600px) {
  dialog#onboarding { border-radius: 0; height: 100dvh; max-height: 100dvh; }
  .ob-body { padding: 8px 20px 20px; }
  .ob-tiles[style*="--cols:4"] { grid-template-columns: repeat(2, 1fr); }
}
