/* ---------------------------------------------------------------
   Hrusoft — landing page
   Direction: phosphor. Monospace throughout, committed to dark:
   a terminal that never had a light mode.
   --------------------------------------------------------------- */

:root {
  --bg:          #070c0a;
  --ink:         #eefaf3;
  --ink-dim:     #9fb8ab;
  --ink-faint:   #5d7a6c;
  --phos:        #34d399;
  --phos-bright: #6ee7a8;
  --amber:       #fbbf24;   /* borrowed from the Tabs icon, so it reads as deliberate */
  --rule:        rgba(52, 211, 153, 0.18);

  --font-mono:   "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --step--1:     clamp(0.72rem, 0.69rem + 0.14vw, 0.79rem);
  --step-0:      clamp(0.88rem, 0.85rem + 0.16vw, 0.95rem);
  --step-1:      clamp(1rem, 0.95rem + 0.24vw, 1.12rem);
  --step-hero:   clamp(1.85rem, 1.15rem + 3.1vw, 3.25rem);

  --gutter:      clamp(1.5rem, 5vw, 5.5rem);
}

/* --------------------------------------------------------------- reset */

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--ink-faint) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Phosphor bloom, weighted to the upper right so it never sits under the type.
   It covers the whole viewport deliberately: sizing the element to a sub-box
   put a hard edge partway across the screen wherever the gradient had not
   finished fading by the box boundary. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(58vmax 58vmax at 86% 6%, rgba(52, 211, 153, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

h1, h2 { font-weight: 400; }

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.026) 0px,
    rgba(255, 255, 255, 0.026) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* --------------------------------------------------------------- layout */

.page {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin-inline: auto;
  padding: clamp(1.75rem, 4vw, 3rem) var(--gutter) clamp(2rem, 4vw, 3rem);
  display: grid;
  gap: clamp(3.5rem, 9vw, 7rem);
}

/* The page grid spaces header/main/footer; main spaces its own sections. */
main {
  display: grid;
  gap: clamp(3.5rem, 9vw, 7rem);
}

/* --------------------------------------------------------------- wordmark */

.mark {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--step-0);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--phos-bright);
}

.caret {
  width: 0.55em;
  height: 1.05em;
  background: var(--phos);
  animation: blink 1.15s steps(1) infinite;
}

@keyframes blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* --------------------------------------------------------------- prompts */

.prompt {
  margin: 0;
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.prompt__sigil { color: var(--phos); }

/* --------------------------------------------------------------- hero */

.hero { position: relative; }

.headline {
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  max-width: 15ch;
  font-size: var(--step-hero);
  line-height: 1.26;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
}

/* The engineer's disclaimer. Small, faint, and nowrap so the joke never
   breaks across two lines. */
.headline__aside {
  display: inline-block;
  margin-left: 0.7em;     /* em of the small size, so the gap stays modest */
  font-size: 0.32em;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--ink-faint);
  white-space: nowrap;
  vertical-align: baseline;
}

.lede {
  margin: clamp(1.75rem, 3.5vw, 2.5rem) 0 0;
  padding-left: 1.35rem;
  border-left: 2px solid var(--rule);
  max-width: 40ch;
  font-size: var(--step-1);
  line-height: 1.8;
}

/* --------------------------------------------------------------- ascii pod */

.pod {
  position: absolute;
  right: 0;
  top: -1.5rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: var(--phos);
  opacity: 0.34;
  text-shadow: 0 0 18px rgba(52, 211, 153, 0.35);
  white-space: pre;
  user-select: none;
  /* Fades the block into the page on every side, so the pod has no
     rectangular boundary of its own. */
  -webkit-mask-image: radial-gradient(ellipse 74% 74% at 50% 46%, #000 32%, transparent 78%);
          mask-image: radial-gradient(ellipse 74% 74% at 50% 46%, #000 32%, transparent 78%);
}

/* It needs real room, and there is none next to the headline on a phone. */
@media (max-width: 62rem) {
  .pod { display: none; }
}

/* --------------------------------------------------------------- apps */

.apps__list {
  list-style: none;
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.app {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--phos);
  transition: border-color 220ms ease, background-color 220ms ease;
}

.app:hover {
  background: rgba(52, 211, 153, 0.035);
  border-color: rgba(52, 211, 153, 0.36);
  border-left-color: var(--phos-bright);
}

.app__icon {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  display: block;
}

.app__name {
  margin: 0;
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.app__desc {
  margin: 0.6rem 0 0;
  max-width: 52ch;
  line-height: 1.75;
}

.app__meta {
  margin: 0.85rem 0 0;
  font-size: var(--step--1);
  letter-spacing: 0.13em;
  color: var(--ink-faint);
}

.app__get {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding-top: 0.15rem;
  color: var(--amber);
  font-size: var(--step-0);
  text-decoration: none;
  white-space: nowrap;
}

.app__arrow { transition: transform 260ms cubic-bezier(0.2, 0.7, 0.3, 1); }

.app__get:hover,
.app__get:focus-visible { text-decoration: underline; text-underline-offset: 5px; }

.app__get:hover .app__arrow,
.app__get:focus-visible .app__arrow { transform: translateX(0.3em); }

.apps__note {
  margin: 1.5rem 0 0;
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  opacity: 0.75;
}

/* Icon, text and download stack rather than squeeze. */
@media (max-width: 46rem) {
  .app {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 1.1rem;
  }
  .app__get { grid-column: 1 / -1; }
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  border-top: 1px solid var(--rule);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.foot__mail {
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 200ms ease;
}

.foot__mail:hover,
.foot__mail:focus-visible {
  color: var(--phos-bright);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------- focus */

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

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
