:root {
  --blue: #06449b;
  --blue-deep: #032c67;
  --red: #d31f35;
  --green: #3cac4d;
  --yellow: #e3db00;
  --ink: #10233f;
  --muted: #63738a;
  --paper: #f8fbff;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: .022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.waiting-page {
  display: grid;
  grid-template-columns: minmax(0, 47%) minmax(0, 53%);
  width: 100%;
  max-width: 100%;
  min-height: 100svh;
  overflow: hidden;
}

.content-panel {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  max-width: 100%;
  background:
    radial-gradient(circle at 8% 92%, rgba(60, 172, 77, .12), transparent 25%),
    linear-gradient(135deg, #fff 0%, var(--paper) 100%);
}

.content-panel::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 0;
  width: 9px;
  height: 100%;
  background: linear-gradient(to bottom, var(--blue) 0 44%, var(--red) 44% 70%, var(--green) 70% 100%);
}

.content-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 100%;
  padding: clamp(2rem, 5vw, 5.5rem);
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-width: 0;
  max-width: 100%;
}

.brand { display: inline-block; }
.brand img { display: block; width: 142px; height: 96px; object-fit: contain; mix-blend-mode: multiply; }

.location {
  min-width: 0;
  max-width: 45%;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  overflow-wrap: anywhere;
  text-align: right;
  text-transform: uppercase;
}

.message-block {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-width: 0;
  max-width: 720px;
  padding-block: clamp(4rem, 8vh, 8rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0 0 1.5rem;
  color: var(--blue);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow span { width: 34px; height: 3px; background: var(--red); }

h1 {
  width: 100%;
  min-width: 0;
  max-width: 790px;
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(3.4rem, 6.6vw, 7rem);
  font-weight: 800;
  letter-spacing: -.065em;
  line-height: .96;
  overflow-wrap: anywhere;
  word-break: normal;
}

h1 em {
  color: var(--blue);
  font-style: normal;
}

.intro {
  width: 100%;
  min-width: 0;
  max-width: 660px;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.status-line {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: .75rem;
  margin-top: 2.25rem;
  padding: .7rem 1.1rem;
  color: var(--blue-deep);
  background: rgba(6, 68, 155, .08);
  border: 1px solid rgba(6, 68, 155, .12);
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 700;
  max-width: 100%;
}

.status-dot {
  position: relative;
  width: 9px;
  height: 9px;
  background: var(--green);
  border-radius: 50%;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1px solid var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}

.contact-footer { width: 100%; min-width: 0; max-width: 100%; padding-top: 1.5rem; border-top: 1px solid rgba(16, 35, 63, .12); }
.contact-footer p { margin: 0 0 .4rem; color: var(--muted); font-size: .88rem; }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; min-width: 0; max-width: 100%; gap: .7rem; }
.contact-links a { min-width: 0; max-width: 100%; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; text-decoration: none; }
.contact-links a:hover, .contact-links a:focus { color: var(--blue); text-decoration: underline; }

.visual-panel {
  position: relative;
  min-width: 0;
  max-width: 100%;
  min-height: 100svh;
  overflow: hidden;
  background: var(--blue-deep);
}

.visual-panel > img {
  width: 100%;
  height: 100%;
  min-height: 100svh;
  object-fit: cover;
  object-position: center;
  animation: settle 1.4s cubic-bezier(.2,.7,.2,1) both;
}

.visual-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 28, 67, .04), rgba(2, 28, 67, .46)),
    linear-gradient(90deg, rgba(3, 44, 103, .18), transparent 45%);
}

.motto-card {
  position: absolute;
  left: clamp(2rem, 5vw, 5rem);
  bottom: clamp(2rem, 5vw, 5rem);
  min-width: min(390px, calc(100% - 4rem));
  padding: 1.5rem 1.75rem;
  color: #fff;
  background: rgba(3, 44, 103, .88);
  border-left: 5px solid var(--yellow);
  backdrop-filter: blur(12px);
}

