/* Tangential Systems — site styles
   Hand-written, no framework. Palette derived from logo1.svg. */

:root {
  --bg:          #050f0a;
  --bg-grad:     #0a180d;
  --panel:       #0d2e1a;
  --panel-2:     #0a1f12;
  --accent:      #7ed096;
  --accent-dim:  #5ab872;
  --accent-deep: #2d8050;
  --text:        #d8e6dc;
  --muted:       #8aa595;
  --line:        rgba(126, 208, 150, 0.14);
  --line-strong: rgba(126, 208, 150, 0.30);

  --font-display: 'Orbitron', monospace;
  --font-head:    'IBM Plex Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 1120px;
  --maxw-narrow: 720px;
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dim); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 16px;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 15, 10, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding-block: 4px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark { height: 40px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1.5px;
  color: var(--accent);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--text);
}
.primary-nav a:hover { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 16px;
  color: var(--accent) !important;
}
.nav-cta:hover { background: rgba(126, 208, 150, 0.08); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--accent);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.5px;
  padding: 13px 28px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: #04140b;
  box-shadow: 0 0 0 rgba(126, 208, 150, 0);
}
.btn-primary:hover {
  color: #04140b;
  background: #93dca8;
  box-shadow: 0 6px 24px rgba(126, 208, 150, 0.22);
  transform: translateY(-1px);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 8vw, 104px); }
.section-alt {
  background:
    linear-gradient(180deg, var(--panel-2) 0%, var(--bg) 100%);
  border-block: 1px solid var(--line);
}

/* Section kicker — doubles as the section heading for most sections.
   Accent dash + brighter colour gives each section a scannable anchor. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 26px;
  height: 2px;
  background: var(--accent);
}

/* Lead statement (e.g. the opening line of "What we do"). */
.lead {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 22px;
  max-width: 30ch;
}

.section-intro { color: var(--muted); margin: 0 0 36px; }
.section p { color: var(--text); }
.narrow p { max-width: 60ch; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(96px, 18vh, 168px);
  background:
    radial-gradient(120% 90% at 70% -10%, rgba(126, 208, 150, 0.10) 0%, rgba(126, 208, 150, 0) 55%),
    linear-gradient(180deg, var(--bg-grad) 0%, var(--bg) 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 80% at 60% 0%, #000 10%, transparent 70%);
          mask-image: radial-gradient(120% 80% at 60% 0%, #000 10%, transparent 70%);
  opacity: 0.5;
}
.hero-inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
}
.hero-text { flex: 1 1 auto; max-width: 640px; }
.hero-mark {
  flex: none;
  /* Height + top offset in rem so the mark scales with the (rem-based) heading
     under browser zoom, instead of drifting against it like vw-based sizing. */
  height: 17rem;
  width: auto;
  margin-top: 2.4rem;
  margin-right: clamp(12px, 4vw, 64px);
  filter: drop-shadow(0 0 34px rgba(126, 208, 150, 0.16));
}
.hero-heading {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.1rem, 1.2rem + 4.2vw, 4rem);
  line-height: 1.1;
  letter-spacing: 0.3px;
  color: var(--text);
  margin: 0 0 22px;
  max-width: 16ch;
}
.hero-subhead {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 36px;
}

/* ---------- Portfolio ---------- */
.portfolio-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 1px;
  color: var(--accent);
  margin: 0;
}
.status {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}
.status-soon  { color: var(--accent-dim); }
.status-test  { color: var(--accent); border-color: rgba(126,208,150,0.4); }
.status-paused{ color: var(--muted); }
.card-tagline { font-weight: 500; color: var(--text); margin: 2px 0 0; }
.card-body { color: var(--muted); margin: 0; }
.placeholder { color: var(--muted); opacity: 0.75; }
.card-link {
  margin-top: auto;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
}
.card-link-disabled {
  color: var(--muted);
  font-style: italic;
  cursor: default;
}

/* Teaser cards — populated-looking but intentionally unreadable until the
   per-product copy is ready. Blurred skeleton + centred "Coming soon". */
.card-teaser {
  position: relative;
  min-height: 172px;
  justify-content: center;
  overflow: hidden;
}
.card-teaser:hover { transform: none; border-color: var(--line); }
.card-skeleton {
  display: flex;
  flex-direction: column;
  gap: 13px;
  filter: blur(6px);
  opacity: 0.55;
  user-select: none;
  pointer-events: none;
}
.sk {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg,
    rgba(126, 208, 150, 0.20), rgba(126, 208, 150, 0.05));
}
.sk-title {
  height: 20px;
  width: 42%;
  margin-bottom: 6px;
  background: rgba(126, 208, 150, 0.30);
}
.sk-title.sk-wide { width: 56%; }
.sk-line { width: 100%; }
.sk-line.sk-short { width: 68%; }
.card-coming {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.card-coming span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  padding: 8px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(5, 15, 10, 0.55);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
}

/* ---------- Contact ---------- */
.inline-link { font-weight: 500; }
.contact-form {
  display: grid;
  gap: 18px;
  max-width: 560px;
}
.field { display: grid; gap: 6px; }
.field label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(126, 208, 150, 0.15);
}
.field input.invalid,
.field textarea.invalid { border-color: #e0795f; }
.contact-form .btn { justify-self: start; }
.form-status {
  margin: 4px 0 0;
  font-weight: 500;
  min-height: 1.4em;
}
.form-status.ok { color: var(--accent); }
.form-status.err { color: #e0795f; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 36px;
  background: var(--bg);
}
.footer-inner { display: grid; gap: 6px; }
.footer-copy { color: var(--muted); opacity: 0.7; margin: 0; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (min-width: 700px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  /* Mark becomes a faint watermark behind the text instead of stacking. */
  .hero { padding-block: clamp(72px, 12vh, 110px); }
  .hero-inner { display: block; position: relative; }
  .hero-text { max-width: 100%; position: relative; z-index: 1; }
  .hero-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: clamp(300px, 62vh, 440px);
    margin: 0;
    opacity: 0.14;
    filter: none;
    z-index: 0;
    pointer-events: none;
  }
}

@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  .hero-mark { animation: hero-mark-in 900ms ease-out both; }
  @keyframes hero-mark-in {
    from { opacity: 0; }
    to   { opacity: 0.14; }
  }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-grad);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    display: none;
  }
  .primary-nav.open { display: flex; }
  .primary-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-cta { text-align: center; margin-top: 10px; border: 1px solid var(--line-strong); }
}

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