/* ================================================================
   Flows Process — style.css
   flowsprocess.com
   ================================================================ */

/* ── Tokens ── */
:root {
  --bg:          #faf9f5;
  --ink:         #121212;
  --ink-2:       #3a3a3a;
  --ink-muted:   #6c6a64;
  --ink-faint:   #9a978f;
  --rule:        #dedad0;
  --rule-dark:   #c8c4b8;
  --accent:      #3A6B5C;
  --accent-dark: #2C5347;
  --accent-tint: #edf3f0;
  --white:       #ffffff;

  --ff-serif:  'Instrument Serif', Georgia, serif;
  --ff-sans:   'Inter', system-ui, sans-serif;
  --ff-mono:   'JetBrains Mono', 'Courier New', monospace;

  --max-w: 1320px;
  --gutter: 32px;
  --radius: 3px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}
ol, ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 245, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}

.progress-bar {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  transition: width 0.05s linear;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}

.wordmark {
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.header-tagline {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.header-contact {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.header-contact:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  min-height: calc(100vh - 56px);
  padding: 48px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Eyebrow */
.eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 20px;
}

/* Headline */
.hero-headline {
  font-family: var(--ff-serif);
  font-size: clamp(64px, 12vw, 164px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 40px;
}
.hero-headline .italic { font-style: italic; }
.hero-headline .accent { color: var(--accent); }
.hero-headline .hw { display: inline; }

/* Body row */
.hero-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 0;
  padding-top: 4px;
  border-top: 1px solid var(--rule);
}

.hero-desc p {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.72;
  max-width: 480px;
  padding-top: 24px;
  padding-bottom: 40px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding-top: 20px;
}

.hero-email-link {
  font-family: var(--ff-serif);
  font-size: clamp(22px, 2.6vw, 36px);
  font-style: italic;
  color: var(--accent);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--rule-dark);
  padding-bottom: 4px;
  display: inline-block;
  transition: border-color 0.18s, color 0.18s;
  line-height: 1.2;
}
.hero-email-link:hover { color: var(--accent-dark); border-color: var(--accent); }

.hero-cta-note {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  margin-top: auto;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
}

.stat {
  padding: 28px 0;
  border-right: 1px solid var(--rule);
  padding-right: 24px;
}
.stat:last-child { border-right: none; }
.stat:not(:first-child) { padding-left: 24px; }

.stat-num {
  display: block;
  font-family: var(--ff-serif);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.stat-plus {
  font-size: 0.65em;
  vertical-align: super;
  color: var(--accent);
}
.stat-label {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ================================================================
   SHARED — section label, reveal
   ================================================================ */
.section-label {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 36px;
}

/* Scroll reveal */
.js-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero word-by-word reveal */
.hero-reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-fade 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.hero-reveal[data-delay="0"] { animation-delay: 0.05s; }
.hero-reveal[data-delay="1"] .hw,
.hero-reveal[data-delay="1"] { animation-delay: calc(0.15s + var(--i, 0) * 0.07s); }
.hero-reveal[data-delay="6"] { animation-delay: 0.6s; }
.hero-reveal[data-delay="7"] { animation-delay: 0.72s; }
.hero-reveal[data-delay="8"] { animation-delay: 0.84s; }

/* Each word-span inside h1 animates individually */
.hero-headline .hw {
  display: inline;
  opacity: 0;
  transform: translateY(16px);
  animation: hero-fade 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: calc(0.15s + var(--i, 0) * 0.07s);
}

@keyframes hero-fade {
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   HOW WE WORK
   ================================================================ */
.how-section {
  padding: 100px 0;
  border-top: 1px solid var(--rule);
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.how-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
}
.how-step:first-child { border-top: 1px solid var(--rule); }

.step-n {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  padding-top: 4px;
}

.step-body h2 {
  font-family: var(--ff-serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.step-body p {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.72;
  max-width: 560px;
}

/* ================================================================
   FOUNDER
   ================================================================ */
.founder-section {
  padding: 100px 0;
  border-top: 1px solid var(--rule);
}

.founder-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  align-items: start;
}

.founder-text {
  padding-top: 4px;
}

.founder-pull {
  font-family: var(--ff-serif);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 28px;
}

.founder-body {
  font-size: 16px;
  color: var(--ink-muted);
  line-height: 1.78;
  max-width: 520px;
}

.founder-portrait-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.founder-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
}

.founder-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%);
  transition: filter 0.4s ease;
}

.founder-portrait img:hover {
  filter: grayscale(0%);
}

.portrait-caption {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

/* ================================================================
   THE RECORD
   ================================================================ */
.record-section {
  padding: 0 0 100px;
  border-top: 1px solid var(--rule);
}

.record-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-top: 60px;
}

.record-count {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  padding-bottom: 2px;
}

/* Stone grid */
.stone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

/* Stone card */
.stone {
  background: var(--bg);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  outline: none;
}
.stone:hover {
  background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(58,106,92,0.15);
  z-index: 1;
}
.stone:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  z-index: 2;
}

.stone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.stone-id {
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.stone-tag {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
}
.stone-tag.tag-revenue {
  background: var(--accent-tint);
  color: var(--accent);
}
.stone-tag.tag-clients {
  background: #f0ede6;
  color: var(--ink-muted);
}
.stone-tag.tag-introduction {
  background: transparent;
  color: var(--ink-faint);
  border: 1px solid var(--rule);
}

.stone-rule {
  height: 1px;
  background: var(--rule);
  margin-bottom: 16px;
}

.stone-headline {
  font-family: var(--ff-serif);
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.stone-subline {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  margin-bottom: 16px;
  line-height: 1.4;
}

.stone-desc {
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}

.stone-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  margin-top: auto;
}

.stone-client {
  font-family: var(--ff-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stone-niche {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.stone-read {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Fade-in stones when grid changes */
@keyframes stone-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stone.entering {
  animation: stone-in 0.3s ease forwards;
}

/* ================================================================
   CONTACT
   ================================================================ */
.contact-section {
  border-top: 1px solid var(--rule);
  padding: 100px 0;
}

.contact-inner {
  max-width: 760px;
}

.contact-eyebrow {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.contact-email-link {
  display: block;
  font-family: var(--ff-serif);
  font-size: clamp(32px, 5vw, 72px);
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--rule-dark);
  padding-bottom: 24px;
  transition: color 0.18s;
  word-break: break-all;
}
.contact-email-link:hover { color: var(--accent); }

.contact-desc {
  font-size: 16px;
  color: var(--ink-muted);
  line-height: 1.72;
  max-width: 540px;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-brand {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.footer-domain {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--ink-2); }

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 18, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 var(--gutter) var(--gutter);
  animation: overlay-in 0.2s ease;
}
.modal-overlay[hidden] { display: none; }

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  animation: modal-up 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes modal-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.modal-close:hover { color: var(--ink); background: var(--rule); }

.modal-id {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.modal-niche-tag {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.modal-headline {
  font-family: var(--ff-serif);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.0;
  margin-bottom: 6px;
}
.modal-subline {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  margin-bottom: 24px;
}
.modal-rule {
  height: 1px;
  background: var(--rule);
  margin-bottom: 24px;
}
.modal-full {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.72;
  margin-bottom: 28px;
}
.modal-client-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.modal-client {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.modal-sep {
  color: var(--rule-dark);
  font-size: 12px;
}
.modal-niche-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ── Tablet: 1080px ── */
@media (max-width: 1080px) {
  .stone-grid { grid-template-columns: repeat(2, 1fr); }
  .founder-inner { grid-template-columns: 1fr 320px; gap: 48px; }
}

/* ── Narrow tablet: 860px ── */
@media (max-width: 860px) {
  .founder-inner { grid-template-columns: 1fr; gap: 40px; }
  .founder-portrait { aspect-ratio: 3 / 2; }
  .hero-body { grid-template-columns: 1fr; gap: 0; }
  .hero-desc p { padding-bottom: 20px; }
}

/* ── Mobile: 720px ── */
@media (max-width: 720px) {
  :root { --gutter: 20px; }

  /* Header */
  .header-tagline { display: none; }
  .header-contact { font-size: 11px; }

  /* Hero */
  .hero { padding-top: 28px; min-height: 0; }
  .hero > .container { flex: none; }
  .hero-headline {
    font-size: clamp(44px, 11vw, 72px);
    margin-bottom: 24px;
  }
  .hero-body { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; }
  .hero-desc p { font-size: 15px; padding-bottom: 20px; }
  .hero-email-link { font-size: 20px; }
  .stats-strip { margin-top: 28px; grid-template-columns: 1fr 1fr; }
  .stat { padding: 20px 0; }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }

  /* How */
  .how-section { padding-block: 60px; }
  .how-step { grid-template-columns: 44px 1fr; gap: 12px; padding: 24px 0; }
  .step-body h2 { font-size: 20px; }
  .step-body p { font-size: 14px; }

  /* Founder */
  .founder-section { padding: 60px 0; }
  .founder-portrait { aspect-ratio: 4 / 5; }
  .founder-pull { font-size: 20px; }
  .founder-body { font-size: 15px; }

  /* Record */
  .record-section { padding-bottom: 60px; }
  .record-header { padding-top: 40px; }
  .stone-grid { grid-template-columns: 1fr; }
  .stone { padding: 24px 20px 20px; }
  .stone-headline { font-size: 32px; }

  /* Modal */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-card {
    padding: 24px 20px 32px;
    max-height: 85vh;
    border-radius: 10px 10px 0 0;
    border-bottom: none;
  }

  /* Contact */
  .contact-section { padding-block: 60px; }
  .contact-email-link { font-size: clamp(24px, 7vw, 40px); padding-bottom: 16px; }
  .contact-desc { font-size: 15px; }

  /* Footer */
  .footer-left { flex-direction: column; align-items: flex-start; gap: 4px; }
  .footer-inner { align-items: flex-start; }
}

/* ── Small mobile: 400px ── */
@media (max-width: 400px) {
  .stats-strip { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--rule); }
  .stat:last-child { border-bottom: none; }
  .hero-headline { font-size: 42px; }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero-reveal,
  .hero-headline .hw {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .js-reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .stone.entering { animation: none; }
  .modal-overlay, .modal-card { animation: none; }
  html { scroll-behavior: auto; }
}
