/* Sito di Stella. Colori dall'icona: perla, inchiostro, le cinque carte della stella. Niente sfumature. */
:root {
  --bg: #f8f6f1;
  --bg-2: #efebe2;
  --fg: #2a241c;
  --fg-2: #5f564a;
  --line: #d9d2c4;
  --accent: #2f5da8;
  --accent-fg: #ffffff;
  --red: #a33a2a;
  --yellow: #e5b400;
  --green: #8c9c7a;
  --lavender: #c9c7f3;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(42, 36, 28, 0.12);
  --font-display: 'Nunito', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1d1a16;
    --bg-2: #27231e;
    --fg: #ede8df;
    --fg-2: #b3aa9c;
    --line: #3d372f;
    --accent: #7fa6e8;
    --accent-fg: #14120f;
    --card: #2b2721;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #1d1a16;
  --bg-2: #27231e;
  --fg: #ede8df;
  --fg-2: #b3aa9c;
  --line: #3d372f;
  --accent: #7fa6e8;
  --accent-fg: #14120f;
  --card: #2b2721;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 18px/1.55 var(--font-body);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--accent);
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
}
h3 {
  font-size: 1.2rem;
  font-weight: 700;
}
p {
  margin: 0;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
section {
  padding-block: 64px;
}
section + section {
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  max-width: 60ch;
}
.section-head p {
  color: var(--fg-2);
}

/* barra in alto */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
}
.brand span {
  font-weight: 600;
  color: var(--fg-2);
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.top nav {
  margin-left: auto;
  display: flex;
  gap: 4px 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.top nav a {
  color: var(--fg-2);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 0;
}
.top nav a:hover,
.top nav a:focus-visible {
  color: var(--fg);
}
.lang {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.flag {
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--line);
}
.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  z-index: 6;
}

/* tasti grandi e visibili */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 26px;
  border-radius: 12px;
  font: 700 1.1rem var(--font-display);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-fg);
}
.btn:hover,
.btn:focus-visible {
  filter: brightness(1.08);
}
.btn:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}
.btn small {
  font: 600 0.85rem var(--font-body);
  opacity: 0.85;
}
.btn.block {
  width: 100%;
  justify-content: flex-start;
  min-height: 60px;
  text-align: left;
}

/* apertura */
.hero {
  padding-block: 56px 72px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: center;
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero-text p {
  font-size: 1.15rem;
  color: var(--fg-2);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.hero-note {
  font-size: 0.95rem;
  color: var(--fg-2);
}
.hero-shot {
  position: relative;
  isolation: isolate;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--card);
}
/* una seconda carta dietro la schermata, come nel logo */
.hero-shot::before,
.hero-shot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  z-index: -1;
}
.hero-shot::before {
  background: var(--lavender);
  transform: translate(16px, 16px) rotate(2deg);
}
.hero-shot::after {
  background: var(--yellow);
  transform: translate(-14px, 12px) rotate(-2.5deg);
}
.hero-shot img {
  border-radius: 13px;
}
.hero-shot img {
  width: 100%;
}
.star {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

/* funzioni */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 36px;
}
.feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.feature .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--c);
  background: var(--bg-2);
  border: 1.5px solid var(--c);
  margin-bottom: 8px;
}
.ornament {
  display: block;
  margin-bottom: 14px;
}
.feature:nth-child(1) {
  --c: var(--red);
}
.feature:nth-child(2) {
  --c: var(--green);
}
.feature:nth-child(3) {
  --c: var(--yellow);
}
.feature:nth-child(4) {
  --c: var(--accent);
}
.feature:nth-child(5) {
  --c: var(--lavender);
}
.feature:nth-child(6) {
  --c: var(--fg-2);
}
.feature p {
  color: var(--fg-2);
}

/* schermate */
.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.shots figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.shots img {
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.shots figcaption {
  color: var(--fg-2);
  font-size: 0.95rem;
}

/* download */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.dl {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.dl h3 {
  font-size: 1.4rem;
}
.dl .note {
  color: var(--fg-2);
  font-size: 0.95rem;
}
.dl-more {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  color: var(--fg-2);
}
.support {
  margin-top: 20px;
  color: var(--fg-2);
}
.dl .btn {
  border-color: var(--line);
  color: var(--fg);
}
.dl .btn.primary {
  border-color: var(--accent);
  color: var(--accent-fg);
}

/* web */
.web .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
.web-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.web p + p {
  margin-top: 10px;
}

/* tutorial */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.video {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.video .thumb {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--fg-2);
  font-weight: 700;
  overflow: hidden;
}
.video .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.video .meta span {
  color: var(--fg-2);
  font-size: 0.95rem;
  white-space: nowrap;
}

/* guida e novità */
.links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.link-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 0;
}
.link-card p {
  color: var(--fg-2);
  flex: 1;
}
.link-card a {
  font-weight: 700;
}

footer {
  border-top: 1px solid var(--line);
  padding-block: 36px;
  color: var(--fg-2);
  font-size: 0.95rem;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
}
footer .by {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
footer .by img {
  width: 44px;
  height: 44px;
}

@media (max-width: 900px) {
  .hero .wrap,
  .features,
  .shots,
  .dl-grid,
  .links {
    grid-template-columns: minmax(0, 1fr);
  }
  .web .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .top nav {
    gap: 2px 14px;
    font-size: 0.95rem;
  }
}
