/*
 * Coming-soon page for stacktether.com. Plain CSS, no JavaScript.
 * Colours, type and spacing are copied from the portal's design tokens
 * (app/(portal)/styles/tokens.css, DESIGN.md "The Labeled Rack"); keep
 * them in step if the portal tokens change.
 */

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/BarlowCondensed-Bold-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Light theme (default) ---- */
:root {
  color-scheme: light dark;

  --ground: #f2f4f7;
  --surface: #ffffff;
  --surface-sunken: #e9edf1;
  --hairline: #d6dbe1;
  --hairline-strong: #848d98;
  --ink: #15191e;
  --ink-muted: #525b66;
  --cord-neutral: #7a838e;
  --focus: #1d5bd6;
  --selection: #cfe0ff;

  /* Label tape: white tape, black letters, in both themes. */
  --tape-bg: #f6f6f1;
  --tape-ink: #0b0c0d;
  --tape-edge: #c9c9c0;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-tape: "Barlow Condensed", "Arial Narrow", "Helvetica Neue Condensed", "Roboto Condensed",
    "Liberation Sans Narrow", "Helvetica Neue", Arial, sans-serif;

  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-xl: 1.75rem;

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  --radius-sm: 2px;
  --radius-md: 4px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Dark theme: follows the computer's setting ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0d0f12;
    --surface: #161a1f;
    --surface-sunken: #1d2228;
    --hairline: #2c323a;
    --hairline-strong: #6b7581;
    --ink: #e8ebef;
    --ink-muted: #a3acb7;
    --cord-neutral: #8a939e;
    --focus: #8ab4ff;
    --selection: #2b4a80;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
}

::selection {
  background: var(--selection);
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---- Top bar: a small Sign in link on the right ---- */
.top {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-4) var(--space-6);
}

.signin {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 120ms;
}

.signin:hover {
  background: var(--surface-sunken);
}

/* ---- The main block ---- */
.hero {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--space-7) var(--space-6);
}

.logo {
  margin: 0 0 var(--space-6);
  line-height: 0;
}

.logo img {
  display: block;
  width: min(100%, 22rem);
  min-width: 180px; /* brand rule: full logo never below 180px */
  height: auto;
}

.tagline {
  margin: 0 0 var(--space-4);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.25;
}

.lead {
  max-width: 70ch;
  margin: 0 0 var(--space-6);
  color: var(--ink-muted);
  font-size: var(--text-md);
}

/* ---- Label tape and the tether line (the portal's signature) ---- */
.tag-pair {
  display: flex;
  align-items: center;
  margin: 0;
}

.tape {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 2px var(--space-3);
  border: 1px solid var(--tape-edge);
  border-radius: var(--radius-sm);
  background: var(--tape-bg);
  color: var(--tape-ink);
  font-family: var(--font-tape);
  font-stretch: condensed;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.12);
}

.tether {
  position: relative;
  flex: 0 1 4rem;
  min-width: 2rem;
  height: 2px;
  margin: 0 7px;
  background: var(--cord-neutral);
  transform-origin: left center;
  animation: tether-draw 700ms var(--ease-out) 150ms both;
}

.tether::before,
.tether::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--cord-neutral);
}

.tether::before {
  left: -7px;
}

.tether::after {
  right: -7px;
}

@keyframes tether-draw {
  from {
    transform: scaleX(0.08);
  }
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tether {
    animation: none;
  }
  .signin {
    transition: none;
  }
}

/* ---- Footer ---- */
.foot {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.foot p {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ---- Phones (768px and narrower) ---- */
@media (max-width: 768px) {
  .top,
  .hero,
  .foot {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
  .hero {
    padding-top: var(--space-6);
  }
  .foot p {
    padding: 0;
  }
}

/* ---- Small phones (480px and narrower) ---- */
@media (max-width: 480px) {
  .tagline {
    font-size: 1.5rem;
  }
  .lead {
    font-size: var(--text-base);
  }
}
