/* Istituto Scolastico Serena Andersen — pagina "in costruzione" */
@font-face { font-family: "Brandon Grotesque"; src: url("../fonts/brandon-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Brandon Grotesque"; src: url("../fonts/brandon-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Brandon Grotesque"; src: url("../fonts/brandon-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Brandon Grotesque"; src: url("../fonts/brandon-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Heyzilla"; src: url("../fonts/heyzilla-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root { --navy: #1E3B6E; --navy-deep: #152B52; --green: #ACC738; --sky: #86B2E0; --red: #D71E4D; --paper: #F7F5F0; --ink-soft: #3E5682; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--navy); color: var(--navy); font: 400 1.0625rem/1.6 "Brandon Grotesque", "Avenir Next", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

.cs { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: clamp(1.25rem, 4vw, 3rem) 1rem; overflow: hidden; isolation: isolate; }
.cs__pattern { position: absolute; inset: 0; z-index: -1; background: url("../img/sa-pattern-light.svg") center / 900px auto repeat; opacity: .3; }
.cs__photo { position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, rgba(21,43,82,.82), rgba(21,43,82,.94)), url("../video/hero-poster.jpg") center / cover no-repeat; }

.cs__panel {
  position: relative; width: min(100%, 640px); padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.25rem);
  background: var(--paper); border-radius: 28px; text-align: center;
  box-shadow: 0 50px 100px -40px rgba(0,0,0,.65);
  animation: rise .9s cubic-bezier(.2,.7,.2,1) both;
}
.cs__panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; border-radius: 28px 28px 0 0; background: linear-gradient(90deg, var(--navy) 0 25%, var(--green) 25% 50%, var(--sky) 50% 75%, var(--red) 75% 100%); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.cs__logo { width: 120px; height: auto; margin: 0 auto 1.25rem; }
.cs__script { margin: 0; font-family: "Heyzilla", cursive; font-size: clamp(2.6rem, 8vw, 4rem); line-height: 1.05; color: var(--red); }
.cs__title { margin: .75rem 0 .4rem; font-size: clamp(1.5rem, 4.4vw, 2.1rem); font-weight: 900; line-height: 1.1; letter-spacing: -.005em; }
.cs__text { margin: 0 auto; max-width: 34ch; color: var(--ink-soft); font-size: 1.1rem; }

/* Barra "lavori in corso" con i quattro colori del brand */
.cs__progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: min(100%, 280px); margin: 1.6rem auto; }
.cs__progress span { height: 6px; border-radius: 6px; background: var(--c); transform-origin: left; animation: build 2.4s cubic-bezier(.6,0,.2,1) infinite; }
.cs__progress span:nth-child(1) { --c: var(--navy); }
.cs__progress span:nth-child(2) { --c: var(--green); animation-delay: .2s; }
.cs__progress span:nth-child(3) { --c: var(--sky); animation-delay: .4s; }
.cs__progress span:nth-child(4) { --c: var(--red); animation-delay: .6s; }
@keyframes build { 0% { transform: scaleX(0); } 40%, 80% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: .25; } }

.cs__quick { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 1.4rem; padding: 0; }
.cs__quick a { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .85rem .3rem; border-radius: 14px; background: var(--navy); color: #fff; text-decoration: none; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; transition: background-color .2s, transform .2s; }
.cs__quick svg { width: 22px; height: 22px; fill: var(--sky); }
.cs__quick a:hover { background: var(--red); transform: translateY(-2px); }
.cs__quick a:hover svg { fill: #fff; }

.cs__contacts { font-style: normal; font-size: 1rem; line-height: 1.6; }
.cs__contacts p { margin: 0; }
.cs__contacts a { text-decoration-color: var(--sky); text-underline-offset: 3px; }
.cs__social { list-style: none; display: flex; justify-content: center; gap: 1.25rem; margin: 1rem 0 0; padding: 0; font-weight: 700; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; }
.cs__social a { text-decoration: none; color: var(--red); }

.cs__gate { margin: 1.6rem auto 0; padding-top: 1.1rem; border-top: 1px solid rgba(30,59,110,.14); }
.cs__gate summary { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; list-style: none; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.cs__gate summary::-webkit-details-marker { display: none; }
.cs__gate summary svg { width: 16px; height: 16px; fill: currentColor; }
.cs__form { margin-top: .9rem; text-align: left; }
.cs__form label { display: block; margin-bottom: .35rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; }
.cs__field { display: flex; gap: 8px; }
.cs__field input { flex: 1; min-width: 0; min-height: 48px; padding: .6rem .9rem; border: 1.5px solid rgba(30,59,110,.3); border-radius: 12px; background: #fff; font: inherit; color: var(--navy); }
.cs__field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(134,178,224,.5); }
.cs__field button { min-height: 48px; padding: 0 1.3rem; border: 0; border-radius: 999px; background: var(--navy); color: #fff; font: 700 .85rem/1 "Brandon Grotesque", sans-serif; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.cs__field button:hover { background: var(--red); }
.cs__error { margin: .5rem 0 0; color: var(--red); font-weight: 500; }
.cs__foot { margin: 1.4rem 0 0; font-size: .78rem; color: var(--ink-soft); letter-spacing: .04em; }

@media (max-width: 480px) {
  .cs__quick { grid-template-columns: repeat(2, 1fr); }
  .cs__logo { width: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .cs__panel, .cs__progress span { animation: none; }
}
