/* ==========================================================================
   Urban Autonomy Lab — design tokens
   Source of truth: Figma "CAM Visual Design" file, frame 1920x1080
   ========================================================================== */

@font-face {
  font-family: 'Lyon Display Light';
  src: url('../fonts/LyonDisplay-Light-Trial.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color tokens */
  --color-page-bg: #F5F5F5;
  --color-main: #2586ED;
  --color-accent: #A1FFFD;
  --color-text: #F6F8ED;
  --color-ink: #000000;

  /* Fonts */
  --font-header: 'Lyon Display Light', Georgia, serif;
  --font-body: 'neue-haas-grotesk-text', Helvetica, Arial, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;
  --font-weight-medium: 500;
}

/* ==========================================================================
   Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--color-page-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  line-height: 1.25;
  display: flex;
}

h2 {
  font-family: var(--font-header);
  font-weight: 300;
  margin: 0 0 1rem 0;
  line-height: 1.05;
}

p {
  margin: 0;
}

a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
}

a:hover,
a:focus {
  color: var(--color-accent);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

input:focus {
  outline: none;
}

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

/* ==========================================================================
   Panel
   ========================================================================== */

.panel {
  --panel-pad-x: clamp(1rem, 1.56vw, 2.5rem);
  --panel-pad-y: clamp(1rem, 2.78vh, 2.5rem);
  --left-col: 50%;
  position: relative;
  flex: 1;
  margin: clamp(14px, 2.78vh, 32px) clamp(14px, 1.56vw, 32px);
  padding: var(--panel-pad-y) var(--panel-pad-x);
  background: var(--color-main);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  flex: 0 0 auto;
}

.logo {
  height: clamp(40px, 7.8vh, 84px);
  width: auto;
  display: block;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero-main {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 0;
  padding-top: clamp(1rem, 2vh, 2rem);
  padding-bottom: clamp(1rem, 2vh, 2rem);
}

.hero-content {
  width: var(--left-col);
  max-width: var(--left-col);
  min-width: 0;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: var(--font-weight-medium);
  font-size: clamp(1rem, 2.7vh, 1.45rem);
  color: var(--color-ink);
  background: var(--color-accent);
  padding: 0.5em 1em;
  margin-bottom: clamp(1rem, 4vh, 2.5rem);
}

.lead {
  font-size: clamp(1.1rem, min(2.2vw, 2.4vh), 1.55rem);
  line-height: 1.4;
}

/* ==========================================================================
   Bottom-left — newsletter + footer, same width as hero content
   ========================================================================== */

.bottom-left {
  flex: 0 0 auto;
  width: var(--left-col);
  max-width: var(--left-col);
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.5vh, 1.25rem);
}

.newsletter h2 {
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  font-size: clamp(0.8rem, min(1.4vw, 1.5vh), 1rem);
  margin-bottom: clamp(0.75rem, 2vh, 1.25rem);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form {
  max-width: 100%;
}

.hidden-field {
  position: absolute;
  left: -9999px;
}

.field {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--color-text);
}

.field-row {
  display: flex;
  align-items: stretch;
}

input {
  font-family: var(--font-mono);
  font-weight: var(--font-weight-medium);
  font-size: clamp(0.75rem, 1.8vh, 1rem);
  line-height: 1.2;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  width: 100%;
  height: 100%;
}

input::placeholder {
  color: var(--color-text);
  opacity: 0.6;
}

.button {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: var(--font-weight-medium);
  font-size: clamp(0.75rem, 1.8vh, 1rem);
  line-height: 1.2;
  background: var(--color-accent);
  color: var(--color-ink);
  border: none;
  border-radius: 0;
  padding: 0.9rem 1.5rem;
  cursor: pointer;
  white-space: nowrap;
}

.button:hover,
.button:focus {
  background: #F5F5F5;
  color: var(--color-ink);
}

.form-status {
  font-weight: var(--font-weight-medium);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.form-status.success {
  color: #B8F397;
}

.form-status.error {
  color: #FFB4AB;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer-attribution {
  font-size: clamp(0.7rem, 1.3vh, 0.85rem);
}

/* ==========================================================================
   Small screens
   ========================================================================== */

@media (max-width: 760px) {
  .hero-content,
  .bottom-left {
    width: 100%;
    max-width: 100%;
  }
}
