/* ============================================================
   localhost3000.love — a clear, funny field guide to localhost:3000
   Mobile-first. Dark "terminal at night" theme with a .love accent.
   ============================================================ */

:root {
  --bg:        #0b0e16;
  --bg-2:      #11151f;
  --panel:     #151b29;
  --panel-2:   #1b2233;
  --border:    #283146;
  --text:      #e8ecf4;
  --muted:     #9aa6bd;
  --faint:     #6b7588;

  --accent:    #5eead4;
  --accent-2:  #38bdf8;
  --amber:     #fbbf24;
  --love:      #ff5d8f;
  --love-2:    #f43f5e;
  --ok:        #5fe08a;

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1000px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(94, 234, 212, 0.10), transparent 60%),
    radial-gradient(1100px 620px at 90% 0%, rgba(255, 93, 143, 0.12), transparent 55%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.accent { color: var(--accent); }
.love { color: var(--love); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code.inline, .inline {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  color: var(--text);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #04221d;
  padding: 0.6rem 1rem; border-radius: 0 0 10px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

main > section {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 3rem) clamp(1.1rem, 5vw, 2rem);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.8rem clamp(1.1rem, 5vw, 2rem);
  background: rgba(11, 14, 22, 0.72);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(0.88rem, 3.2vw, 1.05rem); color: var(--text);
  display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-love { color: var(--love); }
.brand-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 rgba(95, 224, 138, 0.7); animation: pulse 2.4s infinite; flex-shrink: 0;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(95, 224, 138, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(95, 224, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(95, 224, 138, 0); }
}
/* ---------- hero ---------- */
.hero { text-align: center; padding-top: clamp(1.5rem, 4.5vw, 2.5rem); padding-bottom: 0.5rem; }
.kicker {
  color: var(--faint); font-family: var(--mono);
  font-size: clamp(0.66rem, 2.4vw, 0.82rem);
  margin: 0.9rem auto 0; max-width: none;
}
@media (min-width: 540px) { .kicker { white-space: nowrap; } }
.hero-title {
  font-size: clamp(1.6rem, 6.4vw, 3.2rem); line-height: 1.12; letter-spacing: -0.02em;
  margin: 0 auto 1.35rem; max-width: 19ch;
}
.hero-title .mono { font-size: 0.92em; }

/* ---------- explainer sections ---------- */
.explain-grid {
  display: grid; grid-template-columns: 1fr; gap: clamp(1.4rem, 5vw, 2.6rem); align-items: center;
}
.explain-copy h2 {
  font-size: clamp(1.5rem, 5.8vw, 2.2rem); line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 0.5rem;
}
.explain-copy > p { color: var(--muted); margin: 0 0 1rem; font-size: clamp(1rem, 3.2vw, 1.1rem); }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.points li {
  position: relative; padding-left: 1.5rem; color: var(--muted); font-size: clamp(0.98rem, 3vw, 1.06rem);
}
.points li::before {
  content: "›"; position: absolute; left: 0; top: -0.04em;
  color: var(--accent); font-weight: 700; font-family: var(--mono);
}
.explain-alt .points li::before { color: var(--amber); }
.points strong { color: var(--text); }
.local-joke {
  max-width: 700px; margin: clamp(1.5rem, 4vw, 2.25rem) auto 0; padding: 0.75rem 1rem;
  color: var(--muted); background: rgba(21, 27, 41, 0.72); border: 1px dashed var(--border);
  border-radius: 999px; text-align: center; font-size: clamp(0.9rem, 2.5vw, 1rem);
}
.local-joke code { color: var(--accent); font-family: var(--mono); }

/* loopback visual */
.explain-visual { display: flex; justify-content: center; }
.loop-card {
  width: 100%; max-width: 340px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
}
.loop-stack { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.loop-chip { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 1rem; font-size: 0.96rem; font-weight: 650; }
.loop-icon { font-size: 1.35em; line-height: 1; }
.loop-arrow { color: var(--accent); font-size: 1.5rem; line-height: 1; }
.loop-computer {
  width: 100%; background: var(--panel-2);
  border: 1px solid rgba(94, 234, 212, 0.4); border-radius: 12px; padding: 0.85rem 0.75rem 0.9rem;
}
.loop-computer-tag { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.96rem; font-weight: 650; margin-bottom: 0.7rem; }
.loop-ip { display: inline-block; font-family: var(--mono); color: var(--accent); background: rgba(94, 234, 212, 0.08); border: 1px dashed rgba(94, 234, 212, 0.4); border-radius: 8px; padding: 0.38rem 0.55rem; font-size: 0.8rem; white-space: nowrap; }
.loop-back { color: var(--faint); font-size: 0.86rem; margin: 1rem 0 0; }

/* ---------- doors (port visual) ---------- */
.building {
  width: 100%; max-width: 340px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.2rem 1.1rem; text-align: center;
}
.building-tag { display: block; font-family: var(--mono); font-size: 0.84rem; color: var(--faint); margin-bottom: 1.1rem; }
.doors { display: flex; justify-content: center; align-items: flex-end; gap: 0.7rem; }
.door {
  position: relative; width: 56px; height: 92px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 7px 7px 0 0;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 9px;
}
.door span { position: relative; z-index: 2; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.door::after { /* knob */
  content: ""; position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--faint);
}
.door-hot {
  overflow: visible; background: #2a0716; border-color: rgba(251, 191, 36, 0.6); perspective: 150px;
  box-shadow: 0 10px 24px -8px rgba(251, 191, 36, 0.6);
}
.door-hot span { color: #2a0716; font-weight: 700; }
.door-hot::after { display: none; }
.door-leaf {
  position: absolute; inset: -1px; z-index: 1; border: 1px solid rgba(251, 191, 36, 0.7);
  border-radius: 7px 7px 0 0; background: linear-gradient(180deg, var(--amber), #f59e0b);
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.28); transform: rotateY(-22deg); transform-origin: left center;
}
.door-leaf::after {
  content: ""; position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: #2a0716;
}
.building-floor { display: block; height: 3px; background: var(--border); border-radius: 2px; margin: 0 -0.2rem; }
.doors-cap { display: block; margin-top: 0.9rem; font-family: var(--mono); font-size: 0.84rem; color: var(--faint); }

/* ---------- hosting options ---------- */
.hosting-section { display: flex; justify-content: center; padding-top: clamp(1.1rem, 3vw, 1.75rem); }
.hosting-card {
  width: 100%; max-width: 920px; padding: 0;
}
.hosting-head { margin: 1.15rem 0 1rem; text-align: left; }
.hosting-title { font-size: clamp(1.4rem, 4vw, 1.8rem); letter-spacing: -0.01em; margin: 0; }

.host-controls {
  display: none; margin-bottom: 0.85rem;
}
.is-enhanced .host-controls { display: block; }
.host-toolbar { max-width: 620px; }
.host-field { display: block; min-width: 0; }
.host-select {
  width: 100%; height: 42px; padding: 0.45rem 2rem 0.45rem 0.65rem;
  color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  font: 650 0.88rem var(--sans); cursor: pointer;
}
.host-select:focus-visible, .host-show-all:focus-visible, .host-link:focus-visible, .host-price:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.62); outline-offset: 2px;
}
.host-noscript {
  margin: 0 0 1rem; color: var(--muted); font-size: 0.84rem; text-align: center;
}
.host-table-wrap { width: 100%; overflow-x: auto; border-top: 1px solid var(--border); }
.host-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.host-col-name { width: 19%; }
.host-col-price { width: 23%; }
.host-option {
  color: var(--text); background: transparent; border-bottom: 1px solid var(--border);
  transition: background 0.18s ease;
}
.host-option:hover { background: rgba(21, 27, 41, 0.46); }
.host-option[hidden] { display: none; }
.host-option > th, .host-option > td { padding: 1rem 0.45rem; vertical-align: middle; text-align: left; }
.host-option > th { padding-left: 0.2rem; }
.host-option > td:last-child { text-align: right; }
.host-name { font-family: var(--mono); font-size: 0.9rem; font-weight: 750; }
.host-price {
  color: var(--muted); font-size: 0.78rem; line-height: 1.4;
}
.host-plan {
  display: block; max-width: 13rem; margin: 0 0 0.3rem auto;
  color: var(--text); font-size: 0.75rem; font-weight: 600; line-height: 1.45;
}
.host-note {
  display: flex; width: fit-content; align-items: center; gap: 0.7rem;
  max-width: 100%; margin-top: 0.9rem; padding: 0.65rem 0.85rem;
  border: 1px solid rgba(255, 93, 143, 0.24); border-radius: 10px;
  background: rgba(255, 93, 143, 0.055);
  color: var(--text); font-size: 0.78rem; line-height: 1.5;
}
.host-note-icon { width: 23px; height: 23px; flex: 0 0 auto; color: var(--love); }
.host-note-copy { min-width: 0; }
.host-note-label {
  display: block; margin-bottom: 0.12rem; color: var(--love);
  font-size: 0.63rem; font-weight: 750; letter-spacing: 0.09em; text-transform: uppercase;
}
.host-fit {
  color: var(--muted); font-size: 0.86rem; line-height: 1.55;
}
.host-link {
  display: inline; margin-left: 0.25rem; color: var(--accent); font-size: 0.82rem; font-weight: 750; white-space: nowrap;
}
.host-empty {
  margin: 0; padding: 2rem 1rem; color: var(--muted); text-align: center;
  background: rgba(11, 14, 22, 0.42); border: 1px dashed var(--border); border-radius: 12px;
}
.host-show-all {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin: 1rem auto 0; padding: 0.55rem 0.95rem; color: var(--accent);
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  font: 750 0.86rem var(--sans); cursor: pointer;
}
.host-show-all:hover { color: var(--text); border-color: var(--accent); }
.host-show-all[hidden] { display: none; }

.host-price:hover { color: var(--accent); }

/* ---------- compact technical note + FAQ ---------- */
.port-section { padding-top: clamp(1.75rem, 4vw, 2.5rem); }
.faq-section { padding-top: clamp(1.25rem, 3vw, 2rem); }
.faq-section > h2 {
  margin: 0 0 1rem; font-size: clamp(1.4rem, 4vw, 1.8rem); letter-spacing: -0.01em;
}
.faq-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.faq-item {
  padding: 1rem; background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
}
.faq-item h3 { margin: 0 0 0.35rem; font-size: 1rem; line-height: 1.35; }
.faq-item p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* ---------- footer ---------- */
.site-footer { text-align: center; padding: 2.25rem 1.25rem 3rem; border-top: 1px solid var(--border); color: var(--muted); }
.foot-brand { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: var(--text); margin: 0 0 0.4rem; }
.foot-fine { color: var(--faint); font-size: 0.82rem; font-family: var(--mono); margin: 0; }

/* ---------- larger screens ---------- */
@media (min-width: 760px) {
  .explain-grid { grid-template-columns: 1.1fr 0.9fr; }
  .explain-alt .explain-grid { grid-template-columns: 0.9fr 1.1fr; }
  .explain-alt .explain-copy { order: 2; }
  .explain-alt .explain-visual { order: 1; }
  .faq-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .hosting-card { padding: 0; }
  .hosting-head { margin: 0.9rem 0 0.7rem; }
  .hosting-title { font-size: 1.35rem; }
  .host-table-wrap { overflow: visible; }
  .host-table, .host-table tbody { display: block; }
  .host-option { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.3rem 0.7rem; padding: 0.8rem 0; }
  .host-option[hidden] { display: none; }
  .host-option > th, .host-option > td { display: block; padding: 0; text-align: left; }
  .host-option > th { grid-column: 1; grid-row: 1; }
  .host-option > td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .host-option > td:last-child { grid-column: 2; grid-row: 1; text-align: right; }
  .host-price { font-size: 0.72rem; }
  .host-fit { font-size: 0.82rem; }
}

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