/*
Theme Name: OMC Maintenance V7
Theme URI: https://omc-italia.it/
Author: OMC Italia
Description: Pagina di manutenzione interattiva OMC Italia.
Version: 1.8.2
Text Domain: omc-maintenance-v7
*/

:root {
  color-scheme: light;
  --ink: #111;
  --muted: #5f6368;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: #fff;
}

body {
  min-height: 100svh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
}

.omc-page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(32px, 7vw, 88px) 24px clamp(34px, 6vw, 58px);
}

.omc-hero {
  display: flex;
  align-items: center;
  justify-content: center;
}

.omc-logo {
  display: block;
  width: min(78vw, 760px);
  height: auto;
}

.omc-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 34px;
  text-align: center;
}

.omc-message {
  min-height: 52px;
  margin: 0;
  opacity: 0;
  transform: translateY(12px) skewX(-8deg);
  font-family: "Hemi Head 426", "Hemi Head", "Inter Display", "Arial Black", sans-serif;
  font-size: clamp(29px, 4vw, 48px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.01em;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.omc-message.is-visible {
  opacity: 1;
  transform: translateY(0) skewX(-8deg);
}

.omc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 250px;
  padding: 16px 30px;
  border: 6px double var(--ink);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .omc-button:not(:disabled):hover {
    background: var(--ink);
    color: #fff;
    transform: translateY(-2px);
  }
}

.omc-button:focus-visible {
  outline: 3px solid #777;
  outline-offset: 5px;
}

.omc-contact {
  margin: 4px 0 0;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.7;
  color: var(--muted);
}

.omc-contact a {
  color: inherit;
  text-decoration: none;
}

.omc-contact a:hover,
.omc-contact a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 560px) {
  .omc-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .omc-logo {
    width: min(92vw, 520px);
  }

  .omc-message {
    min-height: 44px;
  }

  .omc-button {
    min-width: 220px;
    padding: 14px 22px;
    font-size: 17px;
    border-radius: 16px;
  }
}



.omc-button.is-playing,
.omc-button:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
  transform: none;
  background: #fff;
  color: var(--ink);
}

@media (hover: none), (pointer: coarse) {
  .omc-button,
  .omc-button:hover,
  .omc-button:active,
  .omc-button:focus {
    background: #fff;
    color: var(--ink);
    transform: none;
  }
}

/* Stato premuto: resta attivo per tutta la durata della musica. */
.omc-button.is-playing,
.omc-button.is-playing:hover,
.omc-button.is-playing:active,
.omc-button.is-playing:focus,
.omc-button:disabled,
.omc-button:disabled:hover,
.omc-button:disabled:active,
.omc-button:disabled:focus {
  opacity: 1;
  pointer-events: none;
  cursor: default;
  background: var(--ink);
  color: #fff;
  transform: translateY(3px);
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.42),
    0 1px 0 rgba(0, 0, 0, 0.12);
  border-color: var(--ink);
}

/* Invito al clic: un solo gesto discreto, cursore su desktop e dito su mobile. */
.omc-button-stage {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.omc-click-hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 42px;
  margin: 2px 0 0 30px;
  opacity: 0;
  color: var(--ink);
  pointer-events: none;
  transform-origin: 3px 3px;
}

.omc-hint-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: #fff;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.omc-hint-finger {
  display: none;
}

.omc-click-hint::after {
  content: "";
  position: absolute;
  left: -8px;
  top: -8px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.35);
}

.omc-click-hint.is-active {
  animation: omc-cursor-invite 1650ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.omc-click-hint.is-active::after {
  animation: omc-hint-ripple 1650ms ease-out both;
}

@keyframes omc-cursor-invite {
  0%, 12% {
    opacity: 0;
    transform: translate(54px, 40px) rotate(-4deg) scale(0.96);
  }
  22% {
    opacity: 1;
  }
  54% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
  64% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(0.82);
  }
  73%, 86% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(0, 0) rotate(0) scale(1);
  }
}

@keyframes omc-hint-ripple {
  0%, 54% {
    opacity: 0;
    transform: scale(0.35);
  }
  62% {
    opacity: 0.52;
  }
  78%, 100% {
    opacity: 0;
    transform: scale(1.65);
  }
}

@media (hover: none), (pointer: coarse) {
  .omc-click-hint {
    width: 38px;
    height: 49px;
    margin: 7px 0 0 16px;
    transform-origin: 21px 3px;
  }

  .omc-hint-cursor {
    display: none;
  }

  .omc-hint-finger {
    display: block;
  }

  .omc-click-hint::after {
    left: 11px;
    top: -8px;
  }

  .omc-click-hint.is-active {
    animation-name: omc-finger-invite;
  }
}

