/* ───────── M2 TECH — global stylesheet ───────── */

:root {
  --accent: #00FFC2;
  --accent-soft: #A3FDE7;
  --accent-wash: #E7FFF9;

  --ink: #0B0B0B;
  --ink-2: #1A1919;
  --ink-3: #2C2C2C;
  --muted: #6F6C6C;
  --muted-2: #B7B5B5;

  --paper: #F6F4EF;        /* warm off-white */
  --paper-2: #EEEBE3;
  --paper-3: #E5E1D7;
  --line: rgba(11,11,11,0.12);
  --line-2: rgba(11,11,11,0.06);

  --f-display: 'Inria Sans', 'Instrument Serif', Georgia, serif;
  --f-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --radius: 14px;
  --radius-sm: 8px;

  --logo-bg: #000000; 

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --ink: #F6F4EF;
  --ink-2: #E5E1D7;
  --ink-3: #B7B5B5;
  --muted: #8A8888;
  --muted-2: #4E4E4E;
  --paper: #0B0B0B;
  --paper-2: #141413;
  --paper-3: #1C1B1A;
  --line: rgba(246,244,239,0.12);
  --line-2: rgba(246,244,239,0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body { transition: background 0.35s var(--ease), color 0.35s var(--ease); }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: var(--ink); }

/* ────── typography ────── */
.display {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 0.92;
}
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono { font-family: var(--f-mono); }

/* ────── layout ────── */
.wrap {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

/* ────── nav ────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--paper) 70%, transparent);
  border-bottom: 1px solid var(--line-2);
  transition: all 0.3s var(--ease);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-link {
  position: relative;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 999px;
  transition: all 0.2s var(--ease);
}
.nav-link:hover { background: var(--paper-2); }
.nav-link.active {
  background: var(--ink);
  color: var(--paper);
}
.nav-cta {
  padding: 10px 18px;
  background: var(--accent);
  color: var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--ink);
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 0 -3px var(--ink); }

.nav-burger {
  display: none;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--paper-2);
  align-items: center;
  justify-content: center;
}
@media (max-width: 900px) {
  .nav-links, .nav-cta-desktop { display: none; }
  .nav-burger { display: inline-flex; }
}

/* mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
  display: flex;
  flex-direction: column;
  padding: 28px 28px 40px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.drawer.open { transform: translateY(0); }
.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 32px;
}
.drawer-link {
  font-family: var(--f-display);
  font-size: clamp(36px, 9vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  padding: 14px 0;
  border-bottom: 1px solid rgba(246,244,239,0.15);
  transition: color 0.2s var(--ease);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-link:hover { color: var(--accent); }

/*-----------Mobile CTA -----------*/
.cta-card {
  background: var(--accent);
  border: 1px solid var(--ink);
  border-radius: 24px;
  padding: 64px 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: start;
}

@media (max-width: 720px) {
  .cta-card {
    grid-template-columns: 1fr;   /* stack heading above buttons */
    padding: 40px 24px;           /* 48px side padding is too much on a phone */
    gap: 28px;
  }
  .cta-actions {
    width: 100%;
    align-items: stretch;         /* buttons fill the width */
  }
  .cta-actions .btn {
    width: 100%;
    justify-content: center;
    overflow-wrap: anywhere;      /* lets the email break if it's ever too long */
  }
}

/* ────── buttons ────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink); }
.btn-accent {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--ink);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 0 -4px var(--ink); }

/* ────── section ────── */
.section { padding: 120px 0; position: relative; }
.section-sm { padding: 80px 0; }
@media (max-width: 720px) { .section { padding: 72px 0; } .section-sm { padding: 56px 0; } }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: end;
}
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
}
.section-head h2 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(40px, 5.5vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.section-head p {
  color: var(--muted);
  font-size: clamp(16px, 1.2vw, 19px);
  max-width: 54ch;
  margin: 0;
}

/* ────── ticker ────── */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  background: var(--paper);
}
.ticker-track {
  display: flex;
  gap: 64px;
  animation: tick 40s linear infinite;
  white-space: nowrap;
  will-change: transform;
}
.ticker-item {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 40px;
  letter-spacing: -0.01em;
}
.ticker-dot {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
@keyframes tick {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ────── reveal ────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ────── cards ────── */
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--ink); }

/* ────── footer ────── */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 32px;
  border-top: 1px solid var(--ink-3);
}
[data-theme="dark"] .footer { background: #000; }
.footer h3 {
  font-family: var(--f-display);
  font-size: clamp(56px, 10vw, 140px);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 40px;
}
.footer h3 em { font-style: italic; color: var(--accent); font-weight: 400; }

/* ────── form ────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border 0.2s var(--ease);
  outline: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--ink); }
.field textarea { min-height: 140px; resize: vertical; }

/* ────── tweaks panel ────── */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 300px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 14px;
  padding: 18px;
  z-index: 200;
  box-shadow: 0 24px 48px rgba(0,0,0,0.18), 0 6px 0 -3px var(--ink);
  font-size: 13px;
  display: none;
}
.tweaks.open { display: block; }
.tweaks h4 {
  margin: 0 0 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks label.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line-2);
  gap: 12px;
}
.tweaks label.row span { color: var(--muted); }
.swatches { display: flex; gap: 6px; }
.sw {
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}
.sw:hover { transform: scale(1.12); }
.sw.active { border-color: var(--ink); }

/* ────── utility ────── */
.stretch { flex: 1; }
.row { display: flex; align-items: center; gap: 16px; }
.col { display: flex; flex-direction: column; gap: 16px; }
.ink { color: var(--ink); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.grow { flex: 1; }

/* placeholder image block */
.ph {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, var(--paper-2) 0 10px, var(--paper-3) 10px 20px);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.ph::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--line);
  pointer-events: none;
}

/* ────── a11y & polish (added) ────── */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.logo-tile { transition: transform 0.2s var(--ease); }
a:hover .logo-tile { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
