/* Gianinetto Rappresentanze */

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Oswald";
  src: url("../fonts/oswald-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --yellow: #ffcc00;
  --black: #000;
  --alt: #121314;
  --text: #fff;
  --heading: #f1f3f6;
  --muted: rgba(255, 255, 255, .7);
  --link: #a7b3bf;
  --line: rgba(146, 160, 175, .2);
  --header-h: 80px;
  --container: 1140px;
  --gutter: 20px;
  --font: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  color-scheme: dark;
}

/* Base */

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

html {
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--black);
  color: var(--text);
  font: 400 15px/1.8 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--heading);
  font-weight: 700;
  line-height: 1.3;
}

p {
  margin: 0 0 1em;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: .5em 1em;
  background: var(--yellow);
  color: #000;
  font-weight: 700;
}

.skip-link:focus {
  top: 10px;
}

.icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--yellow);
  color: #000;
}

.icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 0;
  border-radius: 0;
  background: var(--yellow);
  color: #000;
  font: 600 14px/1.4 var(--font);
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s;
}

.btn:hover {
  background: #fff;
}

.btn:disabled {
  opacity: .6;
  cursor: wait;
}

/* Header */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: var(--black);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo img {
  width: 214px;
}

.nav ul {
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s;
}

.nav a:hover,
.nav a[aria-current="true"] {
  color: var(--yellow);
}

.nav-toggle {
  display: none;
}

@media (max-width: 767px) {
  :root {
    --header-h: 64px;
  }

  .header__logo img {
    width: 168px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    cursor: pointer;
  }

  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform .25s, background-color .25s;
  }

  .nav-toggle__bars {
    position: relative;
  }

  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .nav-toggle__bars::before {
    top: -7px;
  }

  .nav-toggle__bars::after {
    top: 7px;
  }

  .menu-open .nav-toggle__bars {
    background: transparent;
  }

  .menu-open .nav-toggle__bars::before {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-open .nav-toggle__bars::after {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    padding: 4px var(--gutter) 16px;
    border-top: 1px solid var(--line);
    background: var(--black);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }

  .menu-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav ul {
    flex-direction: column;
    gap: 0;
  }

  .nav li + li {
    border-top: 1px solid var(--line);
  }

  .nav a {
    padding: 14px 0;
  }
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  min-height: 440px;
  max-height: 1000px;
  padding: 40px var(--gutter);
  overflow: hidden;
  text-align: center;
  isolation: isolate;
}

.hero picture {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .5));
}

.hero h1 {
  color: #fff;
  font: 700 clamp(2.6rem, 7vw, 4.75rem)/1.12 var(--font-display);
  text-transform: uppercase;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .4);
}

.hero h1 span {
  display: block;
}

.hero p {
  margin: .15em 0 0;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 300;
  line-height: 1.2;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .5);
}

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  width: 26px;
  height: 40px;
  margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 13px;
}

.hero__scroll::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: scroll-cue 1.8s ease-in-out infinite;
}

@keyframes scroll-cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* Sections */

.section {
  padding-block: clamp(56px, 8vw, 90px);
}

.section--alt {
  background: var(--alt);
}

.title {
  margin-bottom: 40px;
  font-size: clamp(1.5rem, 3.5vw, 1.875rem);
  line-height: 1.33;
  text-align: center;
  text-transform: uppercase;
}

.title::after {
  content: "";
  display: block;
  width: 100px;
  height: 3px;
  margin: 14px auto 0;
  background: var(--yellow);
}

.lead {
  max-width: 820px;
  margin: 0 auto 48px;
  text-align: center;
}

/* Strengths */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 30px;
}

.feature {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.feature h3 {
  margin: 8px 0 6px;
  font-size: 16px;
}

@media (max-width: 860px) {
  .features {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

/* Brand cards */

.brands {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--yellow);
  color: #000;
  text-decoration: none;
  transition: transform .25s, box-shadow .25s;
}

.brand-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #fff;
}

.brand-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 16px 14px 20px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.brand-card strong {
  margin-bottom: 4px;
  font-size: 15px;
  text-transform: uppercase;
}

.brand-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
  transform: translateY(-4px);
}

