/* app.css — standalone chrome for the Terminal (header, footer, shell).
 *
 * Extracted from alphapinelab.com's landing.css: only the rules the Terminal
 * page actually uses (root tokens, reset, site header/footer, section shell,
 * animations). The Terminal panel itself is styled entirely by terminal.css.
 */

:root {
  --bg: #f5f5f7;
  --bg-soft: #fbfbfd;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --surface-tint: #eef8f7;
  --text: #1d1d1f;
  --muted: #5f666d;
  --faint: #86868b;
  --line: rgba(29, 29, 31, 0.1);
  --line-strong: rgba(29, 29, 31, 0.16);
  --accent: #0071e3;
  --accent-deep: #005bb8;
  --teal: #00a39a;
  --teal-deep: #087b75;
  --teal-soft: rgba(0, 163, 154, 0.1);
  --danger: #b84a52;
  --danger-soft: rgba(184, 74, 82, 0.1);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.06);
  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-brand: "Michroma", "Inter", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, #ffffff 0%, #f5f5f7 42%, #ffffff 100%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(620px 320px at 82% 14%, rgba(0, 113, 227, 0.07), transparent 70%),
    radial-gradient(540px 300px at 12% 18%, rgba(0, 163, 154, 0.08), transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

p {
  color: var(--muted);
  line-height: 1.58;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.section-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

/* --- Site header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(29, 29, 31, 0.08);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
}

.header-shell {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 48px));
  min-height: 64px;
  margin: 0 auto;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  /* Ratio B, the same lockup the landing page uses: a larger wordmark wants
     less air beside the monogram or the two stop reading as one mark. */
  gap: 10px;
  color: var(--text);
}

/* The wordmark is the logo's own lettering, shipped as the artwork it is —
   the same three renditions the site uses, cropped to the ink so nothing
   invisible does the spacing. See the landing repo for the measurements. */
.brand-wordmark,
.footer-wordmark {
  display: inline-flex;
  align-items: flex-start;
  min-width: 0;
}

.brand-wordmark img,
.footer-wordmark img {
  max-width: 100%;
  height: auto;
}

/* The header wordmark is nine flipping cards now, sized by --wm-w below. The
   footer keeps a plain image: nobody watches a mark below the fold animate. */
.footer-wordmark img {
  width: 173px;
}

/* The monogram only: a descendant selector would size the wordmark too. */
.brand > img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 163, 154, 0.14));
}



.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a,
.login-link,
.footer-columns a,
.footer-bottom a {
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.nav-links a:hover,
.login-link:hover,
.footer-columns a:hover,
.footer-bottom a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.login-link {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.header-cta {
  min-height: 38px;
  padding: 9px 18px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.18);
}

.header-cta:hover,
.button-primary:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
  box-shadow: 0 12px 30px rgba(0, 113, 227, 0.22);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-menu-button span + span {
  margin-top: 5px;
}

/* --- Eyebrow pill --- */

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(0, 113, 227, 0.07);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 2.4s ease infinite;
}

/* --- Site footer --- */

.site-footer {
  border-top: 1px solid rgba(29, 29, 31, 0.08);
  background: #f5f5f7;
}

.footer-shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding: 56px 0 40px;
}

.footer-brand-block {
  max-width: 320px;
}

.footer-brand {
  margin-bottom: 14px;
  /* Ratio B held against the footer's smaller 32px monogram. */
  gap: 8px;
}

.footer-brand > img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer-brand span {
  font-size: 12px;
}

/* The wordmark beside it is artwork, so this cannot be sized in em against a
   font-size nothing renders in any more. Ratio B grew that artwork by 36%, and
   the mark is a flex item, so vertical-align: super does nothing and the lift
   has to be a margin — in em, so it follows the size above. */
.footer-brand .tm-mark {
  align-self: flex-start;
  margin-top: -0.4em;
  margin-left: 5px;
  color: var(--faint);
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.footer-brand-block p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
}

