/* Shared base for the North Tyne Sites concept demos.
   Mobile-native baseline + the "concept demo" strip. */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1); /* easeOutBack, easings.net */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

html {
  -webkit-tap-highlight-color: transparent; /* no grey flash on tap */
  -webkit-text-size-adjust: 100%;           /* no font inflation in landscape */
}

/* iOS zooms into inputs under 16px and never zooms back out */
input, textarea, select { font-size: 16px; }

/* Fire taps immediately (no double-tap-zoom wait) */
button, a, [role="button"], label { touch-action: manipulation; }

/* Controls aren't content: no text selection on long-press */
button, [role="button"], .btn {
  user-select: none;
  -webkit-user-select: none;
}

/* Press feedback that works for touch and mouse alike */
.btn { transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease; }
.btn:active { transform: scale(0.97); }

/* The concept-demo strip */
.ntsbar {
  background: #1d2327;
  color: #e9ecee;
  font: 500 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.ntsbar a { color: #fff; font-weight: 600; text-underline-offset: 3px; }
.ntsbar a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.field-error[hidden], [data-form-done][hidden], [data-form-summary][hidden], form[hidden] { display: none; }

/* Mobile menu: slides down from the header it belongs to */
@media (max-width: 760px) {
  [data-menu] {
    transform-origin: top center;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
    opacity: 0;
    transform: translateY(-6px);
    visibility: hidden;
  }
  [data-menu].is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0ms !important; animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
  [data-loop] { animation: none !important; }
  .btn:active { transform: none; }
}
