/* ============================================================
   Steorra — shared styles
   Tokens (light-on-dark, over the animated shader backdrop):
     light         #ECEEF6
     dark ground   #17171f
   Modern glass UI: rounded corners, pill buttons, soft focus rings.
   ============================================================ */

html,
body {
  margin: 0;
  padding: 0;
  /* near the shader gradient's darkest tone — the ground you see while the
     background iframe loads, or if it can't */
  background: #17171f;
}

a {
  color: #ECEEF6;
  text-decoration: none;
}
a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

::selection {
  background: #ECEEF6;
  color: #17171f;
}

*:focus-visible {
  outline: 2px solid #ECEEF6;
  outline-offset: 3px;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: #17171f;
  border-left: 1px solid rgba(236, 238, 246, 0.25);
}
::-webkit-scrollbar-thumb {
  background: #ECEEF6;
  border: 3px solid #17171f;
}

/* ---- animated backdrop (ShaderGradient embed) ---- */

.shader-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  /* decorative only: clicks and scrolls pass over it */
  pointer-events: none;
}
.shader-bg canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ---- page frame ---- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 32px 40px 48px;
  /* no outer panel: the facts card and form fields do the framing */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'DotGothic16', monospace;
  color: #ECEEF6;
}


/* ---- top bar ---- */

.top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 1;
  font-size: 12px;
  letter-spacing: 0.25em;
}

/* ---- buttons: SaaS-style pills (uniform size and color) ---- */

/* one rule for every pill: same size, white at rest, glows under the cursor */
.btn,
.plate {
  box-sizing: border-box;
  width: 168px;
  height: 40px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 9999px;
  border: none;
  background: #ECEEF6;
  color: #101018;
  letter-spacing: 0.18em;
}
/* the icon's box-shadow pixels overflow its 3px layout box by 2em (6px),
   so give it real margin to keep visual space before the label */
.btn .icon-star,
.btn .icon-arrow-left,
.plate .icon-star {
  margin-right: 8px;
}
.btn {
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn:hover {
  background: #FFFFFF;
  color: #101018;
  box-shadow: 0 0 32px rgba(236, 238, 246, 0.5);
  text-decoration: none;
}
.btn:active {
  transform: scale(0.97);
}

/* current-location badge: not pressable, so not white — dark glass instead */
.plate {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(236, 238, 246, 0.2);
  color: rgba(236, 238, 246, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* pixel icons drawn in currentColor via box-shadow */
.icon-star {
  font-size: 3px;
  width: 1em;
  height: 1em;
  background: currentColor;
  box-shadow:
    0 -2em 0 0 currentColor, 0 -1em 0 0 currentColor,
    -2em 0 0 0 currentColor, -1em 0 0 0 currentColor,
    1em 0 0 0 currentColor, 2em 0 0 0 currentColor,
    0 1em 0 0 currentColor, 0 2em 0 0 currentColor,
    -1em -1em 0 0 currentColor, 1em -1em 0 0 currentColor,
    -1em 1em 0 0 currentColor, 1em 1em 0 0 currentColor;
}

.icon-arrow-left {
  font-size: 3px;
  width: 1em;
  height: 1em;
  background: currentColor;
  box-shadow:
    -1em -1em 0 0 currentColor,
    -2em 0 0 0 currentColor,
    -1em 1em 0 0 currentColor,
    1em 0 0 0 currentColor,
    2em 0 0 0 currentColor;
}

/* ---- center block ---- */

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  margin: auto 0;
  padding: 32px 0;
}

.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.wordmark-logo {
  font-family: 'Jacquard 24', serif;
  line-height: 1;
  color: #ECEEF6;
}

/* hero-page sizes (contact page sets its own inline) */
.center--hero { gap: 36px; }
.pixel-star--hero { font-size: 14px; }
.wordmark-logo--hero { font-size: 96px; }

.wordmark-sub {
  font-size: 15px;
  letter-spacing: 0.35em;
  opacity: 0.7;
}

/* company facts as a glass card */
.facts {
  z-index: 1;
  display: grid;
  grid-template-columns: auto auto;
  gap: 14px 40px;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  padding: 28px 40px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* address: justify line 1 so it matches the width of the longest line */
.facts .addr { width: fit-content; }
.facts .addr-just {
  display: block;
  text-align: justify;
  text-align-last: justify;
}

/* 15×15 pixel-star canvas; 1 cell = 1em (font-size sets the pitch) */
.pixel-star {
  width: 15em;
  height: 15em;
  position: relative;
}

.pixel-star > i {
  position: absolute;
  width: 1em;
  height: 1em;
  background: #ECEEF6;
}

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

.copyright {
  z-index: 1;
  font-size: 12px;
  letter-spacing: 0.2em;
  opacity: 0.55;
}

.copyright--hero {
  margin-top: 20px;
}

/* ---- animations ---- */


/* pixels pop in (near-zero transition; the delay does the work) */
@keyframes st-pixel-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* contact page top buttons only: shrink on narrow viewports */
.top-bar--contact .btn,
.top-bar--contact .plate {
  max-width: 42vw;
}

/* mobile: smaller top buttons; contact page keeps only the TOP button
   (deviation from the handoff spec, requested by the client) */
@media (max-width: 600px) {
  .btn,
  .plate {
    width: 140px;
    height: 36px;
    gap: 8px;
    font-size: 11px;
  }
  .top-bar--contact .plate {
    display: none;
  }
  /* keep the button in the same corner across pages: hero CONTACT moves
     to the top-left, matching the contact page's TOP button */
  .top-bar:not(.top-bar--contact) {
    flex-direction: row-reverse;
  }

  /* hero fits within the visible viewport without scrolling:
     smaller star + wordmark, tighter spacing, svh-based height */
  .page {
    padding: 24px 24px 32px;
    min-height: 100svh;
  }
  .center {
    padding: 24px 0;
  }
  .center--hero { gap: 32px; }
  .pixel-star--hero { font-size: 10px; }
  .wordmark-logo--hero { font-size: 64px; }
  .wordmark-sub { font-size: 13px; }
  .facts {
    font-size: 13px;
    line-height: 1.6;
    gap: 10px 20px;
    padding: 20px 22px;
    border-radius: 16px;
  }
  .copyright { font-size: 11px; }
  .copyright--hero { margin-top: 24px; }
}

/* very narrow screens: the English labels (REPRESENTATIVE in particular) are
   wider than the 和文 ones they replaced and squeeze the value column enough to
   break the address mid-line, so the pairs stack instead of sitting side by side */
@media (max-width: 440px) {
  .facts {
    grid-template-columns: 1fr;
    gap: 0;
    justify-items: start;
  }
  .facts > span:nth-child(odd) { margin-top: 16px; }
  .facts > span:first-child { margin-top: 0; }
}
