/* Web de Clotti. Un solo fichero de estilo para la portada (ES y EN) y las
   páginas legales. Los colores de marca son los de app/lib/core/brand.dart. */

:root {
  --cream: #fcf9f4;
  --cream-2: #f6efe7;
  --cream-3: #efe4d9;
  --maroon: #81313a;
  --maroon-dark: #66242c;
  --ink: #2c2325;
  --muted: #5e5255;
  --line: #e7dad0;
  --device: #1d191a;

  --serif: "DM Serif Display", Georgia, serif;
  --script: "Parisienne", cursive;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  overflow-x: hidden;
}

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

a { color: var(--maroon); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(252 249 244 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.site-header .brand img { width: 118px; }

.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 14.5px;
}

.nav a, .menu a { color: var(--ink); text-decoration: none; }
.nav a:hover, .menu a:hover { color: var(--maroon); }

.lang {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}
.lang:hover { color: var(--maroon); border-color: var(--maroon); }

.btn {
  display: inline-block;
  background: var(--maroon);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  border-radius: 999px;
  padding: 11px 26px;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--maroon-dark); }
.btn-sm { padding: 9px 20px; font-size: 15px; }

/* El menú plegable solo existe en pantallas estrechas. */
.menu { display: none; position: relative; }
.menu summary {
  list-style: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 24px; height: 24px; }
.menu nav {
  position: absolute;
  right: 0;
  top: 48px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgb(60 30 35 / 0.12);
  padding: 8px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
}
.menu nav a { padding: 10px 12px; border-radius: 8px; }
.menu nav a:hover { background: var(--cream-2); }

/* ---------- Secciones ---------- */

section { padding: clamp(48px, 8vw, 96px) 0; }
section + section { border-top: 1px solid var(--line); }

.alt { background: linear-gradient(180deg, var(--cream-2), var(--cream)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--maroon);
  line-height: 1.1;
  margin: 0 0 18px;
}

h2 { font-size: clamp(34px, 4.6vw, 50px); }

.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 34em; margin: 0 0 24px; }

.checks { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.checks li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--maroon) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.pill {
  display: inline-block;
  vertical-align: middle;
  font: 500 15px var(--sans);
  color: var(--maroon);
  background: #f3dfe0;
  border-radius: 999px;
  padding: 6px 16px;
  margin-left: 12px;
}

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

.hero {
  background:
    radial-gradient(ellipse at 85% 40%, var(--cream-3), transparent 60%),
    var(--cream);
  padding-top: clamp(32px, 6vw, 72px);
}

.hero .wordmark { width: min(440px, 80%); }

.tagline {
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 14px 0 6px 0.3em;
}

.script {
  font-family: var(--script);
  color: var(--maroon);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.2;
  margin: 0 0 22px;
}

