/* ==========================================================================
   TwoSoloDevelopers — marketing site
   Design tokens, layout and components. See README design handoff for the
   exact spec these values are recreated from.
   ========================================================================== */

:root {
  --ink: #09090d;
  --surface: #101017;
  --paper: #ecebe4;
  --muted: #8c8ca0;
  --faint: #55556a; /* decorative only — fails AA on --ink, never used for text */
  --line: rgba(236, 235, 228, 0.10);

  --sky: #5cc8ff;
  --amber: #ffad66;
  --violet: #b39bff;

  --gradient: linear-gradient(135deg, var(--sky), var(--violet) 55%, var(--amber));

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------------------------------- Reset -------------------------------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

h1, h2, h3, p, dl, dd, ul, figure { margin: 0; }

a {
  color: var(--sky);
  text-decoration-color: rgba(92, 200, 255, 0.35);
  text-underline-offset: 3px;
}
a:hover { color: var(--violet); text-decoration-color: rgba(179, 155, 255, 0.6); }

::selection { background: rgba(179, 155, 255, 0.3); color: var(--paper); }

input, select, textarea, button { font: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) { border-color: rgba(255, 173, 102, 0.6); }
select option { background: var(--surface); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ------------------------------- Animations ------------------------------ */

@keyframes tsdRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes tsdDriftA {
  0%, 100% { transform: translate3d(-4%, -2%, 0) scale(1); }
  50% { transform: translate3d(6%, 4%, 0) scale(1.12); }
}
@keyframes tsdDriftB {
  0%, 100% { transform: translate3d(4%, 3%, 0) scale(1.08); }
  50% { transform: translate3d(-6%, -4%, 0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
  .reveal-section { opacity: 1 !important; transform: none !important; }
}

/* ------------------------------- Background ------------------------------ */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
}
.bg-blob--sky {
  top: -24vh; left: -16vw;
  width: 74vw; height: 74vw;
  max-width: 880px; max-height: 880px;
  background: radial-gradient(circle at 50% 50%, rgba(92, 200, 255, 0.30), rgba(92, 200, 255, 0.09) 45%, rgba(92, 200, 255, 0) 70%);
  filter: blur(46px);
  animation: tsdDriftA 26s ease-in-out infinite;
}
.bg-blob--amber {
  bottom: -28vh; right: -18vw;
  width: 78vw; height: 78vw;
  max-width: 900px; max-height: 900px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 173, 102, 0.24), rgba(255, 173, 102, 0.07) 45%, rgba(255, 173, 102, 0) 70%);
  filter: blur(52px);
  animation: tsdDriftB 32s ease-in-out infinite;
}
.bg-blob--violet {
  top: 32%; left: 28%;
  width: 44vw; height: 44vw;
  max-width: 600px; max-height: 600px;
  background: radial-gradient(circle at 50% 50%, rgba(179, 155, 255, 0.18), rgba(179, 155, 255, 0) 68%);
  filter: blur(56px);
  animation: tsdDriftA 38s ease-in-out infinite reverse;
}

/* -------------------------------- Skip link ------------------------------- */

.skip-link {
  position: absolute;
  left: 20px;
  top: -64px;
  z-index: 20;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus-visible { top: 20px; }

/* --------------------------------- Header --------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(9, 9, 13, 0.7);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px clamp(20px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}
.logo { height: 32px; width: auto; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav-link {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-link:hover { color: var(--paper); background: rgba(236, 235, 228, 0.06); }
.nav-link--outline {
  padding: 10px 14px;
  border: 1px solid var(--line);
  color: var(--paper);
  transition: border-color 0.18s ease;
}
.nav-link--outline:hover { border-color: rgba(179, 155, 255, 0.55); color: var(--paper); }

/* ---------------------------------- Main ----------------------------------- */

main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

/* ---------------------------------- Buttons --------------------------------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 12px;
  background-image: var(--gradient);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); color: var(--ink); }
.btn-primary:active { filter: brightness(0.94); transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(16, 16, 23, 0.8);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.18s ease;
}
.btn-secondary:hover { border-color: rgba(179, 155, 255, 0.55); color: var(--paper); }

/* ----------------------------------- Hero ----------------------------------- */

.hero {
  padding: clamp(72px, 14vw, 168px) 0 clamp(72px, 11vw, 136px);
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: tsdRise 0.7s var(--ease) 0.05s both;
}
.eyebrow-bar {
  width: 32px; height: 2px;
  border-radius: 2px;
  background-image: linear-gradient(90deg, var(--sky), var(--amber));
}
.eyebrow-text {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  font-size: clamp(44px, 9.4vw, 108px);
  max-width: 16ch;
  animation: tsdRise 0.8s var(--ease) 0.14s both;
}
.hero-title span { display: block; }
.hero-title .line-1 { color: var(--paper); }
.hero-title .line-2 {
  background-image: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede {
  max-width: 56ch;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
  animation: tsdRise 0.8s var(--ease) 0.24s both;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  animation: tsdRise 0.8s var(--ease) 0.34s both;
}

/* ------------------------------- Section shared ------------------------------ */

.section {
  border-top: 1px solid var(--line);
  padding: clamp(64px, 10vw, 128px) 0;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 64px);
}
.section--contact { padding-bottom: clamp(56px, 8vw, 96px); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.section-head--wide { max-width: 64ch; }
.section-head--apps { max-width: 60ch; }
.section-head--contact { max-width: 56ch; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
  font-size: clamp(30px, 5.4vw, 52px);
  color: var(--paper);
  text-wrap: balance;
}
.section-head--contact h2 {
  line-height: 1.04;
  font-size: clamp(32px, 6.4vw, 62px);
}
.section-head .lede {
  font-size: clamp(16px, 2.1vw, 18px);
  line-height: 1.75;
  color: var(--muted);
  text-wrap: pretty;
}

/* reveal-on-scroll (sections 01–03) */
.reveal-section {
  opacity: 0;
  transform: translateY(18px);
}
@supports (animation-timeline: view()) {
  .reveal-section {
    animation: tsdRise 0.9s ease-out both;
    animation-timeline: view();
    animation-range: entry 8% cover 24%;
  }
}
.reveal-section.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* ------------------------------- What we do -------------------------------- */

.duality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.duality-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 32px);
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.duality-card--sky:hover { border-color: rgba(92, 200, 255, 0.4); transform: translateY(-2px); }
.duality-card--amber:hover { border-color: rgba(255, 173, 102, 0.4); transform: translateY(-2px); }

.card-bar { width: 28px; height: 2px; border-radius: 2px; }
.duality-card--sky .card-bar { background: var(--sky); }
.duality-card--amber .card-bar { background: var(--amber); }

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.duality-card--sky .card-eyebrow { color: var(--sky); }
.duality-card--amber .card-eyebrow { color: var(--amber); }

.duality-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-size: clamp(20px, 2.6vw, 24px);
  color: var(--paper);
}
.duality-card p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}

