@font-face {
  font-family: "Typewriter";
  src: url("fonts/typewriter.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #ffffff;
  --ink:       #0a0a0a;
  --muted:     #4a4a4a;
  --accent:    #0a0a0a;
  --max-width: 56rem;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

main {
  min-height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 6rem) 1.5rem;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: start;
  justify-items: center;
  text-align: center;
  gap: clamp(3rem, 12vh, 7rem);
}

/* --- brand block (logo + name) ------------------------------------ */
.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  flex-wrap: wrap;
  justify-content: center;
}

.logo {
  width: clamp(4rem, 9vw, 6.5rem);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.brand h1 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 5vw, 3.25rem);
}

/* --- typewriter line --------------------------------------------- */
.tagline {
  align-self: center;
  font-family: "Typewriter", "Courier 10 Pitch", "Courier New", monospace;
  font-size: clamp(1.25rem, 3vw, 2rem);
  color: var(--muted);
  line-height: 1.4;
  letter-spacing: 0.01em;
  /* reserve baseline so the cursor doesn't make the page jump while
     the text grows from 0 chars */
  min-height: 1.5em;
  display: flex;
  align-items: center;
}

.tw-cursor {
  display: inline-block;
  margin-left: 2px;
  font-weight: 400;
  animation: blink 0.9s step-end infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .tw-cursor { animation: none; opacity: 0.6; }
}

/* --- contact form -------------------------------------------------- */
.contact {
  width: 100%;
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  margin-top: 1rem;
}

.contact h2 {
  margin: 0;
  text-align: center;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--muted);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field .label {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: left;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field textarea {
  resize: vertical;
  min-height: 6rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10,10,10,0.08);
}

/* honeypot — invisible to real users */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-btn {
  font: inherit;
  font-weight: 500;
  padding: 0.7rem 1.2rem;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: background 120ms ease, transform 60ms ease;
}

.submit-btn:hover { background: #333; }
.submit-btn:active { transform: translateY(1px); }
.submit-btn:disabled { opacity: 0.55; cursor: progress; }

.form-status {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.9rem;
  text-align: center;
}

.form-status.sending { color: var(--muted); }
.form-status.ok      { color: #1a7f37; }
.form-status.err     { color: #b3261e; }

.cf-turnstile {
  display: flex;
  justify-content: center;
}
