/* yu apps — foglio di stile unico */
:root {
  --paper: #EDF1F5;
  --surface: #FFFFFF;
  --ink: #15202B;
  --muted: #566573;
  --line: #D2DAE3;
  --brand: #0F7B55;
  --accent: var(--brand);
  --radius: 20px;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1721;
    --surface: #162230;
    --ink: #E6ECF2;
    --muted: #93A3B3;
    --line: #26364A;
    --brand: #3DD598;
  }
}

html[data-lang="it"] [data-l="en"],
html[data-lang="en"] [data-l="it"] { display: none !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variation-settings: "opsz" 14;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
code { font-size: .92em; background: color-mix(in srgb, var(--ink) 8%, transparent); padding: .1em .35em; border-radius: 5px; }

/* ---------- header / footer ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 22px 24px;
}
.brand { text-decoration: none; font-size: 1.5rem; letter-spacing: -.02em; line-height: 1; }
.brand-yu { font-weight: 800; color: var(--brand); font-variation-settings: "opsz" 96, "wdth" 75; }
.brand-rest { font-weight: 400; margin-left: .08em; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.lang button {
  font: inherit; font-size: .85rem; font-weight: 600; border: 0; background: none; color: var(--muted);
  padding: 4px 11px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.foot { max-width: 1080px; margin: 96px auto 0; padding: 32px 24px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.foot p { margin: .25rem 0; }
.foot a { color: var(--ink); }
.foot-small { font-size: .8rem; margin-top: 1rem !important; }

main { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- icone ---------- */
.icon {
  display: inline-grid; place-items: center; flex: none;
  background: var(--bg); color: var(--fg);
  border-radius: 22.5%;
  font-weight: 800; letter-spacing: -.04em;
  font-variation-settings: "opsz" 96, "wdth" 75;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 14%, transparent);
}
img.icon { object-fit: cover; background: none; }
.icon-s  { width: 44px;  height: 44px;  font-size: 1.05rem; }
.icon-m  { width: 72px;  height: 72px;  font-size: 1.7rem; }
.icon-l  { width: 112px; height: 112px; font-size: 2.6rem; }
.icon-xl { width: 128px; height: 128px; font-size: 3rem; }

/* ---------- home: hero ---------- */
.hero { padding: 56px 0 24px; }
.hero h1 {
  margin: 0; max-width: 12ch;
  font-size: clamp(2.6rem, 7.4vw, 5.6rem); line-height: .95; letter-spacing: -.035em;
  font-weight: 800; font-variation-settings: "opsz" 96, "wdth" 78;
}
.lede { max-width: 52ch; color: var(--muted); font-size: 1.2rem; margin: 22px 0 0; }

/* la mensola: le icone delle app pubblicate, appoggiate un po' storte */
.shelf { display: flex; flex-wrap: wrap; gap: 0; margin: 44px 0 8px; padding-left: 10px; }
.shelf a { display: block; margin-left: -14px; transform: rotate(calc((var(--i) - 2.5) * 3.2deg)) translateY(calc(var(--i) * 1px)); transition: transform .25s ease; }
.shelf a:nth-child(even) { transform: rotate(calc((2.5 - var(--i)) * 2.4deg)) translateY(8px); }
.shelf .icon { box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--bg) 70%, #000), inset 0 0 0 1px color-mix(in srgb, #fff 14%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .shelf a { animation: drop .7s cubic-bezier(.2,.9,.3,1.25) backwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
  @keyframes drop { from { opacity: 0; translate: 0 -40px; } }
}

