/* ===================================================================
   Under Construction — "Blueprint" theme
   Palette, type, and layout tokens are defined once below and reused
   throughout. Edit the :root block to re-theme the whole page.
   =================================================================== */

:root {
  /* Color */
  --bg: #0e2f4f;
  --bg-grid: rgba(234, 242, 248, 0.06);
  --surface: #123a5e;
  --line: #5a89ac;
  --paper: #eaf2f8;
  --amber: #ffb627;
  --amber-dark: #c97a1b;
  --error: #ff8a80;
  --success: #8fe3c0;

  /* Type */
  --font-hand: 'Architects Daughter', cursive;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --radius: 3px;
  --card-max: 640px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, var(--bg-grid) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, var(--bg-grid) 0 1px, transparent 1px 32px);
  color: var(--paper);
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------- Card ---------- */

.card {
  position: relative;
  width: 100%;
  max-width: var(--card-max);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(2rem, 6vw, 3.25rem);
  text-align: center;
}

.corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--amber);
}
.corner--tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.corner--tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.corner--bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.corner--br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin: 0 0 1.25rem;
}

.blink {
  animation: blink 1.1s steps(1) infinite;
}

/* ---------- Illustration ---------- */

.blueprint-illustration {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto 0.5rem;
  display: block;
  overflow: visible;
}

.blueprint-illustration line,
.blueprint-illustration rect,
.blueprint-illustration polygon {
  fill: none;
  stroke: var(--paper);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.sketch {
  stroke-dasharray: 4 4;
  opacity: 0.85;
}

.sketch.thin {
  stroke-width: 1;
  stroke: var(--line);
}

.draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1s ease forwards;
}

.fill-line {
  fill: var(--line);
  stroke: none;
}

.fill-amber {
  fill: var(--amber);
  stroke: none;
}

.beam {
  fill: var(--amber);
  stroke: var(--paper);
  stroke-width: 1;
}

.dim-label {
  font-family: var(--font-mono);
  font-size: 7px;
  fill: var(--line);
  stroke: none;
  letter-spacing: 0.05em;
}

.crane-jib {
  transform-box: fill-box;
  transform-origin: 25% 50%;
  animation: sway 4s ease-in-out infinite;
}

.crane-hook {
  animation: bob 3s ease-in-out infinite;
}

/* ---------- Headline & copy ---------- */

h1 {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  line-height: 1.05;
  margin: 0.5rem 0 0.75rem;
  color: var(--paper);
}

.subtext {
  font-size: 0.975rem;
  line-height: 1.65;
  color: rgba(234, 242, 248, 0.82);
  max-width: 30em;
  margin: 0 auto 2rem;
}

/* ---------- Countdown ---------- */

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1rem);
  flex-wrap: wrap;
  margin: 0 0 2rem;
}

.time-box {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.5rem;
  min-width: 64px;
}

.time-box .num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: var(--paper);
}

.time-box .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--line);
  margin-top: 0.2rem;
}

/* ---------- Progress (tape-measure) ---------- */

.progress {
  margin: 0 0 2.25rem;
  text-align: left;
}

.progress-row {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--line);
  margin-bottom: 0.5rem;
}

.progress-track {
  position: relative;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px);
  background-size: 100% 6px;
  background-position: left bottom;
  background-repeat: no-repeat;
  overflow: visible;
}

.progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--amber);
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-tab {
  position: absolute;
  top: -24px;
  left: 0%;
  transform: translateX(-50%);
  background: var(--amber);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius);
  transition: left 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.progress-tab::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--amber);
}

/* ---------- Form ---------- */

.notify-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.notify-form input[type='email'] {
  flex: 1 1 220px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.notify-form input[type='email']::placeholder {
  color: var(--line);
}

.notify-form input[type='email']:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.notify-form button {
  background: var(--amber);
  color: var(--bg);
  border: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.notify-form button:hover {
  background: #ffc750;
}

.notify-form button:active {
  transform: translateY(1px);
}

.notify-form button:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.notify-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

.form-message {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-height: 1.2em;
  margin: 0.75rem 0 0;
}

.form-message.error { color: var(--error); }
.form-message.success { color: var(--success); }

/* ---------- Footer ---------- */

footer {
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--line);
}

.divider {
  border-top: 1px dashed var(--line);
  margin-bottom: 1.25rem;
}

footer a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}

footer a:hover {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1rem;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  border-color: var(--amber);
  color: var(--amber);
  outline: none;
}

/* ---------- Keyframes ---------- */

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes sway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(1.2deg); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

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

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .card { padding: 1.75rem 1.25rem; }
  .time-box { min-width: 56px; padding: 0.5rem 0.4rem; }
  .notify-form { flex-direction: column; align-items: stretch; }
  .notify-form input[type='email'] { flex: 0 1 auto; }
  .notify-form button { width: 100%; }
}

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

@media (prefers-reduced-motion: reduce) {
  .draw {
    animation: none;
    stroke-dashoffset: 0;
  }
  .crane-jib,
  .crane-hook,
  .blink {
    animation: none;
  }
  .progress-fill,
  .progress-tab {
    transition: none;
  }
}
