:root {
  color-scheme: light;
  color: #242322;
  background: #e9e6e5;
  font: 400 15px/1.4 'Helvetica Neue', Helvetica, Arial, sans-serif;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body, h1, h2, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button, summary { color: inherit; font: inherit; cursor: pointer; }
:is(a, button, summary):focus-visible { outline: 2px solid #242322; outline-offset: 5px; }

.home-screen {
  --inset: clamp(27px, 4vw, 84px);
  --header-inset: clamp(21px, 2.3vw, 46px);
  --summary-width: clamp(143px, 12vw, 190px);
  position: relative;
  isolation: isolate;
  min-height: max(630px, 100svh);
  overflow: hidden;
  background: #e9e6e5;
}

.home-visual { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.home-visual::after {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(90deg, #eeecea2e, transparent 28% 76%, #eeecea59),
    linear-gradient(0deg, #e9e6e553, transparent 25%);
}
.home-backdrop { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 67%; }
.home-backdrop-d20k { object-position: center 23%; opacity: 0; transition: opacity 320ms ease; }
.home-screen [data-aircraft-slide='d20k'], .home-screen .home-menu [data-aircraft-slide='d20k'] { display: none; }
.home-screen:has(input[value='d20k']:checked) [data-aircraft-slide='v200'] { display: none; }
.home-screen:has(input[value='d20k']:checked) [data-aircraft-slide='d20k'] { display: revert; }
.home-screen:has(input[value='d20k']:checked) .home-backdrop-d20k { opacity: 1; }
.home-header {
  position: absolute;
  z-index: 3;
  inset: clamp(18px, 3.2svh, 38px) var(--header-inset) auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.home-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #393635; border-radius: 50%; font-size: 19px; font-weight: 500; }
.home-nav { position: absolute; left: 50%; display: flex; align-items: center; gap: clamp(24px, 3.5vw, 66px); transform: translateX(-50%); white-space: nowrap; }
.home-nav a, .home-popover summary { font-size: 13px; }
.home-nav a:is(:hover, :focus-visible), .home-stat a:is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: 4px; }
.home-popover { position: relative; justify-self: end; }
.home-popover summary { display: inline-flex; align-items: center; gap: 10px; padding: 7px 1px; list-style: none; }
.home-popover summary::-webkit-details-marker { display: none; }
.home-menu-icon { width: 13px; height: 13px; background: radial-gradient(circle, #242322 1.3px, transparent 1.6px) 0 0 / 6px 6px; }
.home-popover-panel { position: absolute; right: 0; width: max-content; max-width: min(260px, 85vw); padding: 8px; border: 1px solid #fff; border-radius: 10px; background: #f5f3f2; box-shadow: 0 8px 34px #312d2922; }
.home-menu .home-popover-panel { top: calc(100% + 6px); display: grid; }
.home-menu .home-popover-panel a { display: block; padding: 8px 10px; border-radius: 5px; font-size: 13px; }
.home-menu .home-popover-panel a:hover { background: #e9e6e5; }

.home-intro { position: absolute; top: 19.5%; left: var(--inset); }
.home-intro h1 { color: #242322; font-size: clamp(98px, 13.6vw, 230px); line-height: .83; font-weight: 400; letter-spacing: -.079em; }
.home-screen:has(input[value='d20k']:checked) .home-intro h1 { font-size: clamp(68px, 7.8vw, 152px); }
.home-intro p { margin-top: clamp(24px, 3.8svh, 46px); color: #494542; font-size: clamp(16px, 1.55vw, 23px); line-height: 1.22; font-weight: 400; text-transform: uppercase; }

.home-summary, .home-action { position: absolute; right: var(--inset); width: var(--summary-width); }
.home-summary { top: 25.3%; }
.home-stat { color: #4d4844; }
.home-stat + .home-stat { margin-top: clamp(22px, 6.1svh, 58px); }
.home-stat dt { font-size: clamp(12px, 1.03vw, 15px); }
.home-stat dd:first-of-type { color: #242322; font-size: clamp(27px, 2.55vw, 41px); line-height: 1.02; margin-top: 4px; letter-spacing: -.044em; }
.home-stat-unit, .home-current-aircraft dd:first-of-type { font-size: clamp(11px, 1.01vw, 15px); line-height: 1.3; letter-spacing: 0; }
.home-stat-lead { position: relative; padding-bottom: clamp(15px, 2.5svh, 26px); }
.home-stat-lead::before { position: absolute; left: 0; bottom: 0; width: 81%; height: 1px; background: #433d37a8; content: ''; }
.home-stat-lead::after { position: absolute; left: 81%; bottom: -1.5px; width: 4px; height: 4px; border-radius: 50%; background: #433d37; content: ''; }
.home-current-aircraft dd:first-of-type { font-size: clamp(11px, 1.05vw, 15px); letter-spacing: 0; overflow-wrap: anywhere; }

.home-topics { position: absolute; bottom: 20.6%; left: var(--inset); }
.home-dots { display: flex; margin-left: -7px; }
.home-dots button { display: grid; place-items: center; width: 25px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.home-dots button::before { width: 9px; height: 9px; border-radius: 50%; background: #514c4766; content: ''; }
.home-dots button:is([aria-pressed='true'], :hover)::before { background: #262422; }
.home-topics p { margin-top: 5px; color: #423e3a; font-size: 12px; text-transform: uppercase; }
.home-topics p span { padding-inline: 1px; }

.home-aircraft-controls {
  position: absolute;
  z-index: 2;
  top: clamp(77px, 10svh, 116px);
  left: 50%;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
}
.home-aircraft-switch { position: static; }
.home-aircraft-switch summary, #home-rotation, #home-logout button {
  min-height: 40px;
  padding: 7px 15px;
  border: 1px solid #24232233;
  border-radius: 24px;
  font-size: 13px;
  white-space: nowrap;
}
.home-aircraft-switch summary { color: #fff; background: #242322; }
.home-aircraft-switch summary:hover { background: #393635; }
.home-aircraft-switch summary .home-chevron { margin-top: -4px; }
.home-aircraft-switch[open] summary .home-chevron { transform: rotate(225deg); margin-top: 4px; }
.home-aircraft-panel {
  top: calc(100% + 8px);
  right: auto;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: min(468px, calc(100vw - 32px));
  max-width: none;
  padding: 9px;
  border-radius: 16px;
  transform: translateX(-50%);
}
.home-aircraft-panel label { position: relative; }
.home-aircraft-panel input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.home-aircraft-card { display: block; overflow: hidden; border: 1px solid #24232224; border-radius: 11px; background: #fff; }
.home-aircraft-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.home-aircraft-card strong, .home-aircraft-card small { display: block; padding-inline: 11px; }
.home-aircraft-card strong { margin-top: 7px; font-size: 16px; }
.home-aircraft-card small { margin: 1px 0 8px; font-size: 12px; }
.home-aircraft-panel input:hover + span { border-color: #777; }
.home-aircraft-panel input:checked + span { border-color: #242322; color: #fff; background: #242322; }
.home-aircraft-panel input:focus-visible + span { outline: 2px solid #242322; outline-offset: 2px; }
#home-rotation:not([hidden]) { display: inline-flex; align-items: center; gap: 8px; background: #f6f4f2; }
#home-rotation:hover { background: #e9e6e5; }
#home-rotation::before { content: ''; border-block: 5px solid transparent; border-left: 7px solid currentColor; }
#home-rotation[aria-pressed='true']::before { width: 3px; height: 10px; border: solid currentColor; border-width: 0 2px; }
#home-logout:not([hidden]) { display: flex; align-items: center; gap: 7px; }
#home-session-role { padding: 6px 9px; border-radius: 14px; background: #f6f4f2; font-size: 13px; white-space: nowrap; }
#home-logout button { background: #f6f4f2; }
#home-logout button:hover { background: #e9e6e5; }

.home-action { bottom: 18.2%; display: flex; align-items: center; min-height: 42px; }
.home-action:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.home-action strong, .home-action small { display: block; font-size: 12px; font-weight: 400; }
.home-action strong { text-transform: uppercase; }
.home-action small { margin-top: 3px; color: #4d4844; }

.home-footer { position: absolute; z-index: 2; right: var(--inset); bottom: clamp(24px, 5.2svh, 54px); left: var(--inset); display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; }
.home-signature { display: flex; align-items: center; gap: 15px; padding-top: 7px; font-size: 12px; }
.home-slash { width: 2px; height: 18px; background: #242322; transform: rotate(22deg); }
.home-scroll { display: grid; justify-items: center; gap: 9px; padding: 7px; font-size: 12px; text-transform: uppercase; white-space: nowrap; }
.home-chevron { display: block; width: 7px; height: 7px; transform: rotate(45deg); border-right: 1px solid; border-bottom: 1px solid; }
.home-data summary { font-size: 12px; }
.home-data summary .home-chevron { margin-top: -3px; }
.home-data .home-popover-panel { bottom: calc(100% + 5px); padding: 11px 13px; font-size: 13px; }

.home-sections { padding: clamp(30px, 6vw, 90px) clamp(20px, 4vw, 84px); background: #eeeceb; }
.home-sections h2 { margin-bottom: 16px; font-size: clamp(23px, 3vw, 42px); font-weight: 400; letter-spacing: -.045em; }
.home-section-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.home-section-grid a { padding: 15px; border: 1px solid #fff; border-radius: 10px; background: #f6f4f3; }
.home-section-grid a:hover { background: #fff; }
.home-section-grid strong, .home-section-grid span { display: block; }
.home-section-grid strong { font-size: clamp(15px, 1.65vw, 23px); font-weight: 500; overflow-wrap: anywhere; }
.home-section-grid span { margin-top: 6px; color: #4d4844; font-size: 13px; }

.portal-login { position: relative; isolation: isolate; display: grid; overflow: hidden; min-height: 100svh; place-items: center; padding: 24px; }
.portal-login::before { position: absolute; z-index: -1; inset: -18px; background: url('assets/v200-home.webp') center 67% / cover; filter: blur(13px); content: ''; }
.portal-login-dialog { width: min(calc(100% - 32px), 400px); max-height: calc(100svh - 32px); padding: 0; border: 0; border-radius: 18px; color: inherit; background: transparent; }
.portal-login-dialog::backdrop { background: #e9e6e528; backdrop-filter: blur(13px); }
.portal-login-panel { display: grid; gap: 20px; width: min(100%, 400px); padding: 28px; border: 1px solid #fff; border-radius: 18px; background: #f5f3f2; box-shadow: 0 10px 28px #312d2918; }
.portal-login-panel h1 { font-size: 30px; font-weight: 500; letter-spacing: -.045em; }
.portal-login-panel form, .portal-login-panel label { display: grid; gap: 7px; }
.portal-login-panel form { gap: 14px; }
.portal-login-panel :is(input, select, button) { min-height: 44px; padding: 9px 12px; border: 1px solid #615b564a; border-radius: 9px; font: inherit; }
.portal-login-panel :is(input, select) { width: 100%; color: inherit; background: #fff; }
.portal-login-panel button { color: #fff; background: #242322; }
.portal-login-panel button:disabled { opacity: .65; cursor: wait; }
.portal-login-panel a { width: fit-content; text-decoration: underline; text-underline-offset: 3px; }
.portal-login-panel .portal-login-cancel { width: fit-content; min-height: 32px; padding: 2px 0; border: 0; color: inherit; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.portal-login-error { color: #922d30; font-size: 13px; }
.portal-login-error:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .home-backdrop-d20k { transition: none; }
}