.perks { display: flex; flex-wrap: wrap; gap: 14px 26px; margin: 0 0 28px; padding: 0; list-style: none; }
.perks li { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.perks svg { width: 26px; height: 26px; color: var(--maroon); }

.stores { display: flex; flex-wrap: wrap; gap: 14px; }

/* La insignia oficial de Google Play (img/google-play-*.png, sin el margen
   transparente). Google pide al menos 28 px de alto, sin tocarla, y un
   espacio libre de un cuarto de su altura alrededor. */
.play-badge { display: inline-block; margin: 12px; margin-left: 0; }
.play-badge img { height: 52px; width: auto; }

.hero-devices {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  padding: 10px 0 20px;
}
.hero-devices .phone { --w: clamp(140px, 17vw, 215px); }
.hero-devices .phone:first-child { transform: rotate(-6deg) translateY(-18px); margin-right: -18px; z-index: 1; }
.hero-devices .phone:last-child { transform: rotate(5deg) translateY(8px); }

/* ---------- Dispositivos ----------
   Marcos en CSS. Si falta la captura, la <img> se quita sola (onerror) y la
   pantalla enseña el nombre de la que va ahí. */

.screen {
  position: relative;
  overflow: hidden;
  background: var(--cream);
  display: grid;
  place-items: center;
}
.screen::before {
  content: attr(data-label);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 8px;
  opacity: 0.7;
}
.screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.phone {
  width: var(--w, 220px);
  flex: none;
  background: var(--device);
  border-radius: calc(var(--w, 220px) * 0.15);
  padding: calc(var(--w, 220px) * 0.035);
  box-shadow: 0 24px 50px rgb(50 25 30 / 0.25), inset 0 0 0 2px #3a3436;
  position: relative;
}
.phone .screen {
  aspect-ratio: 1080 / 2076; /* las capturas del S9, sin la barra de navegación */
  border-radius: calc(var(--w, 220px) * 0.12);
}
.phone::after {
  content: "";
  position: absolute;
  top: calc(var(--w, 220px) * 0.06);
  left: 50%;
  transform: translateX(-50%);
  width: 26%;
  height: calc(var(--w, 220px) * 0.045);
  background: var(--device);
  border-radius: 999px;
}

.phones { display: flex; justify-content: center; gap: clamp(10px, 2vw, 26px); }
.phones .phone { --w: clamp(96px, 14vw, 180px); }
.phones .phone:nth-child(2) { transform: translateY(-14px); }

.tablet {
  background: var(--device);
  border-radius: 26px;
  padding: 14px;
  box-shadow: 0 24px 50px rgb(50 25 30 / 0.22), inset 0 0 0 2px #3a3436;
  width: 100%;
  max-width: 680px;
  margin-left: auto;
}
.tablet .screen { aspect-ratio: 2560 / 1456; border-radius: 14px; } /* 16:10 sin las barras del sistema */

.laptop { width: 88%; max-width: 620px; margin-left: auto; }
.laptop .lid {
  background: var(--device);
  border-radius: 18px 18px 6px 6px;
  padding: 14px 14px 18px;
  box-shadow: 0 24px 50px rgb(50 25 30 / 0.22);
}
.laptop .screen { aspect-ratio: 2560 / 1456; border-radius: 6px; }
.laptop .screen img { filter: blur(3px) saturate(0.7); opacity: 0.55; transform: scale(1.04); }
.laptop .base {
  height: 16px;
  margin: 0 -7%;
  background: linear-gradient(180deg, #c9c3c0, #8f8986);
  border-radius: 2px 2px 14px 14px;
  position: relative;
}
.laptop .base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16%;
  height: 6px;
  background: #a7a19e;
  border-radius: 0 0 8px 8px;
}

.soon {
  position: absolute;
  z-index: 1;
  background: rgb(252 249 244 / 0.94);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgb(50 25 30 / 0.15);
  padding: 22px 28px;
  text-align: center;
  max-width: 78%;
}
.soon svg { width: 34px; height: 34px; color: var(--maroon); margin: 0 auto 8px; display: block; }
.soon b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.soon span { font-size: 13px; color: var(--muted); }
.laptop .screen::before { display: none; }

/* ---------- Qué es Clotti ---------- */

.features {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
}
.features .ms { display: block; font-size: 40px; vertical-align: 0; color: var(--maroon); margin: 0 auto 10px; }
.features .stamp {
  display: block;
  width: max-content;
  margin: 4px auto 14px;
  font: 700 12.5px var(--sans);
  letter-spacing: 0.12em;
  color: var(--maroon);
  background: #fff;
  border-radius: 6px;
  padding: 5px 9px;
  box-shadow: 0 2px 8px rgb(60 30 35 / 0.1);
}

.collage { position: relative; padding: 0 0 40px; }

.photo {
  position: relative;
  overflow: hidden;
  background: var(--cream-3);
  border-radius: 4px;
  box-shadow: 0 16px 40px rgb(50 25 30 / 0.14);
  display: grid;
  place-items: center;
}
.photo::before { content: attr(data-label); font-size: 12px; color: var(--muted); opacity: 0.7; padding: 8px; text-align: center; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.collage .main { aspect-ratio: 608 / 761; width: 60%; margin-left: 4%; } /* img/ambiente/look.webp */

.polaroid {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34%;
  background: #fff;
  padding: 10px 10px 0;
  transform: rotate(4deg);
  box-shadow: 0 16px 40px rgb(50 25 30 / 0.18);
}
.polaroid .photo { aspect-ratio: 1; box-shadow: none; border-radius: 0; }
.polaroid p { font-family: var(--script); color: var(--maroon); font-size: clamp(18px, 2vw, 24px); text-align: center; margin: 6px 0 8px; }

.note {
  position: absolute;
  right: 2%;
  top: 0;
  width: 36%;
  font-family: var(--script);
  color: var(--maroon);
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.2;
  transform: rotate(-8deg);
  text-align: center;
  margin: 0;
}

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

.faq h2 { font-size: clamp(30px, 3.6vw, 40px); }

/* La misma FAQ que la app (la escribe tool/build.py): una caja por sección
   y, dentro, las preguntas. Todo plegado, como allí. */

.ms {
  font-family: "Material Symbols Outlined";
  font-weight: 300;
  font-size: 22px;
  line-height: 1;
  vertical-align: -5px;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
.ms.add {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  vertical-align: -5px;
}

.faq-search {
  display: block;
  width: 100%;
  max-width: 460px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e5255' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") 14px center / 18px no-repeat;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 18px 11px 42px;
  margin: 0 0 24px;
}
.faq-search:focus { outline: 2px solid var(--maroon); outline-offset: 1px; }

.faq-none { color: var(--muted); }

.faq-list { columns: 2 380px; column-gap: 20px; }

.faq-section {
  break-inside: avoid;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "expand_more";
  font: 300 22px/1 "Material Symbols Outlined";
  font-feature-settings: "liga";
  margin-left: auto;
  flex: none;
  color: var(--muted);
  transition: transform 0.2s;
}
.faq details[open] > summary::after { transform: rotate(180deg); }

.faq-section > summary { padding: 16px; font-size: 18px; font-weight: 600; }
.faq-section > summary .ms { color: var(--maroon); font-size: 24px; vertical-align: 0; }
.faq-section[open] > summary { background: rgb(129 49 58 / 0.08); }

.faq-q { border-top: 1px solid var(--line); margin: 0 16px; }
.faq-section > .faq-q:first-of-type { margin: 0; padding: 0 16px; }
.faq-q > summary { padding: 14px 0; font-size: 16px; }
.faq-q p, .faq-q ul { margin: 0 0 12px; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.faq-q ul { padding-left: 20px; }
.faq-q li { margin-bottom: 8px; }
.faq-q > :last-child { margin-bottom: 16px; }

/* ---------- Pie ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; }
.site-footer img { width: 104px; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer nav a { color: var(--ink); text-decoration: none; }
.site-footer nav a:hover { color: var(--maroon); }
.site-footer small { margin-left: auto; font-size: 13px; }
.site-footer .trademark { width: 100%; margin: 0; font-size: 12px; opacity: 0.8; }

/* ---------- Páginas legales ---------- */

.legal { max-width: 760px; margin: 0 auto; padding: 48px var(--gutter) 80px; }
.legal h1 { font-size: clamp(32px, 5vw, 46px); }
.legal h2 { font-size: 26px; margin-top: 40px; margin-bottom: 10px; }
.legal p, .legal li { color: var(--ink); }
.legal li { margin-bottom: 6px; }
.legal code { background: var(--cream-2); padding: 1px 6px; border-radius: 4px; font-size: 0.92em; }

/* ---------- Pantallas estrechas ---------- */

@media (max-width: 980px) {
  .nav, .site-header .btn { display: none; }
  .menu { display: block; margin-left: auto; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .tablet, .laptop { margin: 0 auto; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .site-footer small { margin-left: 0; width: 100%; }
  .laptop .base { margin: 0 -4%; }
  .soon { padding: 14px 16px; }
}