.union-rule {
  display: flex;
  align-items: center;
  gap: 20px;
}
.union-bar {
  flex: 1 1 auto;
  height: 1px;
  background-image: var(--gradient);
}
.union-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--violet);
  white-space: nowrap;
}

/* ---------------------------------- Apps ----------------------------------- */

.apps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  justify-items: center;
  gap: 24px;
}
.app-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.app-card:hover { border-color: rgba(179, 155, 255, 0.35); transform: translateY(-2px); }

.app-media {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(236, 235, 228, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}
.app-media span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 4px;
}
.app-meta { display: flex; align-items: center; gap: 10px; }
.app-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 173, 102, 0.12);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.app-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-size: 22px;
  color: var(--paper);
}
.app-desc {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px;
}
.tag {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------- Contact ---------------------------------- */

.contact-layout {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 56px);
  align-items: flex-start;
}

.contact-form {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 3.2vw, 36px);
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  font-size: 15.5px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field select { padding: 0 14px; }
.field textarea {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  font-size: 15.5px;
  line-height: 1.65;
  resize: vertical;
  min-height: 132px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(92, 200, 255, 0.14);
  border-radius: 12px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}
.form-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-status[data-sent="true"] .status-message { display: block; }
.status-message {
  display: none;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(179, 155, 255, 0.35);
  background: rgba(179, 155, 255, 0.10);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--paper);
}

.contact-details {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 8px;
}
.contact-details-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-details-head .eyebrow { letter-spacing: 0.2em; }
.contact-email {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: clamp(19px, 3vw, 25px);
  color: var(--sky);
  text-decoration: none;
  border-bottom: 2px solid rgba(92, 200, 255, 0.35);
  padding-bottom: 4px;
  align-self: flex-start;
  overflow-wrap: anywhere;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.contact-email:hover { color: var(--violet); border-bottom-color: rgba(179, 155, 255, 0.6); }

.contact-facts {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-family: var(--font-mono);
}
.contact-facts > div { display: flex; flex-direction: column; gap: 8px; }
.contact-facts dt {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-facts dd {
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--paper);
}

/* ---------------------------------- Footer ---------------------------------- */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(9, 9, 13, 0.6);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px clamp(20px, 5vw, 48px) 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-logo { height: 26px; width: auto; display: block; }
.footer-tagline {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-copyright {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* footer legal links (the privacy pages carry their own inlined styles) */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}
.footer-nav a:hover { color: var(--paper); }