@keyframes omc-finger-invite {
  0%, 12% {
    opacity: 0;
    transform: translateY(48px) scale(0.96);
  }
  22% {
    opacity: 1;
  }
  54% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  64% {
    opacity: 1;
    transform: translateY(3px) scale(0.9);
  }
  73%, 86% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .omc-click-hint,
  .omc-click-hint::after {
    display: none;
    animation: none !important;
  }
}
/* Tris OMC */
.omc-game {
  display: none;
  position: fixed;
  z-index: 2;
  top: clamp(20px, 3vw, 38px);
  left: clamp(20px, 3vw, 38px);
  width: clamp(194px, 16vw, 226px);
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  text-align: left;
}

.omc-game.is-visible {
  display: block;
  animation: omc-game-enter 360ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.omc-game-kicker,
.omc-game-title,
.omc-game-status {
  margin: 0;
}

.omc-game-kicker {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.omc-game-title {
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.omc-game-status {
  min-height: 20px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.omc-game-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  margin-top: 10px;
  border: 2px solid var(--ink);
  background: #fff;
}

.omc-game.is-visible .omc-game-board {
  box-shadow: 0 0 0 4px #d00000;
  animation: omc-board-red-alert 900ms ease-in-out 3 both;
}

@keyframes omc-board-red-alert {
  0%, 100% {
    box-shadow: 0 0 0 4px #d00000;
  }
  50% {
    box-shadow: 0 0 0 4px rgba(208, 0, 0, 0.16);
  }
}

.omc-game-cell {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  padding: 0;
  border: 0;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 700 clamp(28px, 3vw, 39px)/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.omc-game-cell:nth-child(3n) {
  border-right: 0;
}

.omc-game-cell:nth-child(n + 7) {
  border-bottom: 0;
}

.omc-game-cell:disabled {
  cursor: default;
  opacity: 1;
}

.omc-game-cell.is-winning {
  background: var(--ink);
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .omc-game-cell:not(:disabled):hover {
    background: #ececec;
  }
}

.omc-game-cell:focus-visible,
.omc-game-reset:focus-visible {
  outline: 3px solid #777;
  outline-offset: 3px;
}

.omc-game-reset {
  margin-top: 11px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.omc-game-reset:hover {
  border-bottom-width: 2px;
}

.omc-game-reset.is-reload {
  color: #d00000;
  font-weight: 780;
}

@keyframes omc-game-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .omc-page.is-game-visible {
    grid-template-rows: auto minmax(250px, 1fr) auto;
    row-gap: 12px;
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .omc-page.is-game-visible .omc-hero {
    grid-row: 1;
    align-items: flex-start;
  }

  .omc-page.is-game-visible .omc-logo {
    width: min(70vw, 330px);
  }

  .omc-game.is-visible {
    position: static;
    grid-row: 2;
    align-self: center;
    justify-self: center;
    width: min(72vw, 270px);
    padding: 8px 10px 10px;
    background: #fff;
  }

  .omc-game-title {
    font-size: 23px;
  }

  .omc-game-status {
    margin-top: 5px;
  }

  .omc-game-board {
    margin-top: 7px;
  }

  .omc-game.is-visible .omc-game-board {
  box-shadow: 0 0 0 4px #d00000;
  animation: omc-board-red-alert 900ms ease-in-out 3 both;
}

@keyframes omc-board-red-alert {
  0%, 100% {
    box-shadow: 0 0 0 4px #d00000;
  }
  50% {
    box-shadow: 0 0 0 4px rgba(208, 0, 0, 0.16);
  }
}

.omc-game-cell {
    font-size: clamp(30px, 10vw, 42px);
  }

  .omc-page.is-game-visible .omc-footer {
    grid-row: 3;
    gap: 10px;
    padding-top: 0;
  }

  .omc-page.is-game-visible .omc-message {
    min-height: 34px;
    font-size: clamp(24px, 7vw, 34px);
  }

  .omc-page.is-game-visible .omc-contact {
    margin-top: 0;
    font-size: 14px;
  }
}

@media (max-width: 700px) and (max-height: 720px) {
  .omc-page.is-game-visible {
    grid-template-rows: auto minmax(205px, 1fr) auto;
    row-gap: 6px;
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .omc-page.is-game-visible .omc-logo {
    width: min(60vw, 270px);
  }

  .omc-game.is-visible {
    width: min(62vw, 225px);
    padding-top: 4px;
  }

  .omc-game-kicker {
    display: none;
  }

  .omc-game-title {
    font-size: 20px;
  }

  .omc-game-reset {
    margin-top: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .omc-game.is-visible,
  .omc-game.is-visible .omc-game-board {
    animation: none;
  }
}