/* ===========================================
   VAM Global Styles
   ===========================================
   Shared across all pages. Import via:
   <link rel="stylesheet" href="global.css">

   Includes: design tokens, reset, typography,
   grid/layout, header, footer, buttons, email
   capture, team CTA, accessibility, breakpoints.
   =========================================== */

/* === Design Tokens === */
:root {
  --black: #000000;
  --gray-1: #73746C;
  --gray-2: #CCCCCC;
  --gray-3: #F1F1F1;
  --white-1: #FFFFFF;
  --white-2: #FBFBF9;
  --claude: #D97757;
  --card-bg: #3A3A3A;
  --off-white: #F7F1EE;
  --tan-1: #F7F1EE;

  --font-sans: "RiformaLL", "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "RiformaMonoLL", "IBM Plex Mono", monospace;

  /* Title type scale */
  --title-primary-size: 64px;
  --title-primary-line-height: 64px;
  --title-primary-tracking: -0.04em;

  --title-secondary-size: 40px;
  --title-secondary-line-height: 42px;
  --title-secondary-tracking: -0.02em;

  --title-tertiary-size: 24px;
  --title-tertiary-line-height: 24px;
  --title-tertiary-tracking: -0.02em;

  /* Body type scale */
  --body-primary-size: 16px;
  --body-primary-line-height: 1.4;

  --body-secondary-size: 14px;
  --body-secondary-line-height: 1.4;
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  background: var(--white-2);
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--black);
  background: var(--white-2);
  line-height: 1.4;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

::selection {
  background: rgba(131, 202, 86, 0.75);
  color: var(--black);
}

::-moz-selection {
  background: rgba(131, 202, 86, 0.75);
  color: var(--black);
}

/* === Promo Banner === */
.promo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  z-index: 101;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-banner a {
  font-family: var(--font-sans);
  font-size: var(--body-secondary-size);
  line-height: var(--body-secondary-line-height);
  color: var(--white-2);
  text-decoration: none;
  white-space: nowrap;
}

.promo-banner .promo-full {
  display: inline;
}

.promo-banner .promo-short {
  display: none;
}

@media (hover: hover) {
  .promo-banner a:hover {
    opacity: 0.8;
  }
}

.promo-banner a:focus-visible {
  outline: 2px solid var(--white-1);
  outline-offset: 2px;
}

/* === Header === */
#site-header {
  position: fixed;
  top: 40px;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 100;
  background: var(--white-2);
}

#site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

#site-header .site-name {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--black);
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

#site-header .site-name-sq {
  width: 14px;
  height: 14px;
  background: var(--black);
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--black);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  transition: opacity 0.15s ease;
}

.nav-link:hover {
  opacity: 0.6;
}

.nav-link-current {
  cursor: default;
}

.nav-link-current:hover {
  opacity: 1;
}

.nav-cta-short {
  display: none;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 8px 16px;
  background: var(--black);
  -webkit-tap-highlight-color: transparent;
  color: var(--white-2);
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
}

.btn-lg {
  height: 48px;
  padding: 12px 16px;
}

.btn-secondary {
  background: var(--gray-3);
  color: var(--black);
  border: none;
}

@media (hover: hover) {
  .btn:hover {
    background: #2A2A2A;
  }
  .btn:active {
    transform: scale(0.97);
    opacity: 0.8;
    transition: transform 0.06s ease-out, opacity 0.06s ease-out;
  }
  .btn-secondary:hover {
    background: #E6E4E0;
  }
  .btn-secondary:active {
    transform: scale(0.97);
    opacity: 1;
    background: #E8E8E8;
    transition: transform 0.06s ease-out;
  }
}

.btn:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

/* === Email Capture === */
.email-capture {
  grid-column: 3 / 11;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  scroll-margin-top: 144px;
  gap: 72px;
  padding: 64px 32px;
  background: #E6E4E0;
  border-radius: 12px;
  margin-top: 88px;
  margin-bottom: 0;
}

.email-capture-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.email-capture-left .email-capture-note {
  margin-top: 0;
}

.email-capture h2 {
  font-size: var(--title-secondary-size);
  letter-spacing: var(--title-secondary-tracking);
  font-weight: 400;
  line-height: var(--title-secondary-line-height);
}

