@import url('./font.ttf');

:root {
  --bg: #070a10;
  --surface: #0e141f;
  --surface2: #141c2b;
  --border: rgba(255, 255, 255, 0.09);
  --border2: rgba(255, 255, 255, 0.17);
  --cyan: #38bdf8;
  --mint: #34d399;
  --steel: #94a3b8;
  --white: #ffffff;
  --radius: 12px;
}

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

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
  color: var(--white);
  background: radial-gradient(circle at 74% 34%, rgba(56, 189, 248, 0.07), transparent 29%), var(--bg);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base layout */
.shell {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  box-sizing: border-box;
}

.hero {
  width: min(1180px, 100%);
  max-width: 100%;
  display: grid;
  grid-template-columns: 1.12fr 0.72fr;
  gap: 72px;
  align-items: center;
  min-width: 0;
}

.copy {
  min-width: 0;
  max-width: 100%;
}

/* Typography & Badges */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--cyan);
  font: 600 0.76rem/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.14em;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.08);
}

h1 {
  max-width: 700px;
  margin: 0 0 26px;
  font-size: clamp(3rem, 5.3vw, 5rem);
  line-height: 1.01;
  letter-spacing: -0.055em;
  overflow-wrap: break-word;
  word-break: break-word;
}

h1 span {
  color: var(--cyan);
}

.lead {
  max-width: 620px;
  margin: 0 0 38px;
  color: var(--steel);
  font-size: 1.16rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Actions & Buttons */
.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}

.primary,
.secondary {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 0.9rem/1.2 'Plus Jakarta Sans', sans-serif;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: 0.2s ease;
  box-sizing: border-box;
  max-width: 100%;
}

.primary {
  border-color: var(--white);
  background: var(--white);
  color: var(--bg);
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.12);
}

.secondary {
  background: transparent;
  color: var(--white);
}

.secondary:hover {
  background: var(--surface2);
}

.status {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--mint);
  font: 500 0.75rem/1.4 'IBM Plex Mono', monospace;
}

/* Notes list */
.notes {
  margin-top: 46px;
  border-top: 1px solid var(--border);
}

.notes > div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  color: var(--steel);
  font-size: 0.88rem;
  line-height: 1.55;
  min-width: 0;
}

.notes b {
  color: var(--cyan);
  font: 600 0.75rem 'IBM Plex Mono', monospace;
}

/* QR Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.55);
  width: 100%;
  max-width: 440px;
  min-width: 0;
  box-sizing: border-box;
}

.card-head,
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 600 0.7rem/1.2 'IBM Plex Mono', monospace;
  letter-spacing: 0.08em;
}

.card-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  color: var(--mint);
}

.card-head span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-head i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  flex-shrink: 0;
}

.mono,
.card-foot {
  color: var(--steel);
}

.qr-wrap {
  margin: 24px 0;
  padding: 18px;
  border-radius: 10px;
  background: #ffffff;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  box-sizing: border-box;
}

#qrCanvas {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 1;
  box-sizing: border-box;
}

.card-foot {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* Tablet & Smaller Desktops */
@media (max-width: 850px) {
  .shell {
    padding: 34px 22px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .copy {
    max-width: 680px;
    width: 100%;
  }

  .card {
    width: min(440px, 100%);
    justify-self: center;
    margin: 0 auto;
  }

  h1 {
    font-size: clamp(2.65rem, 11vw, 4rem);
  }
}

/* Mobile Devices */
@media (max-width: 580px) {
  .shell {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: max(28px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }

  .hero {
    display: flex;
    flex-direction: column;
    gap: 36px;
    width: 100%;
  }

  .copy {
    width: 100%;
  }

  .eyebrow {
    font-size: 0.67rem;
    margin-bottom: 20px;
  }

  h1 {
    font-size: clamp(2.1rem, 8.5vw, 2.7rem);
    margin-bottom: 20px;
    letter-spacing: -0.045em;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 28px;
  }

  .actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .primary,
  .secondary {
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
  }

  .notes {
    margin-top: 30px;
  }

  .notes > div {
    grid-template-columns: 36px 1fr;
    gap: 10px;
  }

  .card {
    padding: 20px 18px;
    width: 100%;
    max-width: 100%;
  }

  .qr-wrap {
    margin: 20px 0;
    padding: 14px;
  }

  .card-head,
  .card-foot {
    font-size: 0.68rem;
  }
}

/* Ultra-compact screens (e.g. iPhone SE 1st gen, small watch/foldables <= 360px) */
@media (max-width: 360px) {
  .shell {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  h1 {
    font-size: 1.95rem;
  }

  .lead {
    font-size: 0.94rem;
  }

  .card {
    padding: 16px 14px;
  }

  .qr-wrap {
    padding: 10px;
    margin: 16px 0;
  }

  .primary,
  .secondary {
    font-size: 0.85rem;
    padding: 12px 14px;
  }

  .notes > div {
    grid-template-columns: 28px 1fr;
    font-size: 0.82rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