@media (max-width: 960px) {
  .brands {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
    margin-inline: auto;
  }
}

@media (max-width: 400px) {
  .brands {
    gap: 14px;
  }

  .brand-card__body {
    padding: 12px 8px 14px;
    font-size: 13px;
  }

  .brand-card strong {
    font-size: 13px;
  }
}

/* Brand details */

.brand {
  padding-block: clamp(48px, 7vw, 80px);
}

.brand__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
}

.brand--reverse .brand__media {
  order: -1;
}

.brand__media img {
  width: 100%;
  border: 4px solid #fff;
}

.kicker {
  margin-bottom: 26px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}

.kicker::after {
  content: "";
  display: block;
  width: 70px;
  height: 2px;
  margin-top: 6px;
  background: var(--yellow);
}

.brand h2 {
  margin-bottom: 20px;
  font-size: clamp(1.625rem, 3vw, 1.875rem);
}

.brand .btn {
  margin-top: 12px;
}

@media (max-width: 860px) {
  .brand__inner {
    grid-template-columns: 1fr;
  }

  .brand--reverse .brand__media {
    order: 0;
  }
}

/* Contacts */

.contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 40px;
}

.contact h3 {
  margin-bottom: 15px;
  font-size: 18px;
}

.form {
  display: grid;
  gap: 10px;
}

.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #111;
  font: 400 14px/1.4 var(--font);
}

.form textarea {
  min-height: 120px;
  resize: vertical;
}

.form ::placeholder {
  color: #80868e;
  opacity: 1;
}

.form input:focus-visible,
.form textarea:focus-visible {
  outline-offset: 0;
}

.form__privacy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form__privacy input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--yellow);
}

.form__privacy a {
  color: var(--yellow);
}

.form .btn {
  justify-self: start;
  margin-top: 6px;
}

.form__status {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.form__status:empty {
  display: none;
}

.form__status.is-ok {
  color: var(--yellow);
}

.form__status.is-error {
  color: #ff8a80;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.checklist {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 24px;
}

.checklist li::before {
  content: "";
  position: absolute;
  top: .6em;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
}

.bars {
  display: grid;
  gap: 14px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
}

.bar__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.bar__track {
  display: block;
  height: 5px;
  background: rgba(255, 255, 255, .1);
}

.bar__fill {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--yellow);
  transition: width 1.4s cubic-bezier(.2, .7, .2, 1);
}

.js .bars:not(.is-visible) .bar__fill {
  width: 0;
}

.contact-info {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.contact-info h3 {
  margin: 8px 0 4px;
  font-size: 16px;
}

.contact-info a {
  color: var(--link);
}

.contact-info a:hover {
  color: var(--yellow);
}

@media (max-width: 960px) {
  .contact {
    grid-template-columns: 1fr 1fr;
  }

  .contact > :first-child {
    grid-column: 1 / -1;
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .contact {
    grid-template-columns: 1fr;
  }
}

/* Footer */

.footer {
  padding-block: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
}

.footer p {
  margin: 0;
}

.footer a {
  transition: color .2s;
}

.footer a:hover {
  color: var(--yellow);
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: rgba(34, 34, 34, .92);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s, background-color .2s, color .2s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.to-top:hover {
  background: var(--yellow);
  color: #000;
}

.to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Text pages (privacy, form result) */

.page {
  padding-block: clamp(48px, 7vw, 80px);
}

.prose {
  max-width: 780px;
}

.prose h1 {
  margin-bottom: 24px;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.prose h2 {
  margin: 36px 0 10px;
  font-size: 18px;
}

.prose ul {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

.prose a {
  color: var(--yellow);
}

.prose .btn {
  margin-top: 12px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