/* ---------- home: blocchi ---------- */
.block { margin-top: 72px; }
.block h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.02em; margin: 0 0 20px;
  font-weight: 700; font-variation-settings: "opsz" 48;
}
.block-intro { color: var(--muted); margin: -10px 0 20px; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card a {
  display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: center;
  padding: 20px; height: 100%; text-decoration: none; border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--bg) 22%, var(--line));
}
.card a:hover { border-color: var(--bg); }
.card .icon { grid-row: span 3; }
.card-name { font-weight: 700; font-size: 1.3rem; letter-spacing: -.015em; line-height: 1.15; }
.card-sub { color: var(--ink); line-height: 1.3; }
.card-meta { color: var(--muted); font-size: .88rem; margin-top: 4px; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows a {
  display: grid; grid-template-columns: auto minmax(130px, 200px) 1fr auto; gap: 16px; align-items: center;
  padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none;
}
.rows a:hover .row-name { text-decoration: underline; text-underline-offset: 3px; }
.row-name { font-weight: 700; }
.row-sub { color: var(--muted); }
@media (max-width: 640px) {
  .rows a { grid-template-columns: auto 1fr; row-gap: 2px; }
  .rows .icon { grid-row: span 3; }
  .rows .status { justify-self: start; }
}

/* stato */
.status { font-size: .82rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid currentColor; }
.status-review     { color: #B5650D; }
.status-prep       { color: #0F7B55; }
.status-testflight { color: #2C6BD6; }
.status-dev        { color: var(--muted); }
.status-proto      { color: #8A5A2B; }
@media (prefers-color-scheme: dark) {
  .status-review { color: #F0A548; } .status-prep { color: #3DD598; } .status-testflight { color: #7EAEFF; } .status-proto { color: #E0A672; }
}
.status-big { display: inline-block; font-size: .95rem; padding: 6px 14px; margin: 14px 0 0; }

/* ---------- pagina app ---------- */
.app-hero { display: flex; gap: 28px; align-items: center; padding: 40px 0 28px; }
.app-hero h1 {
  margin: 0; font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1; letter-spacing: -.035em;
  font-weight: 800; font-variation-settings: "opsz" 96, "wdth" 82;
}
.app-sub { margin: 6px 0 0; font-size: 1.25rem; color: var(--muted); }
.app-hero .icon-xl { box-shadow: 0 22px 40px -20px color-mix(in srgb, var(--accent) 80%, #000); }
.store {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 18px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600;
  padding: 11px 20px 11px 16px; border-radius: 12px;
}
.store:hover { background: var(--accent); color: #fff; }
@media (max-width: 560px) { .app-hero { flex-direction: column; align-items: flex-start; gap: 18px; } .app-hero .icon-xl { width: 96px; height: 96px; font-size: 2.2rem; } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin: 0; border-block: 1px solid var(--line); }
.facts div { padding: 14px 16px 14px 0; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 2px 0 0; font-weight: 600; line-height: 1.35; }

.tabs { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin: 0 -24px; padding: 10px 24px; }
.tabs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: block; padding: 7px 15px; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="true"] { background: var(--accent); color: #fff; }

.pane { max-width: 70ch; padding-top: 36px; }
.pane h2 { font-size: 1.9rem; letter-spacing: -.02em; margin: 0 0 14px; font-variation-settings: "opsz" 48; }
.intro { font-size: 1.2rem; line-height: 1.5; margin: 0 0 18px; }
.features { margin: 0; padding: 0; list-style: none; }
.features li { padding: 10px 0 10px 26px; border-bottom: 1px solid var(--line); position: relative; }
.features li::before { content: ""; position: absolute; left: 4px; top: 1.05em; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); }
.doc-sec { margin-top: 22px; }
.doc-sec h3 { font-size: 1.15rem; margin: 0 0 4px; letter-spacing: -.01em; }
.doc-sec p, .doc-sec ul { margin: 0 0 .6em; }
.doc-sec ul { padding-left: 1.2em; }
.doc-sec li { margin-bottom: .3em; }
.doc-sec a, .pane a { color: var(--accent); text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { .doc-sec a, .pane a { color: var(--brand); } }
.updated { color: var(--muted); font-size: .92rem; margin: -6px 0 0; }
.back { margin-top: 48px; }
.back a { font-weight: 600; }

/* azioni hero: download, beta */
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.actions .store { margin-top: 0; }
.status-big + .actions { margin-top: 14px; }
.store-off { background: transparent; color: var(--muted); border: 1px dashed var(--line); cursor: default; }
.store-off:hover { background: transparent; color: var(--muted); }
.btn-line {
  display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 12px;
  border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 600;
}
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.status-direct { color: var(--ink); }

/* screenshot */
.shots { display: flex; gap: 14px; overflow-x: auto; margin: 6px -24px 22px; padding: 6px 24px 14px; scroll-snap-type: x mandatory; }
.shots img { height: 420px; width: auto; border-radius: 18px; scroll-snap-align: start; border: 1px solid var(--line); background: var(--surface); flex: none; }
@media (max-width: 560px) { .shots img { height: 340px; } }
img.icon-shaped { border-radius: 0; box-shadow: none !important; }
.shots-land img { height: 300px; }
@media (max-width: 560px) { .shots-land img { height: 200px; } }
.pane .shots { width: min(1080px, 100vw); max-width: none; }
