/* ==========================================================================
   Machine Method: site styles
   Brand colours were sampled from assets/MachineMethodBackground.png.
   Change the variables below to restyle the whole site.
   ========================================================================== */

:root {
  /* Colours */
  --bg:          #050504;  /* page background, matches the logo image edges */
  --surface:     #0c1211;  /* cards */
  --line:        #1f2e2d;  /* borders and dividers */
  --teal-deep:   #2a3f3f;  /* logo's inner circle */
  --teal:        #65928b;  /* primary accent, the circuit lines */
  --teal-bright: #8fbdb5;  /* hover and focus */
  --gold:        #dfdfa1;  /* wordmark colour, used sparingly */
  --text:        #d9dfdc;
  --text-muted:  #8b9794;

  /* Type */
  --font-display: "Michroma", "Eurostile", "Segoe UI", sans-serif;
  --font-body:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 72rem;
  --container-narrow: 42rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-space: clamp(2.5rem, 10vw, 4.5rem);
  --radius: 6px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--teal-bright); text-underline-offset: 0.2em; }
a:hover { color: var(--gold); }

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

::selection { background: var(--teal-deep); color: var(--gold); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--teal);
  color: var(--bg);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 5, 4, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.75rem var(--gutter);
}

.nav__brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--teal-deep);
}

.nav__links {
  display: flex;
  gap: clamp(1.25rem, 4vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links a {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--gold); }

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

.hero {
  position: relative;
  padding-bottom: clamp(3.5rem, 8vw, 7rem);
  text-align: center;
  overflow: hidden;
}

/* Soft teal glow behind the emblem */
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(60vw, 900px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(101, 146, 139, 0.14) 0%, rgba(101, 146, 139, 0) 60%);
  pointer-events: none;
  animation: glow 7s ease-in-out infinite alternate;
}

.hero__logo {
  position: relative;
  max-width: 1920px;
  margin: 0 auto;
  font-size: 1rem; /* the h1 holds an image */
}

.hero__logo img {
  width: 100%;
  aspect-ratio: 4 / 1;
  object-fit: cover;
  object-position: center;
}

.section .hero__tagline {
  position: relative;
  margin: 3rem auto 4.5rem;
  padding-inline: var(--gutter);
  max-width: 52rem;
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.6vw, 1rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.9;
  color: var(--teal-bright);
  animation: fade-up 1.2s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* On narrow screens, crop in on the emblem so the wordmark stays readable */
@media (max-width: 800px) {
  .hero__logo img { aspect-ratio: 2 / 1; }
}
@media (max-width: 480px) {
  .hero__logo img { aspect-ratio: 1.5 / 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes glow {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding-block: var(--section-space);
  scroll-margin-top: 3rem; /* clears the sticky header when jumping to #about etc. */
}

/* Circuit-trace divider: a line with a node at its centre, echoing the logo */
.section::before,
.section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.section::before {
  width: min(70%, 36rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-deep) 20%, var(--teal) 50%, var(--teal-deep) 80%, transparent);
}
.section::after {
  top: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--teal);
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--teal);
}

.section__title {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.section p { margin: 0 0 1.1em; }
.section p:last-child { margin-bottom: 0; }

.section__head { margin-bottom: clamp(2rem, 5vw, 3rem); }

/* ---------- Curios cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

/* Corner node, like a pad on a circuit board */
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 1.5rem;
  width: 2.5rem;
  height: 2px;
  background: var(--teal);
  transition: width 0.3s ease;
}

.card:hover { border-color: var(--teal-deep); transform: translateY(-2px); }
.card:hover::before { width: 4.5rem; }

.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card__num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status.is-live     { color: var(--teal-bright); }
.status.is-building { color: var(--gold); }
.status.is-planned  { color: var(--text-muted); }

.card__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
  color: var(--text);
}

.card__text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.card__note {
  margin-top: 0rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  opacity: 0.85;
}
.card__note p { margin: 0; }

.card__subtitle {
  margin: 0 0 0.4rem !important;
  font-family: var(--font-display);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
}

.card__link {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}
a.card__link::after { content: " \2192"; }
span.card__link { color: var(--text-muted); opacity: 0.7; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--gold); }

/* ---------- Scroll reveal (only when JS is running) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

.contact-form {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}
.contact-form label {
  display: grid;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  transition: border-color 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--teal);
}
.contact-form textarea { resize: vertical; }
.contact-form button {
  justify-self: start;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--teal);
  border: 0;
  border-radius: var(--radius);
  padding: 0.75rem 1.55rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.contact-form button:hover { background: var(--teal-bright); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal { opacity: 1; transform: none; }
  .card:hover { transform: none; }
}


