@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #20438d;
  --navy-deep: #152e66;
  --ocean: #2c88c9;
  --sky: #82cef3;
  --ink: #13294b;
  --muted: #5b6678;
  --tint: #eef3fa;
}

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

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  font-family: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: var(--navy);
  background-image:
    url("assets/waves.svg"),
    radial-gradient(ellipse 80% 70% at 18% 12%, #3a6bbd 0%, rgba(58, 107, 189, 0) 60%),
    linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 100%);
  background-size: cover, auto, auto;
  background-position: center, 0 0, 0 0;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 22px;
  padding: 44px 40px 40px;
  text-align: center;
  box-shadow: 0 30px 60px -20px rgba(6, 20, 52, .55), 0 2px 6px rgba(6, 20, 52, .18);
}

.logo { margin: 0; display: block; line-height: 0; }
.logo img { width: 100%; max-width: 300px; height: auto; }

.label {
  margin: 34px 0 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.label::before, .label::after { content: ""; flex: 1; height: 1px; background: #dfe4ec; }

.contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
  background: var(--tint);
  transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { background: #e2ebf7; }
.btn.primary { color: #fff; background: var(--navy); font-size: 1.25rem; letter-spacing: .01em; }
.btn.primary:hover { background: #1a3877; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--ocean); outline-offset: 3px; }
.ic { width: 20px; height: 20px; flex: none; fill: currentColor; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.nf { margin: 30px 0 6px; font-size: 1.5rem; font-weight: 600; color: var(--navy); }
.nf-text { margin: 0 0 20px; color: var(--muted); }

@media (max-width: 420px) {
  .card { padding: 36px 22px 26px; border-radius: 18px; }
  .logo img { max-width: 250px; }
  .label { margin-top: 28px; }
  .btn { font-size: 1.0625rem; }
  .btn.primary { font-size: 1.1875rem; }
}

@media (max-width: 360px) {
  body { padding: 20px 12px; }
  .card { padding: 30px 16px 18px; }
  .btn { padding: 12px 10px; gap: 8px; font-size: .95rem; }
  .btn.primary { font-size: 1.125rem; }
}

/* Short screens (phones held sideways): fit the card without scrolling */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  body { padding: 14px 16px; }
  .card { padding: 22px 32px 22px; max-width: 400px; }
  .logo img { max-width: 200px; }
  .label { margin: 16px 0 10px; }
  .btn { min-height: 46px; padding: 9px 16px; }
}

/* Portrait screens: one wave above the card and one below it */
@media (max-aspect-ratio: 4/5) {
  body {
    background-image:
      url("assets/waves.svg"),
      url("assets/waves.svg"),
      radial-gradient(ellipse 80% 70% at 18% 12%, #3a6bbd 0%, rgba(58, 107, 189, 0) 60%),
      linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 100%);
    background-size: auto 62%, auto 85%, auto, auto;
    background-position: 35% -10%, 60% 140%, 0 0, 0 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

@media print {
  body { background: none; display: block; padding: 0; }
  .card { box-shadow: none; margin: 0 auto; }
  .btn { background: none; color: var(--ink); }
}

/* Horizontal logo: a wider card so the name stays large */
.card { max-width: 500px; padding: 50px 44px 42px; }
.logo img { max-width: 100%; }
.label { margin-top: 38px; }
@media (max-width: 420px) {
  .card { padding: 34px 20px 24px; }
  .logo img { max-width: 100%; }
  .label { margin-top: 28px; }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .card { max-width: 460px; padding: 26px 32px 22px; }
  .logo img { max-width: 100%; }
  .label { margin-top: 20px; }
}
