@layer reset, base, layout, components, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, p { margin: 0; }
  img { max-width: 100%; }
  a { color: inherit; }
}

@layer base {
  :root {
    --night: #061116;
    --deep: #0b2028;
    --steel: #92a7ad;
    --mist: #d9e4e7;
    --paper: #f3efe4;
    --signal: #d7a743;
    --signal-bright: #f0c76e;
    --line: rgba(217, 228, 231, .18);
    --panel: rgba(5, 17, 22, .88);
    --shadow: 0 28px 80px rgba(0, 0, 0, .42);
  }

  body {
    min-width: 320px;
    min-height: 100vh;
    color: var(--mist);
    background: var(--night);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
      linear-gradient(90deg, rgba(3, 12, 16, .95) 0%, rgba(3, 12, 16, .76) 42%, rgba(3, 12, 16, .36) 74%, rgba(3, 12, 16, .68) 100%),
      linear-gradient(180deg, rgba(4, 13, 17, .12) 0%, rgba(4, 13, 17, .55) 72%, #061116 100%),
      url("assets/fleet.jpg") center / cover no-repeat;
  }

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

  :focus-visible {
    outline: 2px solid var(--signal-bright);
    outline-offset: 4px;
  }
}

@layer layout {
  .site-shell {
    width: min(1400px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 clamp(22px, 5vw, 76px);
    display: grid;
    grid-template-rows: auto 1fr auto;
  }

  .topbar {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
    gap: clamp(48px, 7vw, 110px);
    align-items: center;
    padding: clamp(58px, 9vh, 110px) 0 clamp(52px, 8vh, 96px);
  }

  .welcome { max-width: 760px; }

  footer {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(217, 228, 231, .62);
    border-top: 1px solid var(--line);
    font: 600 11px/1.2 "Arial Narrow", "Helvetica Neue", sans-serif;
    letter-spacing: .18em;
    text-transform: uppercase;
  }

  .footer-rule { width: 34px; height: 1px; background: var(--signal); }
}

@layer components {
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--signal-bright);
    border: 1px solid rgba(240, 199, 110, .72);
    border-radius: 50%;
    font: 800 11px/1 "Arial Narrow", "Helvetica Neue", sans-serif;
    letter-spacing: .08em;
    box-shadow: inset 0 0 0 4px rgba(240, 199, 110, .08);
  }

  .brand-name {
    color: #fff;
    font: 700 clamp(17px, 2vw, 21px)/1 "Arial Narrow", "Helvetica Neue", sans-serif;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  .brand-name b { color: var(--signal-bright); font-weight: inherit; }

  .ts-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--mist);
    text-decoration: none;
    font: 700 11px/1 "Arial Narrow", "Helvetica Neue", sans-serif;
    letter-spacing: .16em;
    text-transform: uppercase;
    transition: color .2s ease;
  }

  .ts-link:hover { color: var(--signal-bright); }

  .signal {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--signal-bright);
    box-shadow: 0 0 0 5px rgba(240, 199, 110, .12);
  }

  .eyebrow {
    color: var(--signal-bright);
    font: 800 11px/1.2 "Arial Narrow", "Helvetica Neue", sans-serif;
    letter-spacing: .24em;
    text-transform: uppercase;
  }

  h1 {
    margin-top: 18px;
    color: #fff;
    font: 800 clamp(64px, 9vw, 124px)/.82 Impact, "Arial Narrow", sans-serif;
    letter-spacing: .01em;
    text-transform: uppercase;
    text-wrap: balance;
  }

  h1 em {
    color: transparent;
    -webkit-text-stroke: 1px rgba(240, 199, 110, .82);
    font-style: normal;
  }

  .message {
    max-width: 690px;
    margin-top: clamp(42px, 7vh, 72px);
    padding-left: clamp(18px, 2.5vw, 30px);
    color: rgba(239, 244, 245, .84);
    font-size: clamp(15px, 1.45vw, 18px);
    text-shadow: 0 2px 20px rgba(0, 0, 0, .45);
  }

  .message p + p { margin-top: .55em; }
  .message .salute { color: #fff; font-size: 1.28em; font-weight: 700; }
  .message .aside { color: var(--steel); white-space: nowrap; }
  .message .farewell { margin-top: 1.2em; color: var(--paper); font-style: italic; }
  .signature { color: var(--signal-bright); font-weight: 700; }
  .signature span {
    margin-left: 8px;
    color: var(--steel);
    font: 700 10px/1 "Arial Narrow", "Helvetica Neue", sans-serif;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  .teamspeak-card {
    align-self: center;
    min-width: 0;
    padding: clamp(26px, 3.5vw, 46px);
    background: var(--panel);
    border: 1px solid rgba(217, 228, 231, .14);
    box-shadow: var(--shadow);
    backdrop-filter: blur(9px);
  }

  .card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
  }

  h2 {
    margin-top: 8px;
    color: #fff;
    font: 800 clamp(30px, 3.2vw, 44px)/1 Impact, "Arial Narrow", sans-serif;
    letter-spacing: .05em;
    text-transform: uppercase;
  }

  .live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #b8c8cc;
    font: 700 10px/1 "Arial Narrow", "Helvetica Neue", sans-serif;
    letter-spacing: .13em;
    text-transform: uppercase;
  }

  .live-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #69c58a;
    box-shadow: 0 0 0 5px rgba(105, 197, 138, .1);
  }

  .viewer-frame {
    min-height: 310px;
    margin: 26px 0 22px;
    padding: 4px;
    overflow: auto;
    scrollbar-color: var(--steel) transparent;
  }

  .viewer-loading { color: var(--steel); font-size: 14px; }

  #ts3viewer_1122488,
  #ts3v_1122488,
  #ts3viewer_1122488 .tsv_level,
  #ts3viewer_1122488 .tsv_content {
    color: #cbd8db !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.7 !important;
  }

  #ts3viewer_1122488 a {
    color: #dce7e9 !important;
    text-decoration: none !important;
  }

  #ts3viewer_1122488 a:hover { color: var(--signal-bright) !important; }
  #ts3viewer_1122488 img { opacity: .72; }

  .connect-button {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 18px;
    color: #10191c;
    background: var(--signal-bright);
    text-decoration: none;
    font: 800 11px/1.2 "Arial Narrow", "Helvetica Neue", sans-serif;
    letter-spacing: .14em;
    text-align: center;
    text-transform: uppercase;
    transition: background-color .2s ease, transform .2s ease;
  }

  .connect-button:hover { background: #ffda82; transform: translateY(-2px); }
  .connect-button span { font-size: 18px; }

  .third-party-note {
    margin-top: 14px;
    color: rgba(217, 228, 231, .43);
    font: 600 9px/1.4 "Arial Narrow", "Helvetica Neue", sans-serif;
    letter-spacing: .1em;
    text-align: center;
    text-transform: uppercase;
  }
}

@layer responsive {
  @media (max-width: 900px) {
    body::before {
      background:
        linear-gradient(180deg, rgba(3, 12, 16, .64) 0%, rgba(3, 12, 16, .9) 48%, #061116 100%),
        url("assets/fleet.jpg") 62% top / auto 58vh no-repeat;
    }

    .hero {
      grid-template-columns: 1fr;
      gap: 56px;
      align-items: start;
    }

    .welcome { max-width: none; }
    .teamspeak-card { width: min(100%, 560px); }
    .message .aside { white-space: normal; }
  }

  @media (max-width: 560px) {
    .site-shell { padding-inline: 18px; }
    .topbar { min-height: 86px; }
    .brand-mark { width: 40px; height: 40px; }
    .brand-name { font-size: 15px; }
    .ts-link { width: 44px; justify-content: center; font-size: 0; }
    .signal { width: 10px; height: 10px; }
    .hero { padding-top: 52px; }
    h1 { font-size: clamp(58px, 20vw, 84px); }
    .message { margin-top: 42px; padding-left: 20px; }
    .teamspeak-card { padding: 24px 20px; }
    .viewer-frame { min-height: 300px; }
    footer { gap: 10px; letter-spacing: .1em; }
    .footer-rule { width: 18px; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  }
}
