* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 500;
}
.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-agents {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.field-chrome {
  position: absolute;
  inset: 0;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 15% -10%, rgba(247, 244, 237, 0.95), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 20%, rgba(12, 92, 72, 0.07), transparent 50%),
    radial-gradient(ellipse 50% 40% at 60% 90%, rgba(180, 140, 90, 0.06), transparent 55%),
    linear-gradient(165deg, #f4f0e8 0%, var(--bg) 38%, var(--bg-deep) 100%);
}
.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.atmosphere::after {
  content: "";
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  left: 55%;
  top: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 68%);
  animation: sun-drift 18s ease-in-out infinite alternate;
}
@keyframes sun-drift {
  from { transform: translate(0, 0) scale(1); opacity: 0.7; }
  to { transform: translate(-8%, 6%) scale(1.08); opacity: 1; }
}

.shell { position: relative; z-index: 1; }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  background: rgba(247, 244, 237, 0.45);
}
.mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  white-space: nowrap;
}
.mark .br {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--accent);
  font-size: 1.05em;
  line-height: 1;
}
.mark .cursor-mark {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  margin-right: 0.1rem;
}
.mark .w2 {
  font-weight: 500;
  color: var(--muted);
}
.nav-links { display: flex; gap: 1.5rem; font-size: 0.85rem; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

.hero {
  min-height: calc(100vh - 4.2rem);
  display: grid;
  grid-template-columns: minmax(18rem, 0.3fr) minmax(0, 0.7fr);
  gap: clamp(10rem, 22vw, 18rem);
  align-items: center;
  position: relative;
  width: min(100%, 96rem);
  margin-inline: auto;
  padding: clamp(1.75rem, 4.5vw, 3rem) clamp(1.5rem, 4vw, 3.25rem) 2.75rem;
}

.desktop-field {
  position: relative;
  width: 100%;
  height: min(86vh, 46rem);
  min-height: 26rem;
  border: 1px solid var(--line);
  background: rgba(235, 231, 223, 0.72);
  backdrop-filter: blur(4px);
  overflow: hidden;
  z-index: 0;
}
.desktop-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  mask-image: linear-gradient(135deg, black, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.path-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}
.path-layer path {
  fill: none;
  stroke: rgba(12, 92, 72, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  stroke-linecap: round;
}

.rec-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.85rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  background: rgba(247, 244, 237, 0.95);
  border: 1px solid var(--line);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c0392b;
  animation: blink 1.2s ease infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.ghost-win {
  position: absolute;
  border: 1px solid var(--line);
  background: rgba(247, 244, 237, 0.92);
  box-shadow: 0 12px 40px rgba(26, 28, 30, 0.06);
  overflow: hidden;
  z-index: 1;
}
.gw1 {
  left: 4%;
  top: 12%;
  width: 36%;
  height: 52%;
  transform: rotate(-0.5deg);
}
.gw2 {
  left: 34%;
  top: 18%;
  width: 34%;
  height: 48%;
  z-index: 2;
  transform: rotate(0.6deg);
}
.gw3 {
  left: 8%;
  bottom: 18%;
  width: 28%;
  z-index: 3;
  transform: rotate(-0.3deg);
}
.gw3.live-eval {
  border-color: rgba(12, 92, 72, 0.4);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 12px 40px rgba(26, 28, 30, 0.06);
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
  overflow-x: auto;
}
.tab {
  padding: 0.4rem 0.7rem;
  font-size: 0.62rem;
  color: var(--muted);
  border-right: 1px solid var(--line);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.tab.active {
  background: rgba(247, 244, 237, 0.98);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.tab.pulse {
  background: var(--accent-soft);
  color: var(--accent);
}

.gw-bar {
  height: 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 4px;
  font-size: 0.6rem;
  color: var(--muted);
}
.gw-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(26, 28, 30, 0.2);
  background: var(--line);
}

.win-body {
  padding: 10px;
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.5;
  font-family: var(--font-mono);
}
.win-body .typed {
  color: var(--accent);
  border-right: 1px solid var(--accent);
  min-height: 1em;
}
.sandbox-body {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.sandbox-body .row {
  display: flex;
  gap: 0.35rem;
}
.sandbox-body .val { color: var(--ink); }
.sandbox-body .val.pass { color: var(--accent); font-weight: 500; }
.sandbox-body .val.wait { opacity: 0.55; }

.stream {
  position: absolute;
  right: 2.5%;
  top: 12%;
  width: min(11.5rem, 22%);
  max-height: 58%;
  border: 1px solid var(--line);
  background: rgba(247, 244, 237, 0.96);
  z-index: 4;
  font-size: 0.58rem;
  font-family: var(--font-mono);
  overflow: hidden;
}
.stream-head {
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-body);
  font-size: 0.58rem;
}
.stream-body {
  padding: 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  color: var(--muted);
}
.stream-body .ev { opacity: 0.35; transition: opacity 0.2s; }
.stream-body .ev.live { opacity: 1; color: var(--ink); }
.stream-body .ev b { color: var(--accent); font-weight: 500; }

.intent-bar {
  position: absolute;
  left: 3%;
  bottom: 3.5%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  background: rgba(247, 244, 237, 0.96);
  border: 1px solid var(--line);
  font-size: 0.6rem;
  font-family: var(--font-mono);
  color: var(--muted);
  max-width: min(18rem, 42%);
}
.intent-bar .tag {
  flex-shrink: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-body);
  font-size: 0.55rem;
}
.intent-bar .intent-text {
  color: var(--ink);
  opacity: 0.35;
  transition: opacity 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.intent-bar .intent-text.on { opacity: 1; }

.keys {
  position: absolute;
  right: 3%;
  bottom: 3.5%;
  display: flex;
  gap: 4px;
  z-index: 4;
  padding: 0.4rem 0.55rem;
  background: rgba(247, 244, 237, 0.96);
  border: 1px solid var(--line);
}
.key {
  min-width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  background: rgba(247, 244, 237, 0.95);
  font-size: 0.55rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  box-shadow: 0 2px 0 rgba(26, 28, 30, 0.08);
  transition: transform 0.08s, background 0.08s, color 0.08s, border-color 0.08s;
}
.key.down {
  transform: translateY(2px);
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}
.key.space { min-width: 48px; }

.cursor {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 8;
  left: 0;
  top: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(12, 92, 72, 0.35));
  will-change: transform;
}
.click-ring {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -5px 0 0 -5px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  z-index: 7;
  pointer-events: none;
}
.click-ring.show {
  animation: ring 0.45s ease-out forwards;
}
@keyframes ring {
  from { transform: scale(0.4); opacity: 0.85; }
  to { transform: scale(1.8); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  padding-right: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.2vw, 4.4rem);
  font-optical-sizing: auto;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0 0 1.9rem;
  color: var(--ink);
  white-space: nowrap;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.12em;
  font-weight: 600;
  width: max-content;
  max-width: 100%;
  position: relative;
}
.brand .br {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--accent);
  font-size: 0.92em;
  line-height: 1;
  flex-shrink: 0;
  transform: translateY(-0.02em);
}
.brand .br-open {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translate(-0.06em, -52%);
}
.brand .cursor-mark {
  width: 0.36em;
  height: 0.36em;
  flex-shrink: 0;
  margin-right: 0.06em;
}
.brand .w1 {
  font-weight: 700;
  flex-shrink: 0;
}
.brand .w2 {
  font-weight: 500;
  color: var(--muted);
  flex-shrink: 0;
}
.belief {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.6vw, 1.65rem);
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 1.25rem;
  max-width: 22rem;
}
.belief .line {
  display: block;
}
.belief .line-1 {
  white-space: nowrap;
}
.belief em {
  font-style: normal;
  font-weight: 400;
  color: var(--accent);
}
.promise {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
  white-space: nowrap;
}
.cta {
  display: inline-flex;
  margin-top: 2rem;
  padding: 0.9rem 1.3rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.cta:hover { background: var(--accent); }

.contact-block {
  background: var(--ink);
  color: var(--paper);
  border-top: none;
  padding: clamp(3.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 3.25rem) 2.75rem;
}
.contact-inner {
  width: min(100%, 96rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-copy h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.85rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  max-width: 14ch;
  margin: 0 0 1rem;
  color: var(--paper);
}
.contact-copy .lede {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: rgba(247, 244, 237, 0.62);
  max-width: 28ch;
  margin: 0;
}
.contact-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.15rem;
  padding-top: 0.2rem;
}
.contact-action .label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247, 244, 237, 0.4);
  font-weight: 400;
  margin-bottom: 0.35rem;
  display: block;
}
.contact-action .mail {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  letter-spacing: -0.01em;
  color: var(--paper);
  border-bottom: 1px solid rgba(125, 206, 160, 0.5);
  padding-bottom: 0.25rem;
  line-height: 1.3;
  display: inline-block;
}
.contact-action .mail:hover {
  color: #7dcea0;
  border-bottom-color: #7dcea0;
}
.contact-action .book {
  display: inline-flex;
  padding: 0.85rem 1.2rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.contact-action .book:hover {
  background: #7dcea0;
}

.site-end {
  background: var(--ink);
  color: rgba(247, 244, 237, 0.55);
  padding: 2rem clamp(1.5rem, 4vw, 3.25rem) 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  border-top: 1px solid rgba(247, 244, 237, 0.12);
}
.site-end-inner {
  width: min(100%, 96rem);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.site-end strong {
  color: rgba(247, 244, 237, 0.85);
  font-weight: 500;
}
.site-end a {
  color: rgba(247, 244, 237, 0.55);
  border-bottom: 1px solid transparent;
}
.site-end a:hover {
  color: rgba(247, 244, 237, 0.9);
  border-bottom-color: rgba(247, 244, 237, 0.35);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.75rem;
  }
  .hero-content { order: 2; max-width: 42rem; }
  .desktop-field {
    order: 1;
    height: min(52vh, 26rem);
  }
  .brand { font-size: clamp(2.5rem, 8vw, 3.75rem); }
  .gw1 { width: 42%; height: 46%; }
  .gw2 { left: 38%; width: 36%; height: 42%; }
  .gw3 { width: 36%; bottom: 16%; }
  .stream { width: min(10rem, 28%); }
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .desktop-field { height: min(44vh, 20rem); }
  .gw1 { width: 58%; height: 40%; left: 4%; top: 14%; }
  .gw2 { left: 32%; top: 28%; width: 50%; height: 36%; }
  .gw3 { display: none; }
  .stream {
    top: auto;
    bottom: 14%;
    right: 3%;
    width: 42%;
    max-height: 32%;
  }
  .intent-bar { max-width: 52%; }
  .keys { right: 3%; }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere::after, .rec-dot { animation: none; }
}
