/* Piego — piego.ch. Palette from Theme.swift, measures from the Figma frames «Piego – Landing IT/EN». */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #FFFFFF;
  --paper: #F7F8F5;
  --field: #EEF2EC;
  --tint: #E1F1E6;
  --ink: #17231D;
  --muted: #59655E;
  --green: #126B43;
  --line: #DDE3DC;
  --radius: 15px;
  --page: min(100% - 32px, 1240px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }
.wrap { width: var(--page); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -80px; background: #fff; padding: 10px 14px; z-index: 10; border-radius: 8px; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: flex; gap: 6px; margin-inline: auto; }
.nav a { color: var(--muted); font-weight: 700; text-decoration: none; padding: 10px 14px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--paper); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.pill-outline { border: 1px solid var(--green); color: var(--green); background: #fff; }
.pill-green { background: var(--green); color: #fff; }
.pill-green:hover { background: #0e5a38; }
.pill-dark { background: var(--ink); color: #fff; }
.pill-white { background: #fff; color: var(--ink); }
.pill-big { min-height: 56px; padding: 0 28px; font-size: 18px; }

/* Section rhythm */
section { padding-block: clamp(56px, 8vw, 104px); }
.eyebrow { display: inline-block; background: var(--tint); color: var(--ink); font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); display: grid; gap: 12px; justify-items: center; }
h2 { font-size: clamp(28px, 3.4vw, 36px); font-weight: 600; }
.sub { color: var(--muted); font-size: clamp(17px, 1.7vw, 22px); line-height: 1.55; }

/* Phone frame: the real App Store screenshots inside a CSS frame, as in Figma */
.phone { position: relative; width: 100%; max-width: 240px; aspect-ratio: 1320 / 2868; border: 7px solid var(--ink); border-radius: 13% / 6%; overflow: hidden; background: #fff; box-shadow: 0 18px 40px rgba(23, 35, 29, .18); }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.frame { background: var(--tint); border-radius: var(--radius); display: flex; justify-content: center; overflow: hidden; }
.frame.cropped { align-items: flex-start; padding-top: 32px; height: 100%; min-height: 300px; }
.frame.cropped .phone { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; margin-bottom: -40%; }

/* Hero */
.hero { padding-block: clamp(24px, 4vw, 48px); }
.hero .wrap { display: grid; grid-template-columns: 741fr 481fr; gap: 18px; }
.hero-copy { background: var(--field); border-radius: var(--radius); padding: clamp(28px, 6vw, 72px); display: grid; align-content: center; gap: 22px; }
.news { display: inline-flex; align-items: center; gap: 8px; background: var(--tint); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 13px; font-weight: 700; justify-self: start; }
.news b { background: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
h1 { font-size: clamp(34px, 4.6vw, 52px); font-weight: 700; }
.lead { color: var(--muted); font-size: clamp(18px, 1.8vw, 22px); line-height: 1.55; max-width: 34em; }
.facts { font-size: 14px; font-weight: 700; }
.hero .frame { align-items: center; padding: 40px 24px; }

/* Features */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card { background: var(--paper); border-radius: var(--radius); padding: clamp(24px, 3.5vw, 44px); display: grid; gap: 14px; align-content: start; }
.card h3 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; }
.card p { color: var(--muted); font-size: clamp(16px, 1.6vw, 20px); }
.card .frame { margin-top: 14px; height: 340px; }
.card.wide { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; }
.card.wide .frame { margin-top: 0; }
.icon-dot { width: 64px; height: 64px; border-radius: 50%; background: var(--green); display: grid; place-items: center; }
.icon-dot svg { width: 32px; height: 32px; }

/* Editor */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.split .copy { display: grid; gap: 16px; }
.split .frame { height: 340px; }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; position: relative; }
.steps li { display: grid; justify-items: center; gap: 16px; text-align: center; font-size: 18px; color: var(--muted); position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 56px; left: calc(50% + 64px); right: calc(-50% + 64px); border-top: 2px dashed #9aa49e; }
.step-icon { width: 112px; height: 112px; border-radius: 16px; background: var(--tint); display: grid; place-items: center; }
.step-icon svg { width: 48px; height: 48px; }

/* Pro cards */
.pro { background: var(--field); border-radius: var(--radius); padding: clamp(24px, 4vw, 56px); display: grid; gap: 32px; }
.pro-head { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: center; }
.pro-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pro-card { background: #fff; border-radius: var(--radius); padding: 16px 16px 24px; display: grid; gap: 6px; align-content: start; }
.pro-card.dark { background: var(--ink); color: #fff; }
.pro-card .frame { height: 220px; margin-bottom: 12px; padding-top: 16px; }
.pro-card .phone { max-width: 150px; border-width: 5px; }
.pro-card h3 { font-size: 22px; font-weight: 600; }
.pro-card .tag { color: var(--muted); }
.pro-card.dark .tag, .pro-card.dark p { color: #d5ddd7; }
.pro-card p { font-size: 15px; color: var(--muted); }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; margin-inline: auto; }
.plan { background: var(--paper); border-radius: var(--radius); padding: clamp(24px, 3.5vw, 40px); display: grid; gap: 18px; align-content: start; }
.plan.dark { background: var(--ink); color: #fff; }
.plan h3 { font-size: 30px; font-weight: 600; }
.plan .muted { color: var(--muted); font-size: 17px; }
.plan.dark .muted { color: #d5ddd7; }
.price { font-size: 44px; font-weight: 600; letter-spacing: -.02em; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.plan.dark .price { border-color: rgba(255, 255, 255, .25); }
.price small { font-size: 18px; font-weight: 500; letter-spacing: 0; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ticks li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 18px; line-height: 1.3; }
.ticks svg { width: 26px; height: 26px; }
.ticks small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.plan.dark .ticks small { color: #c3cdc6; }
.plan .pill { width: 100%; min-height: 52px; font-size: 16px; margin-top: 8px; }
.note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 24px; }

/* CTA */
.cta { background: var(--field); border-radius: var(--radius); padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 48px) 0; text-align: center; display: grid; justify-items: center; gap: 14px; overflow: hidden; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 18px 10px 14px; text-decoration: none; text-align: left; margin-top: 10px; }
.badge svg { width: 34px; height: 34px; }
.badge span { display: grid; line-height: 1.1; font-size: 12px; }
.badge strong { font-size: 22px; font-weight: 700; }
.trio { display: flex; justify-content: center; align-items: flex-end; gap: clamp(12px, 3vw, 40px); margin-top: 32px; height: clamp(220px, 32vw, 380px); overflow: hidden; }
.trio .phone { border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; flex: 0 0 auto; width: clamp(110px, 17vw, 200px); align-self: flex-start; margin-top: 48px; }
.trio .phone.center { width: clamp(130px, 20vw, 240px); margin-top: 0; }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.faq .copy { display: grid; gap: 14px; justify-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 0; font-size: 18px; font-weight: 500; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 22px; height: 22px; flex: 0 0 auto; transition: transform .2s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { color: var(--muted); padding: 0 0 20px; font-size: 16px; }

/* Footer */
.site-footer { padding-bottom: 32px; }
.site-footer .box { background: var(--ink); color: #fff; border-radius: var(--radius); padding: clamp(28px, 4vw, 56px); display: grid; gap: 32px; }
.footer-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.footer-cta h2 { font-size: clamp(26px, 3vw, 36px); max-width: 15em; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.footer-cols .brand { color: #fff; font-size: 40px; }
.footer-cols .brand img { width: 44px; height: 44px; border-radius: 10px; }
.footer-cols p { color: #c3cdc6; font-size: 14px; max-width: 20em; margin-top: 12px; }
.footer-cols h3 { font-size: 14px; font-weight: 500; color: #9aa49e; margin-bottom: 8px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li a, .footer-cols li span { display: inline-flex; min-height: 34px; align-items: center; color: #fff; text-decoration: none; font-size: 15px; }
.footer-cols li a:hover { text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: #c3cdc6; }
.footer-bottom nav { display: flex; gap: 20px; }
.footer-bottom a { color: #fff; text-decoration: none; font-weight: 500; }
.footer-bottom a:hover { text-decoration: underline; }

/* Text pages: support, privacy, terms, guides */
.doc { width: min(100% - 32px, 760px); margin-inline: auto; padding-block: clamp(32px, 6vw, 64px) 72px; }
.doc .meta { color: var(--muted); font-size: 14px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); margin: 8px 0 20px; }
.doc h2 { font-size: 22px; margin: 40px 0 10px; }
.doc p, .doc li { font-size: 17px; line-height: 1.7; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 16px; }
.doc li { margin: 6px 0; }
.doc .lead { font-size: 20px; color: var(--ink); max-width: none; margin-bottom: 20px; }
.doc .contact { background: var(--field); border-radius: var(--radius); padding: 20px 24px; margin: 28px 0; }
.doc .contact p:last-child { margin-bottom: 0; }
.doc .callout { background: var(--paper); border-left: 4px solid var(--green); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; }
.doc figure { margin: 28px 0; display: flex; gap: 20px; justify-content: center; }
.doc figure .phone { max-width: 220px; }
.doc .next { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.notfound { text-align: center; }
.notfound .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

/* Layout breakpoints from the spec: columns stack under 900 px, header trims under 720 px */
@media (max-width: 900px) {
  .hero .wrap, .features, .card.wide, .split, .pro-head, .pro-cards, .plans, .faq { grid-template-columns: 1fr; }
  .hero .frame { padding: 32px 24px; }
  .hero .phone { max-width: 220px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 1080px) { .nav { display: none; } .header-actions { margin-left: auto; } }
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps li:not(:last-child)::after { display: none; }
  .trio .phone:not(.center) { display: none; }
}
@media (max-width: 420px) {
  .site-header .wrap { gap: 10px; }
  .brand { font-size: 22px; }
  .header-actions .pill { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .faq summary svg { transition: none; } }
