@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("./fonts/BarlowCondensed-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Inter", system-ui, sans-serif;
  --ink: #071116;
  --panel: rgba(10, 24, 30, 0.91);
  --panel-raised: rgba(16, 33, 39, 0.96);
  --text: #edf4f1;
  --muted: #8da1a2;
  --faint: #536568;
  --accent: #5ed8d3;
  --warm: #eea24f;
  --success: #72e5ab;
  --line: rgba(124, 166, 166, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--ink);
}

a {
  color: inherit;
}

.start-screen {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.video-fallback,
.background-video,
.cinematic-backdrop,
.directional-scrim,
.interface-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-fallback {
  z-index: -5;
  background: #17343a url("./launch/coastal-foundation-hero-v1.jpg") center / cover no-repeat;
  transform: scale(1.015);
}

.background-video {
  z-index: -4;
  object-fit: cover;
  object-position: 56% 48%;
  filter: saturate(0.94) contrast(1.04) brightness(0.86);
}

.cinematic-backdrop {
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(6, 17, 22, 0.36), rgba(6, 17, 22, 0.64)),
    radial-gradient(circle at 80% 55%, transparent 0 22%, rgba(6, 17, 22, 0.25) 60%);
}

.directional-scrim {
  z-index: -2;
  background:
    linear-gradient(
      90deg,
      rgba(6, 17, 22, 0.82) 0%,
      rgba(6, 17, 22, 0.58) 53%,
      rgba(6, 17, 22, 0.18) 100%
    ),
    linear-gradient(0deg, rgba(6, 17, 22, 0.76), transparent 36%);
}

.interface-grid {
  z-index: -1;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(94, 216, 211, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 216, 211, 0.14) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.38) 64%, transparent 100%);
}

.operational-horizon {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(94, 216, 211, 0.55);
  opacity: 0.72;
}

