/* ==========================================================================
   Gadgetdamare – Landing page
   Palette derivata dal logo (magenta) e dalla luce olografica del negozio
   ========================================================================== */

:root {
  /* Colori */
  --magenta: #E5007E;        /* logo, decorazioni */
  --magenta-deep: #C8006D;   /* pulsanti e link su chiaro (5.7:1 con bianco) */
  --magenta-press: #A8005C;
  --plum: #2B1435;           /* testo principale, sezione contatti */
  --plum-soft: #5E4A66;      /* testo secondario (7.4:1 su mist) */
  --mist: #FBF6FC;           /* sfondo pagina */
  --white: #FFFFFF;
  --pink-light: #FF8AC8;     /* accento su scuro (7.7:1 su plum) */

  /* Pellicola olografica */
  --holo: linear-gradient(125deg, #8FE8E4 0%, #C4B5FD 30%, #FFB3DE 55%, #FFE7A3 78%, #8FE8E4 100%);

  /* Tipografia */
  --font-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --step-4: clamp(2.6rem, 1.6rem + 4.4vw, 5rem);

  /* Spaziatura */
  --gap: clamp(1rem, 0.6rem + 1.6vw, 2rem);
  --section: clamp(4rem, 2.5rem + 6vw, 8rem);
  --wrap: 72rem;
  --header-h: 4.5rem;
}

/* Base ------------------------------------------------------------------ */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--mist);
  color: var(--plum);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, svg, picture { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--magenta-deep); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--magenta-press); }

:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
  border-radius: 4px;
}

[tabindex="-1"]:focus { outline: none; }

.wrap {
  width: min(100% - 2 * var(--gap), var(--wrap));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--plum);
  color: var(--white);
  font-weight: 700;
  border-radius: 0 0 0.75rem 0.75rem;
}
.skip-link:focus { top: 0; color: var(--white); }

/* Pulsanti ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.6rem;
  border: 2px solid var(--magenta-deep);
  border-radius: 999px;
  background: var(--magenta-deep);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--magenta-press); border-color: var(--magenta-press); color: var(--white); }

.btn--small { min-height: 2.5rem; padding: 0.5rem 1.15rem; font-size: var(--step--1); }

.btn--ghost { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn--ghost:hover { background: var(--plum); border-color: var(--plum); color: var(--white); }

.btn--light { background: var(--white); border-color: var(--white); color: var(--plum); }
.btn--light:hover { background: var(--pink-light); border-color: var(--pink-light); color: var(--plum); }
.btn--light:focus-visible { outline-color: var(--white); }

/* Header ----------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 252, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: rgba(43, 20, 53, 0.12); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  min-height: var(--header-h);
}

.brand { display: block; flex-shrink: 0; }
.brand img { width: clamp(9.5rem, 7rem + 8vw, 13rem); }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.4rem + 1.6vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list a:not(.btn) {
  color: var(--plum);
  font-weight: 600;
  text-decoration: none;
  padding-block: 0.4rem;
  background-image: linear-gradient(var(--magenta), var(--magenta));
  background-size: 0 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.2s ease;
}
.site-nav__list a:not(.btn):hover { background-size: 100% 2px; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--plum);
  border-radius: 999px;
  background: transparent;
  color: var(--plum);
  font: 700 var(--step--1) var(--font-body);
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 47.99rem) {
  .js .nav-toggle { display: inline-flex; }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--mist);
    border-bottom: 1px solid rgba(43, 20, 53, 0.12);
    box-shadow: 0 1.5rem 2rem -1.5rem rgba(43, 20, 53, 0.35);
  }
  .js .site-nav:not(.is-open) { display: none; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gap) 1.25rem;
  }
  .site-nav__list a:not(.btn) {
    display: block;
    padding-block: 0.85rem;
    border-bottom: 1px solid rgba(43, 20, 53, 0.1);
    background-image: none;
  }
  .site-nav__list .btn { width: 100%; margin-top: 1rem; min-height: 3rem; font-size: var(--step-0); }

  /* Senza JS: menu sempre visibile sotto il logo */
  html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: 0.75rem; }
  html:not(.js) .site-nav__list { flex-direction: row; flex-wrap: wrap; padding: 0; gap: 1rem; }
  html:not(.js) .site-nav__list a:not(.btn) { border: 0; }
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 1rem + 5vw, 5.5rem) var(--section);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
}

.hero__title {
  font-size: var(--step-4);
  font-variation-settings: "wdth" 80;
  max-width: 12ch;
}

.hero__lead {
  max-width: 34rem;
  margin-top: 1.5rem;
  color: var(--plum-soft);
  font-size: var(--step-1);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Il palloncino: la foto di Silvia dentro una pellicola olografica */
.balloon {
  position: relative;
  margin: 0 auto;
  width: min(100%, 26rem);
  padding-bottom: 7.5rem;
  animation: balloon-rise 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both,
             balloon-float 7s ease-in-out 1.4s infinite;
  transform-origin: 50% 100%;
}

.balloon__body {
  position: relative;
  aspect-ratio: 0.86;
  padding: clamp(0.6rem, 0.4rem + 0.6vw, 0.9rem);
  border-radius: 50% 50% 48% 52% / 44% 44% 56% 56%;
  background: var(--holo);
  background-size: 250% 250%;
  animation: holo-shift 9s linear infinite;
  box-shadow: 0 2.5rem 3.5rem -2rem rgba(43, 20, 53, 0.45);
}

.balloon__body picture,
.balloon__body img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: 50% 30%;
}