.motto-label {
  display: block;
  margin-bottom: .45rem;
  color: rgba(255,255,255,.68);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.motto-card strong { font-family: 'Manrope', sans-serif; font-size: clamp(1.5rem, 2.5vw, 2.3rem); line-height: 1.13; }

.visual-mark {
  position: absolute;
  top: 3rem;
  right: -1rem;
  color: rgba(255,255,255,.14);
  font-family: 'Manrope', sans-serif;
  font-size: clamp(5rem, 10vw, 11rem);
  font-weight: 800;
  letter-spacing: -.07em;
}

@keyframes pulse {
  0% { opacity: .8; transform: scale(.6); }
  75%, 100% { opacity: 0; transform: scale(1.5); }
}

@keyframes settle {
  from { opacity: .75; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1050px) {
  .waiting-page { grid-template-columns: 1fr; }
  .content-panel { min-height: 70svh; }
  .content-panel::after { top: auto; right: 0; bottom: -1px; width: 100%; height: 8px; background: linear-gradient(to right, var(--blue) 0 44%, var(--red) 44% 70%, var(--green) 70% 100%); }
  .visual-panel, .visual-panel > img { min-height: 62svh; }
  .message-block { padding-block: 5rem; }
  h1 { font-size: clamp(3.15rem, 9vw, 5.8rem); }
}

@media (max-width: 575.98px) {
  .content-inner {
    padding:
      max(1.25rem, env(safe-area-inset-top))
      max(1.1rem, env(safe-area-inset-right))
      max(1.5rem, env(safe-area-inset-bottom))
      max(1.1rem, env(safe-area-inset-left));
  }
  .brand-header { align-items: flex-start; gap: .75rem; }
  .brand img { width: 112px; height: 78px; }
  .location { max-width: 42%; font-size: .66rem; line-height: 1.35; }
  .message-block { padding-block: 3.5rem; }
  .eyebrow { align-items: flex-start; font-size: .7rem; line-height: 1.4; }
  .eyebrow span { flex: 0 0 28px; width: 28px; margin-top: .42rem; }
  h1 { font-size: clamp(2.15rem, 10.5vw, 3.45rem); letter-spacing: -.045em; line-height: 1.02; }
  .intro { margin-top: 1.35rem; font-size: 1rem; line-height: 1.6; }
  .status-line { align-self: stretch; width: 100%; margin-top: 1.6rem; padding: .72rem .9rem; border-radius: 1rem; font-size: .8rem; }
  .contact-links { align-items: flex-start; flex-direction: column; gap: .3rem; }
  .contact-links span { display: none; }
  .visual-panel, .visual-panel > img { width: 100%; min-height: 54svh; }
  .motto-card { left: 1.1rem; bottom: 1.1rem; width: calc(100% - 2.2rem); min-width: 0; max-width: calc(100% - 2.2rem); padding: 1.15rem 1.2rem; }
  .motto-card strong { font-size: 1.45rem; }
  .visual-mark { top: 1rem; }
}

@media (max-width: 360px) {
  .brand img { width: 96px; height: auto; }
  .message-block { padding-block: 3rem; }
  h1 { font-size: 2.05rem; }
  .status-line { align-items: flex-start; }
  .status-dot { flex: 0 0 9px; margin-top: .3rem; }
}

/* Page 404 */
.error-body {
  color: #fff;
  background: var(--blue-deep);
}

.error-page {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1.25rem, 5vw, 4rem);
  overflow: hidden;
}

.error-background,
.error-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.error-background {
  object-fit: cover;
  object-position: center;
}

.error-overlay {
  background: linear-gradient(135deg, rgba(3, 44, 103, .96), rgba(3, 44, 103, .7));
}

.error-card {
  position: relative;
  z-index: 2;
  width: min(100%, 680px);
  padding: clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  background: rgba(255, 255, 255, .96);
  border-radius: 1.5rem;
  box-shadow: 0 32px 90px rgba(0, 17, 48, .36);
}

.error-logo {
  width: clamp(100px, 18vw, 145px);
  height: auto;
  margin: 0 auto 1.25rem;
  mix-blend-mode: multiply;
}

.error-code {
  margin: 0;
  color: var(--red);
  font-family: 'Manrope', sans-serif;
  font-size: clamp(3.7rem, 12vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -.07em;
  line-height: .9;
}

.error-card h1 {
  max-width: 100%;
  margin-top: 1rem;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  overflow-wrap: normal;
}

.error-copy {
  max-width: 520px;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-top: 2rem;
}

.error-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .75rem 1.35rem;
  color: #fff;
  background: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.error-button:hover,
.error-button:focus-visible {
  color: #fff;
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}

.error-button.secondary {
  color: var(--blue);
  background: transparent;
}

.error-button.secondary:hover,
.error-button.secondary:focus-visible {
  color: #fff;
  background: var(--blue);
}

@media (max-width: 575.98px) {
  .error-page { padding: 1rem; }
  .error-card { padding: 1.5rem 1.1rem; border-radius: 1.15rem; }
  .error-copy { font-size: .95rem; }
  .error-actions { flex-direction: column; }
  .error-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