.command-rail {
  position: absolute;
  z-index: 20;
  top: 2.5svh;
  left: 1.8vw;
  right: 1.8vw;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 9px 74px 9px 15px;
  border: 1px solid rgba(122, 162, 164, 0.24);
  border-radius: 14px;
  background: rgba(8, 22, 28, 0.91);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.rail-program {
  text-decoration: none;
}

.rail-program strong,
.rail-detail,
.command-status {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.rail-program strong {
  font-size: 0.88rem;
}

.rail-detail {
  margin-left: auto;
  color: var(--muted);
}

.command-status {
  color: var(--success);
  white-space: nowrap;
}

.command-status i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow:
    0 0 0 0 rgba(114, 229, 171, 0.52),
    0 0 14px rgba(114, 229, 171, 0.92);
  animation: command-link-glow 1.8s ease-in-out infinite;
}

@keyframes command-link-glow {
  0%,
  100% {
    transform: scale(0.96);
    box-shadow:
      0 0 0 0 rgba(114, 229, 171, 0.46),
      0 0 12px rgba(114, 229, 171, 0.82);
  }

  50% {
    transform: scale(1.18);
    box-shadow:
      0 0 0 7px rgba(114, 229, 171, 0),
      0 0 24px rgba(114, 229, 171, 1);
  }
}

.site-settings {
  position: absolute;
  top: 9px;
  right: 15px;
}

.site-settings summary {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #567477;
  border-radius: 9px;
  color: var(--accent);
  background: #102127;
  cursor: pointer;
  font: 600 1.35rem/1 "Barlow Condensed", sans-serif;
  list-style: none;
}

.site-settings summary::-webkit-details-marker {
  display: none;
}

.site-settings summary:hover,
.site-settings summary:focus-visible {
  border-color: var(--accent);
  background: #173038;
  outline: none;
}

.site-settings nav {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 270px;
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(94, 216, 211, 0.64);
  border-radius: 14px;
  background: var(--panel-raised);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.site-settings nav small,
.section-kicker {
  color: var(--warm);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.site-settings nav strong {
  margin-bottom: 5px;
  font: 600 1.35rem/1 "Barlow Condensed", sans-serif;
  letter-spacing: 0.06em;
}

.site-settings nav a,
.site-settings nav button {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(98, 132, 135, 0.29);
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  background: #0f2026;
  font: 600 0.75rem "Barlow Condensed", sans-serif;
  letter-spacing: 0.09em;
  cursor: pointer;
}

.site-settings nav a:hover,
.site-settings nav a:focus-visible,
.site-settings nav button:hover,
.site-settings nav button:focus-visible {
  border-color: var(--accent);
  background: #173038;
  outline: none;
}

.command-surface {
  position: relative;
  z-index: 5;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(500px, 1.58fr) minmax(330px, 1fr);
  align-items: center;
  gap: clamp(42px, 8vw, 150px);
  padding: 15svh 4vw 13svh;
}

.identity-card,
.access-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  backdrop-filter: blur(16px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.identity-card {
  width: min(760px, 100%);
  padding: clamp(24px, 2.2vw, 36px);
  background: rgba(8, 22, 28, 0.68);
}

.access-card {
  width: min(470px, 100%);
  justify-self: end;
  padding: clamp(22px, 2vw, 30px);
  background: var(--panel);
}

.identity-card > .section-kicker,
.access-card > .section-kicker {
  margin: 0 0 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}

.program-mark {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding: 6px;
  overflow: hidden;
  border: 1px solid rgba(238, 162, 79, 0.62);
  border-radius: 14px;
  background: #f4efe3;
  box-shadow: 0 0 22px rgba(238, 162, 79, 0.17);
}

.program-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

.brand-lockup h1 {
  margin: 0;
  font: 600 clamp(4rem, 6.6vw, 6.2rem) / 0.72 "Barlow Condensed", sans-serif;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.48);
}

.brand-lockup p {
  margin: 12px 0 0;
  color: var(--accent);
  font: 600 clamp(1.05rem, 1.8vw, 1.48rem) / 1 "Barlow Condensed", sans-serif;
  letter-spacing: 0.11em;
}

.identity-card hr,
.access-card hr {
  height: 1px;
  margin: 20px 0;
  border: 0;
  background: rgba(138, 184, 184, 0.28);
}

.identity-card h2 {
  margin: 0;
  font: 600 clamp(1.8rem, 2.55vw, 2.5rem) / 1.02 "Barlow Condensed", sans-serif;
  letter-spacing: 0.045em;
}

.identity-description {
  max-width: 650px;
  margin: 17px 0 20px;
  color: var(--muted);
  font-size: clamp(0.83rem, 1.05vw, 0.95rem);
  line-height: 1.65;
}

.field-book {
  display: inline-flex;
  padding: 9px 12px;
  border: 1px solid rgba(238, 162, 79, 0.55);
  border-radius: 9px;
  color: var(--warm);
  background: rgba(21, 40, 45, 0.86);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.access-card > h2 {
  margin: 0 0 18px;
  font: 600 clamp(2.2rem, 3.25vw, 3rem) / 0.88 "Barlow Condensed", sans-serif;
  letter-spacing: 0.035em;
}

.release-status {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(106, 142, 145, 0.27);
  border-radius: 10px;
  color: var(--muted);
  background: #10232a;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.release-status strong {
  color: var(--success);
  white-space: nowrap;
}

.mac-play-button {
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px 1fr 28px;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  border: 2px solid rgba(94, 216, 211, 0.94);
  border-radius: 11px;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(135deg, #17444a, #102c31);
  box-shadow: 0 12px 34px rgba(27, 126, 126, 0.28);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.mac-play-button:hover,
.mac-play-button:focus-visible {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(27, 126, 126, 0.36);
  outline: none;
}

.apple-mark {
  font: 500 2rem/1 -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: center;
}

.button-copy {
  display: grid;
  gap: 2px;
}

.button-copy strong {
  font: 600 1.18rem/1 "Barlow Condensed", sans-serif;
  letter-spacing: 0.1em;
}

.button-copy small {
  color: #a9c0bf;
  font-size: 0.66rem;
}

.button-arrow {
  color: var(--accent);
  font-size: 1.7rem;
}

.store-message {
  min-height: 35px;
  margin: 8px 2px 10px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.45;
}

.access-card.store-notice .release-status {
  border-color: rgba(238, 162, 79, 0.65);
}

.access-card.store-notice .store-message {
  color: var(--warm);
}

.input-detail {
  margin: 0;
  color: var(--faint);
  text-align: center;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.field-footer {
  position: absolute;
  z-index: 4;
  left: 4vw;
  right: 4vw;
  bottom: 3svh;
  display: flex;
  justify-content: space-between;
  color: rgba(185, 205, 203, 0.58);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-meta a {
  color: rgba(211, 224, 222, 0.72);
  font-size: 0.54rem;
  text-underline-offset: 3px;
}

.footer-meta a:hover,
.footer-meta a:focus-visible {
  color: var(--accent);
  outline: none;
}

.feedback-dialog {
  width: min(620px, calc(100% - 32px));
  max-height: min(760px, calc(100svh - 32px));
  padding: 0;
  overflow: auto;
  border: 0;
  color: var(--text);
  background: transparent;
}

.feedback-dialog::backdrop {
  background: rgba(2, 8, 12, 0.82);
  backdrop-filter: blur(8px);
}

.feedback-panel {
  padding: clamp(20px, 3vw, 28px);
  border: 2px solid rgba(94, 216, 211, 0.72);
  border-radius: 18px;
  background: rgba(11, 24, 30, 0.98);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
}

.feedback-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.feedback-header .section-kicker {
  margin: 0 0 6px;
}

.feedback-header h2 {
  margin: 0;
  font: 600 clamp(1.8rem, 5vw, 2.35rem) / 1 "Barlow Condensed", sans-serif;
  letter-spacing: 0.04em;
}

.feedback-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(98, 132, 135, 0.45);
  border-radius: 9px;
  color: var(--muted);
  background: #102127;
  font: 400 1.8rem/1 "Inter", sans-serif;
  cursor: pointer;
}

.feedback-close:hover,
.feedback-close:focus-visible {
  color: var(--text);
  border-color: var(--accent);
  outline: none;
}

.feedback-introduction {
  margin: 14px 0 18px;
  color: #b3c2c2;
  font-size: 0.75rem;
  line-height: 1.55;
}

.feedback-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feedback-selectors label,
.feedback-copy {
  display: grid;
  gap: 6px;
}

.feedback-selectors label > span,
.feedback-copy > span,
.feedback-copy output {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.feedback-copy {
  grid-template-columns: 1fr auto;
  margin-top: 16px;
}

.feedback-copy output {
  color: var(--faint);
}

.feedback-selectors select,
.feedback-dialog textarea {
  width: 100%;
  border: 1px solid rgba(98, 132, 135, 0.48);
  border-radius: 9px;
  color: var(--text);
  background: #0f2026;
  font: 600 0.75rem "Inter", sans-serif;
}

.feedback-selectors select {
  min-height: 44px;
  padding: 0 12px;
}

.feedback-dialog textarea {
  min-height: 142px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

.feedback-selectors select:focus-visible,
.feedback-dialog textarea:focus-visible {
  border-color: var(--accent);
  outline: 2px solid rgba(94, 216, 211, 0.18);
  outline-offset: 1px;
}

.feedback-status {
  min-height: 34px;
  margin: 13px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(156, 198, 198, 0.17);
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.45;
}

.feedback-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.feedback-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 9px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.feedback-consent input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.feedback-consent a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.feedback-consent a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.feedback-status.is-success {
  color: var(--success);
}

.feedback-status.is-error {
  color: #ff7a68;
}

.feedback-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.feedback-actions button {
  min-height: 48px;
  border: 1px solid rgba(98, 132, 135, 0.42);
  border-radius: 10px;
  color: var(--text);
  background: #102127;
  font: 600 0.78rem "Barlow Condensed", sans-serif;
  letter-spacing: 0.09em;
  cursor: pointer;
}

.feedback-actions .feedback-save {
  border-color: rgba(94, 216, 211, 0.94);
  background: linear-gradient(135deg, #17444a, #102c31);
}

.feedback-actions button:hover,
.feedback-actions button:focus-visible {
  filter: brightness(1.14);
  outline: none;
}

@media (max-width: 1080px) {
  .rail-detail {
    display: none;
  }

  .command-surface {
    grid-template-columns: minmax(440px, 1.25fr) minmax(320px, 0.9fr);
    gap: 34px;
    padding-inline: 3vw;
  }

  .program-mark {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 820px) {
  .start-screen {
    min-height: 100svh;
    overflow: auto;
  }

  .background-video,
  .video-fallback,
  .cinematic-backdrop,
  .directional-scrim,
  .interface-grid {
    position: fixed;
  }

  .command-rail {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    min-height: 58px;
  }

  .command-status {
    margin-left: auto;
  }

  .command-status {
    font-size: 0;
  }

  .command-status i {
    margin: 0;
  }

  .command-surface {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 92px 18px 70px;
  }

  .identity-card,
  .access-card {
    width: 100%;
    justify-self: stretch;
  }

  .identity-description {
    max-width: none;
  }

  .field-footer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    gap: 14px;
    padding: 0 18px 20px;
  }

  .footer-meta {
    margin-left: auto;
  }
}

@media (max-width: 520px) {
  .command-rail {
    gap: 10px;
  }

  .rail-program strong {
    font-size: 0.72rem;
  }

  .brand-lockup {
    gap: 14px;
  }

  .program-mark {
    width: 62px;
    height: 62px;
  }

  .identity-card,
  .access-card {
    padding: 20px;
    border-radius: 17px;
  }

  .identity-card h2 {
    font-size: 1.62rem;
  }

  .field-book {
    font-size: 0.54rem;
  }

  .release-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-meta {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: 12px;
  }

  .feedback-selectors,
  .feedback-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .background-video {
    display: none;
  }

  .command-status i {
    animation: none;
    box-shadow: 0 0 18px rgba(114, 229, 171, 0.95);
  }

  .mac-play-button {
    transition: none;
  }
}