/* riflesso di luce sul palloncino */
.balloon__body::after {
  content: "";
  position: absolute;
  top: 12%;
  left: 17%;
  width: 16%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  transform: rotate(-25deg);
  pointer-events: none;
}

.balloon__knot {
  position: absolute;
  left: 50%;
  top: calc(100% - 7.5rem - 0.35rem);
  width: 1.4rem;
  height: 1.1rem;
  transform: translateX(-50%);
  background: var(--magenta);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.balloon__string {
  position: absolute;
  left: 50%;
  top: calc(100% - 7.5rem + 0.6rem);
  width: 3rem;
  height: 6.5rem;
  transform: translateX(-50%);
  overflow: visible;
}
.balloon__string path { fill: none; stroke: var(--plum); stroke-width: 2; stroke-linecap: round; }

.balloon__caption {
  position: absolute;
  right: 0;
  bottom: 1.5rem;
  max-width: 11rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.3;
  color: var(--plum-soft);
  text-align: right;
}

@keyframes balloon-rise {
  from { opacity: 0; transform: translateY(3.5rem) rotate(-4deg); }
  to   { opacity: 1; transform: translateY(0) rotate(0); }
}
@keyframes balloon-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-0.6rem) rotate(1.2deg); }
}
@keyframes holo-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 250% 50%; }
}

/* Chi sono --------------------------------------------------------------- */

.about {
  position: relative;
  padding-block: var(--section);
  background: var(--white);
}

/* sottile nastro olografico tra hero e contenuto */
.about::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--holo);
}

.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}

.about__title {
  font-size: var(--step-3);
  font-variation-settings: "wdth" 85;
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.about__body { max-width: 38rem; font-size: var(--step-1); line-height: 1.65; }
.about__body strong { font-weight: 700; color: var(--plum); }

.about__closing {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 1.2;
  color: var(--magenta-deep);
}

.about__offer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 2.25rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(43, 20, 53, 0.15);
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
}
.about__offer li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
/* stella come nel logo */
.about__offer li::before {
  content: "";
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
  background: var(--magenta);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* Shop ------------------------------------------------------------------- */

.shop { padding-block: var(--section); }

.shop__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 3rem;
  margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--plum);
}

.shop__title { font-size: var(--step-3); font-variation-settings: "wdth" 85; }
.shop__lead { max-width: 30rem; color: var(--plum-soft); margin: 0; }

.shop__embed { min-height: 20rem; }
.shop__fallback {
  padding: 1.5rem;
  border: 2px dashed var(--plum-soft);
  border-radius: 1rem;
  background: var(--white);
}

/* Contatti --------------------------------------------------------------- */

.contact {
  padding-block: var(--section);
  background: var(--plum);
  color: var(--white);
}

.contact a:not(.btn) { color: var(--white); }
.contact a:not(.btn):hover { color: var(--pink-light); }
.contact :focus-visible { outline-color: var(--white); }

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 1rem + 4vw, 5rem);
}

.contact__title { font-size: var(--step-4); font-variation-settings: "wdth" 80; }

.contact__lead {
  max-width: 26rem;
  margin: 1.25rem 0 2rem;
  font-size: var(--step-1);
  color: #E9DDEE; /* 12:1 su plum */
}

.contact__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem var(--gap);
  margin: 0;
}

.contact__item { padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.28); }

.contact__item dt {
  margin-bottom: 0.5rem;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--pink-light);
}

.contact__item dd { margin: 0; }

.contact__item address { font-style: normal; margin-bottom: 0.6rem; }

.contact__big {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.social { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-weight: 600;
}
.social svg { width: 1.4rem; height: 1.4rem; fill: currentColor; }

/* Footer ----------------------------------------------------------------- */

.site-footer {
  padding-block: 2rem;
  background: var(--mist);
  font-size: var(--step--1);
  color: var(--plum-soft);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer__logo { width: 8.5rem; }
.site-footer p { margin: 0; }

/* Responsive ------------------------------------------------------------- */

@media (max-width: 59.99rem) {
  .hero__inner,
  .about__inner,
  .contact__inner { grid-template-columns: minmax(0, 1fr); }

  .hero__text { order: 2; }
  .balloon { order: 1; width: min(78%, 20rem); padding-bottom: 6rem; }
  .balloon__knot { top: calc(100% - 6rem - 0.35rem); }
  .balloon__string { top: calc(100% - 6rem + 0.6rem); height: 5rem; }
  .balloon__caption { position: static; max-width: none; margin-top: -4.5rem; margin-left: 58%; text-align: left; }

  .about__title { position: static; }
}

@media (max-width: 35.99rem) {
  .contact__list { grid-template-columns: minmax(0, 1fr); }
  .hero__actions .btn { flex: 1 1 100%; }
  .balloon__caption { display: none; }
  .balloon { width: min(62%, 15rem); padding-bottom: 4.5rem; }
  .balloon__knot { top: calc(100% - 4.5rem - 0.3rem); width: 1.1rem; height: 0.9rem; }
  .balloon__string { top: calc(100% - 4.5rem + 0.5rem); height: 3.8rem; }
  .hero { padding-top: 1.5rem; }
}

/* Movimento ridotto ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Contrasto elevato di Windows */
@media (forced-colors: active) {
  .btn { border: 2px solid ButtonText; }
  .balloon__body { border: 2px solid CanvasText; }
}
