/* ==========================================================================
   daniyal.md — landing page
   The boot sequence and the Daily Log entry point. Depends on base.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Stage + boot column
   -------------------------------------------------------------------------- */

.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-8);
  min-height: 0;
}

.boot {
  width: 100%;
  max-width: 560px;
}

/* --------------------------------------------------------------------------
   2. Wordmark
   -------------------------------------------------------------------------- */

.wordmark {
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
  font-size: clamp(2.25rem, 9vw, 4rem);   /* 36px → 64px, --text-3xl → --text-5xl */
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
  color: var(--ink-900);
  margin-bottom: var(--space-8);
  width: max-content;
  max-width: 100%;
}

.wordmark__ext {
  color: var(--ink-300);
  transition: color var(--duration-base) var(--ease-standard);
}

.wordmark:hover .wordmark__ext { color: var(--accent-green); }

/* --------------------------------------------------------------------------
   3. Lines
   -------------------------------------------------------------------------- */

.line {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: clamp(0.875rem, 2.6vw, 1rem); /* 14px → 16px */
  line-height: var(--leading-snug);
  min-height: 1.35em;                      /* holds the row before text lands */
}

.line__prompt {
  color: var(--accent-green);
  font-weight: var(--weight-medium);
  flex-shrink: 0;
}

.line__body {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
}

.line--compile { color: var(--ink-500); }

.line--final {
  color: var(--ink-900);
  font-weight: var(--weight-medium);
}

/* Editor caret that trails the text as it types, then retires. */
.caret {
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  margin-left: 2px;
  background: var(--ink-700);
  opacity: 0;
  transform: translateY(0.14em);
  transition: opacity var(--duration-fast) var(--ease-standard);
}

.caret.is-on { opacity: 1; }

/* Resting cursor. A soft ease rather than a hard step — it should pulse, not
   flicker. */
.cursor {
  display: inline-block;
  margin-left: 1px;
  color: var(--ink-700);
}

.cursor.is-blinking {
  animation: cursor-blink 1.15s var(--ease-standard) infinite;
}

@keyframes cursor-blink {
  0%, 42%   { opacity: 1; }
  58%, 92%  { opacity: 0; }
  100%      { opacity: 1; }
}

/* --------------------------------------------------------------------------
   4. Build indicator
   A 2px hairline that sweeps left to right — the same gesture as the design
   system's file-parse scan line. It fades out but keeps its box, so the
   final line never shifts position.
   -------------------------------------------------------------------------- */

.build {
  position: relative;
  height: 2px;
  margin: var(--space-4) 0 var(--space-6);
  border-radius: var(--radius-pill);
  background: var(--border-hairline);
  opacity: 0;
  overflow: hidden;
  transition: opacity var(--duration-base) var(--ease-standard);
}

.build.is-on { opacity: 1; }

.build__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent-green);
  transform: scaleX(0);
  transform-origin: left center;
}

/* Linear, not one of the eased tokens. Both --ease-out and --ease-standard are
   decelerate curves built for entrances: they put 65–75% of the sweep in the
   first fifth of the run, so the bar snaps and then crawls. A determinate
   progress fill has to move at a constant rate to read as work being done.
   The system sanctions linear for exactly this kind of transition. */
.build__fill.is-running {
  transition: transform var(--build-duration, 1000ms) linear;
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   5. Daily Log entry point
   Its own centred row above the footer. The composition above is flush left,
   so centring this reads as a separate affordance rather than a stray line of
   the message.
   -------------------------------------------------------------------------- */

.action {
  display: flex;
  justify-content: center;
  padding: var(--space-6) var(--space-8) var(--space-8);
}

/* --------------------------------------------------------------------------
   6. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .stage  { padding: var(--space-6); }
  .action { padding: var(--space-5) var(--space-6) var(--space-7); }
}

@media (max-width: 600px) {
  .stage    { padding: var(--space-5); }
  .action   { padding: var(--space-5) var(--space-5) var(--space-6); }
  .wordmark { margin-bottom: var(--space-7); }
  .build    { margin: var(--space-3) 0 var(--space-5); }
}

@media (max-height: 480px) {
  .wordmark { margin-bottom: var(--space-6); }
  .build    { margin: var(--space-3) 0 var(--space-4); }
  .action   { padding: var(--space-3) var(--space-6) var(--space-4); }
}

/* --------------------------------------------------------------------------
   7. Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  /* Hidden, but it keeps its box so the vertical rhythm matches the
     animated version exactly. */
  .build {
    visibility: hidden;
    opacity: 0;
    transition: none;
  }

  .caret { display: none; }

  .cursor,
  .cursor.is-blinking {
    opacity: 1;
    animation: none;
  }

  .wordmark__ext { transition: none; }
}
