:root {
      --orange: #F2562B;
      --orange-soft: rgba(242, 86, 43, 0.08);
      --black: #171717;
      --dark-gray: #4D4D4D;
      --light-gray: #DEDEDE;
      --white: #FFFFFF;
      --bg: #FAFAFA;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    html { scroll-behavior: smooth; }

    body {
      font-family: 'DM Sans', sans-serif;
      background: var(--white);
      color: var(--black);
      line-height: 1.5;
    }

    img { max-width: 100%; display: block; }
    button { font-family: inherit; cursor: pointer; border: none; background: none; }

    :focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

    /* INTRO */
    #intro {
      position: fixed;
      inset: 0;
      background: var(--white);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      transition: opacity 0.6s, visibility 0.6s;
    }
    #intro.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

    .intro-logo-wrapper {
      position: relative;
      width: clamp(180px, 35vw, 300px);
    }

    .intro-logo {
      width: 100%;
      opacity: 0;
      animation: logoIn 0.6s ease-out 0.35s forwards;
    }

    .intro-circle {
      position: absolute;
      border-radius: 50%;
      background: #F26A2E;
      opacity: 0;
    }

    .intro-circle-1 {
      width: 7.5%;
      height: auto;
      aspect-ratio: 1;
      /* FINAL position - animation transforms FROM center TO here */
      position: absolute;
      bottom: 4%;
      left: 2%;
      /* GPU-optimized: will-change hints browser to optimize */
      will-change: transform, opacity;
      animation: circleMove1 0.5s ease-out forwards,
                 circleFade 0.3s ease-out 0.8s forwards;
    }

    .intro-circle-2 {
      width: 7.5%;
      height: auto;
      aspect-ratio: 1;
      /* FINAL position - animation transforms FROM center TO here */
      position: absolute;
      top: 13%;
      right: 2%;
      /* GPU-optimized: will-change hints browser to optimize */
      will-change: transform, opacity;
      animation: circleMove2 0.5s ease-out forwards,
                 circleFade 0.3s ease-out 0.8s forwards;
    }

    /* GPU-OPTIMIZED: Only transform and opacity (compositor properties) */
    /* Elements positioned at FINAL location, animation moves FROM center */
    @keyframes circleMove1 {
      0% {
        opacity: 1;
        /* Start at center: translate from final bottom-left to center */
        transform: translate(calc(50vw - 50% - 2%), calc(-50vh + 50% + 4%)) scale(0.3);
      }
      100% {
        opacity: 1;
        /* End at final position (no transform needed) */
        transform: translate(0, 0) scale(1);
      }
    }

    @keyframes circleMove2 {
      0% {
        opacity: 1;
        /* Start at center: translate from final top-right to center */
        transform: translate(calc(-50vw + 50% + 2%), calc(50vh - 50% - 13%)) scale(0.3);
      }
      100% {
        opacity: 1;
        /* End at final position (no transform needed) */
        transform: translate(0, 0) scale(1);
      }
    }

    @keyframes circleFade {
      to { opacity: 0; }
    }

    @keyframes logoIn {
      0% { opacity: 0; transform: scale(0.9) translateY(15px); }
      100% { opacity: 1; transform: scale(1) translateY(0); }
    }

    .intro-tagline {
      margin-top: 20px;
      font-size: 12px;
      font-weight: 500;
      color: var(--dark-gray);
      letter-spacing: 0.15em;
      text-transform: uppercase;
      opacity: 0;
      animation: fadeIn 0.5s ease 0.9s forwards;
    }

    @keyframes fadeIn { to { opacity: 1; } }

    /* SITE */
    #site { opacity: 0; transition: opacity 0.6s; }
    #site.visible { opacity: 1; }

    /* HEADER */
    header {
      position: sticky;
      top: 0;
      background: rgba(255,255,255,0.95);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--light-gray);
      z-index: 100;
      padding: 12px 24px;
    }

    .header-inner {
      max-width: 1100px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }

    .brand-logo { height: 36px; }

    .lang-switcher {
      display: flex;
      gap: 2px;
      background: var(--bg);
      padding: 3px;
      border-radius: 20px;
    }

    .lang-btn {
      padding: 5px 10px;
      font-size: 11px;
      font-weight: 600;
      color: var(--dark-gray);
      border-radius: 20px;
      transition: 0.15s;
    }
    .lang-btn.active { background: var(--white); color: var(--black); }

    /* MAIN */
    main { max-width: 1100px; margin: 0 auto; }

    /* HERO SECTION */
    .hero {
      min-height: 70vh;
      display: flex;
      align-items: center;
      padding: 60px 24px;
      gap: 60px;
    }

    .hero-content { flex: 1; max-width: 500px; }

    .hero-visual {
      flex: 1;
      aspect-ratio: 1;
      max-width: 450px;
      background: linear-gradient(135deg, var(--orange) 0%, #ff7b54 50%, #ffb347 100%);
      border-radius: 30px;
      position: relative;
      overflow: hidden;
    }

    .hero-visual::before {
      content: '';
      position: absolute;
      inset: 0;
      background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M30 30c0-11.046 8.954-20 20-20s20 8.954 20 20-8.954 20-20 20-20-8.954-20-20z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    }

    .hero-visual::after {
      content: '';
      position: absolute;
      bottom: -20%;
      right: -20%;
      width: 80%;
      height: 80%;
      background: rgba(255,255,255,0.1);
      border-radius: 50%;
    }

    .hero-icon {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 100px;
      height: 100px;
      background: rgba(255,255,255,0.2);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .hero-icon svg { width: 50px; height: 50px; color: white; }

    .eyebrow {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--orange);
      margin-bottom: 12px;
    }

    h1 {
      font-size: clamp(32px, 5vw, 48px);
      font-weight: 700;
      line-height: 1.1;
      margin-bottom: 16px;
    }

    .subtitle {
      font-size: 16px;
      color: var(--dark-gray);
      margin-bottom: 28px;
    }

    .highlight { color: var(--orange); }

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 14px 28px;
      font-size: 14px;
      font-weight: 600;
      border-radius: 30px;
      transition: 0.2s;
      text-decoration: none;
    }

    .btn-primary {
      background: var(--orange);
      color: white;
      box-shadow: 0 4px 15px rgba(242,86,43,0.35);
    }
    .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(242,86,43,0.4); }

    .btn svg { width: 16px; height: 16px; }

    /* VALUES SECTION */
    .values-section {
      padding: 80px 24px;
      background: var(--bg);
    }

    .values-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 24px;
    }

    .value-card {
      background: var(--white);
      border-radius: 20px;
      padding: 40px 30px;
      text-align: center;
      transition: 0.3s;
    }
    .value-card:hover { transform: translateY(-5px); box-shadow: 0 10px 40px rgba(0,0,0,0.08); }

    .value-icon {
      width: 70px;
      height: 70px;
      margin: 0 auto 20px;
      background: linear-gradient(135deg, var(--orange-soft) 0%, rgba(242,86,43,0.02) 100%);
      border-radius: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .value-icon svg { width: 32px; height: 32px; color: var(--orange); }

    .value-card h3 { font-size: 18px; margin-bottom: 8px; }
    .value-card p { font-size: 14px; color: var(--dark-gray); }

    /* TEASER SECTION */
    .teaser-section {
      padding: 100px 24px;
      display: flex;
      align-items: center;
      gap: 60px;
    }

    .teaser-visual {
      flex: 1;
      aspect-ratio: 4/3;
      max-width: 500px;
      background: linear-gradient(145deg, var(--black) 0%, #2d2d2d 100%);
      border-radius: 30px;
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .teaser-visual::before {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: radial-gradient(circle at 30% 30%, rgba(242,86,43,0.15) 0%, transparent 50%);
    }

    .teaser-badge {
      position: absolute;
      top: 20px;
      left: 20px;
      padding: 6px 14px;
      background: var(--orange);
      color: white;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      border-radius: 20px;
    }

    .teaser-icon-wrapper {
      width: 120px;
      height: 120px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .teaser-icon-wrapper svg { width: 50px; height: 50px; color: var(--orange); }

    .teaser-content { flex: 1; max-width: 450px; }
    .teaser-content h2 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 16px; line-height: 1.2; }
    .teaser-content p { font-size: 15px; color: var(--dark-gray); margin-bottom: 12px; }

    /* SIGNUP SECTION */
    .signup-section {
      padding: 80px 24px;
    }

    .signup-card {
      max-width: 480px;
      margin: 0 auto;
      background: var(--white);
      border: 1px solid var(--light-gray);
      border-radius: 24px;
      padding: 40px;
      text-align: center;
    }

    .signup-card h2 {
      font-size: 24px;
      margin-bottom: 8px;
    }

    .signup-card > p {
      font-size: 14px;
      color: var(--dark-gray);
      margin-bottom: 24px;
    }

    .signup-form {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .signup-input {
      width: 100%;
      padding: 14px 20px;
      font-size: 14px;
      font-family: inherit;
      border: 1px solid var(--light-gray);
      border-radius: 12px;
      transition: 0.2s;
    }

    .signup-input:focus {
      outline: none;
      border-color: var(--orange);
      box-shadow: 0 0 0 3px var(--orange-soft);
    }

    .consent-checkbox {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      text-align: left;
    }

    .consent-checkbox input[type="checkbox"] {
      width: 18px;
      height: 18px;
      margin-top: 2px;
      accent-color: var(--orange);
      cursor: pointer;
      flex-shrink: 0;
    }

    .consent-checkbox label {
      font-size: 12px;
      color: var(--dark-gray);
      cursor: pointer;
      line-height: 1.4;
    }

    .consent-checkbox a {
      color: var(--orange);
    }

    .signup-btn {
      position: relative;
      width: 100%;
      padding: 14px 28px;
      font-size: 14px;
      font-weight: 600;
      border-radius: 30px;
      background: var(--orange);
      color: white;
      box-shadow: 0 4px 15px rgba(242,86,43,0.35);
      transition: 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .signup-btn:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(242,86,43,0.4);
    }

    .signup-btn:disabled {
      background: var(--light-gray);
      color: var(--dark-gray);
      cursor: not-allowed;
      box-shadow: none;
    }

    .signup-btn:disabled:hover {
      transform: none;
    }

    .signup-spinner {
      display: none;
      position: absolute;
      width: 20px;
      height: 20px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

    .signup-btn.loading .signup-spinner {
      display: block;
    }

    .signup-btn.loading .btn-text {
      visibility: hidden;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* TOAST NOTIFICATIONS */
    #toastContainer {
      position: fixed;
      top: 24px;
      right: 24px;
      z-index: 1002;
      display: flex;
      flex-direction: column;
      gap: 12px;
      pointer-events: none;
    }

    .toast {
      background: var(--black);
      color: white;
      padding: 14px 20px;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      transform: translateX(120%);
      opacity: 0;
      transition: transform 0.3s ease, opacity 0.3s ease;
      pointer-events: auto;
      max-width: 320px;
      font-size: 14px;
    }

    .toast-visible {
      transform: translateX(0);
      opacity: 1;
    }

    .toast-success {
      background: #2E7D32;
    }

    .toast-error {
      background: #C62828;
    }

    /* Screen reader only */
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    /* FOOTER */
    footer {
      padding: 24px;
      border-top: 1px solid var(--light-gray);
      margin-top: 60px;
    }

    .footer-inner {
      max-width: 1100px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
    }

    .footer-left { display: flex; align-items: center; gap: 12px; }
    .footer-logo { height: 24px; }
    .footer-copy { font-size: 12px; color: var(--dark-gray); }
    .footer-right { font-size: 11px; color: var(--dark-gray); }

    /* CHECKBOX CONSENT */
    .consent-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin: 16px 0;
    }
    .consent-row input[type="checkbox"] {
      width: 18px;
      height: 18px;
      margin-top: 2px;
      accent-color: var(--orange);
      cursor: pointer;
    }
    .consent-row label {
      font-size: 12px;
      color: var(--dark-gray);
      cursor: pointer;
      line-height: 1.4;
    }
    .consent-row a { color: var(--orange); }

    /* FOOTER LINKS */
    .footer-links {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
      margin-top: 8px;
    }
    .footer-links a {
      font-size: 12px;
      color: var(--dark-gray);
      text-decoration: none;
    }
    .footer-links a:hover { color: var(--orange); }
    .footer-legal {
      font-size: 11px;
      color: var(--dark-gray);
      margin-top: 4px;
    }

    /* RESPONSIVE */
    @media (max-width: 900px) {
      .hero { flex-direction: column; text-align: center; min-height: auto; padding: 40px 24px; }
      .hero-content { max-width: 100%; }
      .hero-visual { max-width: 300px; }

      .values-grid { grid-template-columns: 1fr; }

      .teaser-section { flex-direction: column; text-align: center; padding: 60px 24px; }
      .teaser-content { max-width: 100%; }
      .teaser-visual { max-width: 350px; }

      .header-inner { justify-content: center; }
    }

    @media (max-width: 600px) {
      .hero-visual { max-width: 250px; }

      .signup-card {
        padding: 30px 20px;
      }

      #toastContainer {
        top: 12px;
        right: 12px;
        left: 12px;
      }

      .toast {
        max-width: none;
      }
    }

    /* LANG */
    [data-lang="en"] { display: none; }
    html[lang="en"] [data-lang="en"] { display: block; }
    html[lang="en"] [data-lang="it"] { display: none; }
    span[data-lang="en"] { display: none; }
    html[lang="en"] span[data-lang="en"] { display: inline; }
    html[lang="en"] span[data-lang="it"] { display: none; }

    /* COOKIE BANNER */
    .cookie-banner {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: var(--white);
      border-top: 1px solid var(--light-gray);
      box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
      padding: 20px 24px;
      z-index: 1001;
      display: none;
    }
    .cookie-banner.visible { display: block; animation: slideUp 0.3s ease; }
    @keyframes slideUp {
      from { transform: translateY(100%); }
      to { transform: translateY(0); }
    }
    .cookie-banner-inner {
      max-width: 1100px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      flex-wrap: wrap;
    }
    .cookie-text {
      flex: 1;
      min-width: 280px;
    }
    .cookie-text h4 {
      font-size: 15px;
      margin-bottom: 6px;
    }
    .cookie-text p {
      font-size: 13px;
      color: var(--dark-gray);
      margin: 0;
    }
    .cookie-text a { color: var(--orange); }
    .cookie-buttons {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }
    .cookie-btn {
      min-width: 120px;
      padding: 12px 24px;
      font-size: 14px;
      font-weight: 600;
      text-align: center;
      border-radius: 25px;
      transition: 0.2s;
    }
    .cookie-btn-accept {
      background: var(--orange);
      color: white;
      border: 2px solid var(--orange);
    }
    .cookie-btn-accept:hover { opacity: 0.9; }
    .cookie-btn-reject {
      background: var(--white);
      color: var(--dark-gray);
      border: 2px solid var(--dark-gray);
    }
    .cookie-btn-reject:hover { background: var(--bg); }
    .cookie-btn-settings {
      background: transparent;
      color: var(--dark-gray);
      border: 2px solid var(--light-gray);
    }
    .cookie-btn-settings:hover { background: var(--bg); }

    /* COOKIE SETTINGS PANEL */
    .cookie-settings-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1002;
    }
    .cookie-settings-overlay.visible {
      display: flex;
    }
    .cookie-settings-panel {
      background: var(--white);
      border-radius: 20px;
      padding: 32px;
      max-width: 480px;
      width: 90%;
      max-height: 80vh;
      overflow-y: auto;
    }
    .cookie-settings-title {
      font-size: 20px;
      margin-bottom: 24px;
    }
    .cookie-category {
      padding: 16px 0;
      border-bottom: 1px solid var(--light-gray);
    }
    .cookie-category:last-of-type {
      border-bottom: none;
    }
    .cookie-category-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }
    .cookie-category-name {
      font-weight: 600;
      font-size: 15px;
    }
    .cookie-category-desc {
      font-size: 13px;
      color: var(--dark-gray);
      margin: 0;
    }
    /* Toggle switch styling */
    .cookie-toggle {
      position: relative;
      width: 44px;
      height: 24px;
    }
    .cookie-toggle input {
      opacity: 0;
      width: 0;
      height: 0;
    }
    .cookie-toggle-slider {
      position: absolute;
      cursor: pointer;
      inset: 0;
      background: var(--light-gray);
      border-radius: 24px;
      transition: 0.2s;
    }
    .cookie-toggle-slider::before {
      content: '';
      position: absolute;
      height: 18px;
      width: 18px;
      left: 3px;
      bottom: 3px;
      background: white;
      border-radius: 50%;
      transition: 0.2s;
    }
    .cookie-toggle input:checked + .cookie-toggle-slider {
      background: var(--orange);
    }
    .cookie-toggle input:checked + .cookie-toggle-slider::before {
      transform: translateX(20px);
    }
    .cookie-toggle input:disabled + .cookie-toggle-slider {
      opacity: 0.6;
      cursor: not-allowed;
    }
    .cookie-settings-buttons {
      display: flex;
      gap: 12px;
      margin-top: 24px;
    }
    .cookie-settings-buttons .cookie-btn {
      flex: 1;
    }

    /* Accessibility: Respect user's motion preferences */
    @media (prefers-reduced-motion: reduce) {
      /* Skip circle animation entirely - decorative element */
      .intro-circle {
        animation: none;
        opacity: 0;
      }

      /* Show logo immediately without animation */
      .intro-logo {
        animation: none;
        opacity: 1;
        transform: none;
      }

      /* Show tagline immediately */
      .intro-tagline {
        animation: none;
        opacity: 1;
      }

      /* Instant intro transition */
      #intro {
        transition-duration: 0s;
      }

      /* Disable hover transforms */
      .value-card:hover,
      .btn-primary:hover {
        transform: none;
      }

      /* Disable cookie banner slide animation */
      .cookie-banner.visible {
        animation: none;
      }
    }