.footer-columns div {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-columns strong {
  margin-bottom: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.footer-columns a {
  color: var(--muted);
  font-size: 13.5px;
}

.footer-legal {
  display: grid;
  gap: 16px;
  padding: 26px 0 40px;
  border-top: 1px solid rgba(29, 29, 31, 0.08);
}

.footer-legal p {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.footer-legal strong {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--faint);
  font-size: 12px;
}

.footer-bottom span:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-bottom a {
  color: var(--muted);
}

/* --- Site notice --- */

.site-notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: min(360px, calc(100% - 48px));
  padding: 14px 16px;
  border: 1px solid rgba(0, 113, 227, 0.22);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

/* --- Animations --- */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}

/* --- Responsive --- */

@media (max-width: 980px) {
  .header-shell {
    grid-template-columns: 1fr auto auto;
  }

  .mobile-menu-button {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    right: 24px;
    left: 24px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 12px 10px;
  }

  .header-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .login-link {
    display: none;
  }
}

@media (max-width: 640px) {
  .section-shell {
    width: min(100% - 32px, 1180px);
  }

  .header-shell {
    width: min(100% - 32px, 1180px);
    grid-template-columns: 1fr auto;
  }

  .brand-wordmark .wm-flip {
    --wm-w: 170px;
  }

  .header-actions {
    display: none;
  }

  .footer-shell {
    padding-top: 42px;
  }
}

/* Keyboard-only escape hatch. */
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 999;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---- The wordmark, as nine cards ---------------------------------------
   Ratio B: a 205px wordmark against the 38px monogram, with a 10px gap. The
   old lockup gave the wordmark 140px, which left the monogram looking like
   the logo and the name looking like a caption beside it.

   The nine letters are windows onto ONE image, positioned by background
   offset, so nine independently flipping cards still cost a single request —
   4.2 KB, less than the 7.2 KB the three old renditions spent between them.

   Every width, offset and gap is a fraction of --wm-w rather than a pixel, so
   one set of rules serves the header, the narrow breakpoint and anywhere else
   the mark is placed: set --wm-w and the geometry follows.

   The delays are classes, never style attributes. This site serves
   style-src 'self', which drops an inline style exactly as it drops an inline
   script — the mistake that silently flattened the hero's timing to zero. */
.wm-flip {
  --wm-w: 205px;
  display: inline-flex;
  align-items: flex-start;
  width: var(--wm-w);
  height: calc(var(--wm-w) * 0.090361);
  /* Shallow, so the far edge of a turning letter does not visibly stretch. */
  perspective: 620px;
}

.wm-flip i {
  display: block;
  flex: none;
  height: 100%;
  background-image: url("./assets/alphapine-wordmark-664.png");
  background-repeat: no-repeat;
  background-size: var(--wm-w) auto;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  animation: wmCardFlip 620ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.wm-flip i:last-child { margin-right: 0; }

  .wm-flip i:nth-child(1) { width: calc(var(--wm-w) * 0.109940); background-position-x: calc(var(--wm-w) * -0.000000); }
  .wm-flip i:nth-child(2) { width: calc(var(--wm-w) * 0.087349); background-position-x: calc(var(--wm-w) * -0.135542); }
  .wm-flip i:nth-child(3) { width: calc(var(--wm-w) * 0.097892); background-position-x: calc(var(--wm-w) * -0.246988); }
  .wm-flip i:nth-child(4) { width: calc(var(--wm-w) * 0.093373); background-position-x: calc(var(--wm-w) * -0.367470); }
  .wm-flip i:nth-child(5) { width: calc(var(--wm-w) * 0.109940); background-position-x: calc(var(--wm-w) * -0.484940); }
  .wm-flip i:nth-child(6) { width: calc(var(--wm-w) * 0.097892); background-position-x: calc(var(--wm-w) * -0.620482); }
  .wm-flip i:nth-child(7) { width: calc(var(--wm-w) * 0.016566); background-position-x: calc(var(--wm-w) * -0.740964); }
  .wm-flip i:nth-child(8) { width: calc(var(--wm-w) * 0.097892); background-position-x: calc(var(--wm-w) * -0.784639); }
  .wm-flip i:nth-child(9) { width: calc(var(--wm-w) * 0.090361); background-position-x: calc(var(--wm-w) * -0.909639); }

  .wm-flip i:nth-child(1) { margin-right: calc(var(--wm-w) * 0.025602); }
  .wm-flip i:nth-child(2) { margin-right: calc(var(--wm-w) * 0.024096); }
  .wm-flip i:nth-child(3) { margin-right: calc(var(--wm-w) * 0.022590); }
  .wm-flip i:nth-child(4) { margin-right: calc(var(--wm-w) * 0.024096); }
  .wm-flip i:nth-child(5) { margin-right: calc(var(--wm-w) * 0.025602); }
  .wm-flip i:nth-child(6) { margin-right: calc(var(--wm-w) * 0.022590); }
  .wm-flip i:nth-child(7) { margin-right: calc(var(--wm-w) * 0.027108); }
  .wm-flip i:nth-child(8) { margin-right: calc(var(--wm-w) * 0.027108); }

  .wm-flip i:nth-child(1) { animation-delay: 0ms; }
  .wm-flip i:nth-child(2) { animation-delay: 60ms; }
  .wm-flip i:nth-child(3) { animation-delay: 120ms; }
  .wm-flip i:nth-child(4) { animation-delay: 180ms; }
  .wm-flip i:nth-child(5) { animation-delay: 240ms; }
  .wm-flip i:nth-child(6) { animation-delay: 300ms; }
  .wm-flip i:nth-child(7) { animation-delay: 360ms; }
  .wm-flip i:nth-child(8) { animation-delay: 420ms; }
  .wm-flip i:nth-child(9) { animation-delay: 480ms; }

/* Each letter turns in from its edge, overshoots a little, and settles. */
@keyframes wmCardFlip {
  0%   { transform: rotateY(-95deg); opacity: 0; }
  50%  { opacity: 1; }
  64%  { transform: rotateY(12deg); }
  84%  { transform: rotateY(-4deg); }
  100% { transform: rotateY(0); opacity: 1; }
}

/* Asked for less motion: the wordmark is simply there, already finished. */
@media (prefers-reduced-motion: reduce) {
  .wm-flip i { animation: none; }
}
