/* =========================================================
   Phoenix Solutions — Stylesheet
   Design concept: the forge / workshop — raw skill shaped
   into finished work. Dark ground, ember + brass accents.
   ========================================================= */

:root {
  /* Color */
  --ink: #15110D;
  --surface: #201A14;
  --surface-2: #2A2219;
  --parchment: #EDE6D8;
  --parchment-dim: #C9C0AF;
  --ember: #E1622A;
  --ember-bright: #F17C3F;
  --brass: #C6A15B;
  --ash: #948877;
  --line: rgba(237, 230, 216, 0.12);
  --line-bright: rgba(237, 230, 216, 0.22);

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Layout */
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --radius-sm: 3px;
  --radius-lg: 6px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

body {
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--brass);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  margin-top: 14px;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
}

p { color: var(--parchment-dim); }

.section {
  padding: clamp(64px, 10vw, 128px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.section-head p {
  margin-top: 16px;
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--ember);
  color: var(--ink);
  font-weight: 600;
}
.btn-primary:hover { background: var(--ember-bright); transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid var(--line-bright);
  color: var(--parchment);
}
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(21, 17, 13, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.logo span { color: var(--ember-bright); }

.main-nav ul {
  display: flex;
  gap: 34px;
  align-items: center;
}

.main-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  transition: color 0.2s ease;
  position: relative;
}
.main-nav a:hover, .main-nav a.active { color: var(--parchment); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--ember);
}

.nav-cta { display: none; }
@media (min-width: 900px) {
  .nav-cta { display: inline-flex; }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 26px;
}
.nav-toggle span {
  height: 2px;
  background: var(--parchment);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
}

.main-nav {
  position: fixed;
  top: 76px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px var(--pad) 28px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.main-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.main-nav ul {
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

@media (min-width: 900px) {
  .main-nav {
    position: static;
    background: none;
    border: none;
    padding: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav ul { flex-direction: row; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(150px, 20vw, 220px);
  padding-bottom: clamp(90px, 12vw, 140px);
  overflow: hidden;
  border-top: none;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(225, 98, 42, 0.22) 0%, rgba(225, 98, 42, 0) 62%);
  pointer-events: none;
  z-index: 0;
}

.hero .container { position: relative; z-index: 1; }

.hero-content { max-width: 820px; }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  margin-top: 20px;
}

.hero h1 em {
  font-style: italic;
  color: var(--ember-bright);
}

.hero-sub {
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 640px;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 72px;
  display: flex;
  gap: clamp(24px, 5vw, 56px);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ash);
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.hero-meta strong {
  display: block;
  font-family: var(--font-body);
  color: var(--parchment);
  font-size: 1.1rem;
  font-weight: 600;
}

/* ---------- Problem ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 860px) {
  .problem-grid { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
}

.problem-copy p + p { margin-top: 18px; }
.problem-copy .pull {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--parchment);
  margin-top: 26px;
  line-height: 1.4;
}

.stack-list {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stack-list li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.stack-list li:last-child { border-bottom: none; }
.stack-list .tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ember-bright);
  flex-shrink: 0;
  width: 64px;
}
.stack-list .txt strong { display: block; color: var(--parchment); font-weight: 600; margin-bottom: 2px;}
.stack-list .txt span { color: var(--ash); font-size: 0.92rem; }

/* ---------- How We Work — Sprint Loop ---------- */
.loop-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}
@media (min-width: 940px) {
  .loop-wrap { grid-template-columns: 0.95fr 1.05fr; }
}

.loop-diagram { position: relative; }

.loop-diagram svg { width: 100%; height: auto; }

.loop-node-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--parchment);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.loop-node-desc {
  font-family: var(--font-body);
  font-size: 10.5px;
  fill: var(--ash);
}

.loop-copy .step {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.loop-copy .step:first-child { padding-top: 0; }
.loop-copy .step-index {
  font-family: var(--font-mono);
  color: var(--brass);
  font-size: 0.8rem;
  flex-shrink: 0;
  width: 28px;
}
.loop-copy .step h4 { font-family: var(--font-body); font-size: 1.02rem; font-weight: 700; color: var(--parchment); }
.loop-copy .step p { margin-top: 4px; font-size: 0.95rem; }

.loop-note {
  margin-top: 26px;
  font-size: 0.92rem;
  color: var(--brass);
  font-style: italic;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 700px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: var(--surface);
  padding: 30px 28px;
  transition: background 0.25s ease;
}
.service-card:hover { background: var(--surface-2); }

.service-card .tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ember-bright);
  text-transform: uppercase;
}

.service-card h3 { margin-top: 12px; }
.service-card p { margin-top: 10px; font-size: 0.94rem; }

.chip-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ash);
  border: 1px solid var(--line-bright);
  padding: 5px 10px;
  border-radius: 999px;
}

/* ---------- Work / Case studies ---------- */
.work-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }

.work-case {
  background: var(--surface);
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 780px) {
  .work-case { grid-template-columns: 260px 1fr; gap: 40px; }
}

.work-case .meta { }
.work-case .meta .tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.work-case .meta h3 { margin-top: 10px; font-size: 1.25rem; }
.work-case .meta .stack {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ash);
  line-height: 1.8;
}

.work-body dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 500px) {
  .work-body dl { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
.work-body dt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ember-bright);
  margin-bottom: 6px;
}
.work-body dd { font-size: 0.92rem; color: var(--parchment-dim); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 860px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
}

.about-copy p + p { margin-top: 16px; }

blockquote.spark {
  margin-top: 30px;
  padding: 22px 26px;
  border-left: 2px solid var(--ember);
  background: var(--surface);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
blockquote.spark p {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--parchment);
  font-size: 1.1rem;
}
blockquote.spark cite {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.72rem;
  color: var(--ash);
}

.founder-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--surface);
}
.founder-card .name { font-family: var(--font-display); font-size: 1.4rem; }
.founder-card .role { font-family: var(--font-mono); font-size: 0.75rem; color: var(--brass); margin-top: 4px; }
.founder-card .divider { height: 1px; background: var(--line); margin: 20px 0; }
.founder-card ul li {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 6px 0;
  color: var(--ash);
}
.founder-card ul li span:last-child { color: var(--parchment-dim); font-family: var(--font-mono); font-size: 0.8rem; }

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 900px) {
  .contact-wrap { grid-template-columns: 0.9fr 1.1fr; }
}

.contact-info .lead { font-size: 1.1rem; color: var(--parchment); margin-top: 10px; }
.contact-links { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.contact-links a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ember-bright);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.contact-links a:hover { border-color: var(--ember-bright); }

.contact-user {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--ember-bright);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

form.brief {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 36px);
  background: var(--surface);
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  border-color: var(--ember);
}
.form-note {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--ash);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.site-footer .foot-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ash);
}
.site-footer .foot-links { display: flex; gap: 22px; }
.site-footer .foot-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--parchment-dim);
}
.site-footer .foot-links a:hover { color: var(--ember-bright); }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}