.email-capture-note {
  font-size: 16px;
  line-height: 1.4;
  color: var(--black);
}

.email-capture-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  position: relative;
}

.email-capture-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  width: 100%;
  position: relative;
}

.email-capture-form .email-capture-input {
  width: 319px;
  flex: none;
  min-width: 0;
}

.email-capture-form .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.email-capture-input {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--black);
  background: #FFFFFF;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-capture-input::placeholder {
  color: var(--gray-1);
}

.email-capture-input:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}

.email-capture-input.error {
  border: 2px solid #E85930;
}

.email-capture-input.error:focus {
  border: 2px solid #E85930;
}

.email-capture-error {
  font-size: 16px;
  line-height: 1.4;
  color: #E85930;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  display: none;
}

.email-capture-error.visible {
  display: block;
}

.email-capture-success {
  font-size: 16px;
  line-height: 1.4;
  color: var(--black);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.email-capture-success.visible {
  opacity: 1;
  transform: translateY(0);
}

.email-capture-form.hiding,
.email-capture-note.hiding {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

/* === Team CTA === */
.team-cta {
  grid-column: 3 / 11;
  text-align: center;
  margin-top: 32px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--gray-1);
}

.team-cta a {
  color: var(--gray-1);
  text-decoration: underline;
  text-underline-offset: 20%;
}

.team-cta a:hover {
  color: var(--black);
}

/* === Footer === */
.site-footer {
  grid-column: 3 / 11;
  margin-top: 80px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.site-footer span,
.site-footer a {
  font-size: 14px;
  line-height: 1;
  color: var(--gray-1);
  white-space: nowrap;
}

.site-footer a {
  text-decoration: underline;
  text-underline-offset: 20%;
}

.site-footer a:hover {
  color: var(--black);
}

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

.site-name:focus-visible,
.nav-link:focus-visible,
.site-footer a:focus-visible,
.team-cta a:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

.email-capture-input:focus-visible {
  border-color: var(--black);
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================================
   RESPONSIVE BREAKPOINTS
   =========================================== */

/* === Large: 900px – 1279px === */
@media (max-width: 1279px) {
  .email-capture { grid-column: 3 / 11; }
  .email-capture-form {
    flex-direction: column;
    gap: 12px;
  }
  .email-capture-form .email-capture-input {
    width: 100%;
  }
  .email-capture-form .email-capture-error {
    position: static;
    margin-top: 0;
  }
  .email-capture-form .btn {
    width: 100%;
  }
  .team-cta { grid-column: 3 / 11; }
}

/* === Medium: 600px – 899px === */
@media (max-width: 899px) {
  .email-capture {
    grid-column: 2 / 8;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: none;
    padding: 48px 32px;
    gap: 24px;
  }
  .email-capture-left,
  .email-capture-right {
    width: 100%;
    text-align: left;
    align-items: flex-start;
  }
  .email-capture-form {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  .email-capture-form .email-capture-error {
    position: static;
    margin-top: 0;
  }
  .email-capture-form .btn {
    width: 100%;
  }
  .email-capture-form .email-capture-input {
    width: 100% !important;
    flex: none;
  }
  .team-cta { grid-column: 2 / 8; }
  .site-footer { grid-column: 2 / 8; }
}

/* === Small: 0 – 599px === */
@media (max-width: 599px) {
  .promo-banner .promo-full {
    display: none;
  }
  .promo-banner .promo-short {
    display: inline;
  }
  .nav-cta-full {
    display: none;
  }
  .nav-cta-short {
    display: inline;
  }
  .email-capture {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    padding: 32px 24px;
    gap: 16px;
  }
  .email-capture-left,
  .email-capture-right {
    width: 100%;
  }
  .email-capture-right {
    margin-top: 24px;
  }
  .email-capture-form {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  .email-capture-form .email-capture-error {
    position: static;
    margin-top: 0;
  }
  .email-capture-form .btn {
    width: 100%;
  }
  .email-capture-form .email-capture-input {
    width: 100% !important;
    flex: none;
  }
  .email-capture-input {
    font-size: 16px;
    height: 48px;
    width: 100%;
  }
  .team-cta {
    grid-column: 1 / -1;
  }
  .site-footer {
    grid-column: 1 / -1;
    margin-top: 48px;
    padding-bottom: 48px;
  }
}
