/* =========================================================
   FlowBright.io — Shared Stylesheet
   Used by: index.html, how-it-works.html, portfolio.html,
            project-details.html, contact.html
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand colors */
  --color-primary: #ff5a1f;      /* FlowBright orange */
  --color-primary-dark: #20110c; /* deep brown, gradient end */
  --color-gradient-mid: #ffb45b; /* gradient midpoint */

  /* Neutrals */
  --color-ink: #111111;          /* near-black: headings, dark surfaces */
  --color-text-muted: #6b625d;   /* body copy on light backgrounds */
  --color-cream: #fff7f2;        /* page background */
  --color-badge-bg: #f4ece7;     /* pill / badge background */
  --color-border: #e8ddd7;       /* hairline borders on light bg */
  --color-white: #ffffff;

  /* On-dark variants */
  --color-muted-on-dark: #cfc5c0;
  --color-footer-tagline: #ffb08f;
  --color-footer-copyright: #a89e99;
  --color-bubble-dark: #2a2827;
  --color-border-on-dark: rgba(255, 255, 255, 0.21);
  --color-divider-on-accent: rgba(17, 17, 17, 0.26);

  /* Effects */
  --shadow-card: 0px 14px 40px 0px rgba(58, 23, 13, 0.09);

  /* Radii */
  --radius-pill: 999px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --page-gutter: 72px;
  --max-content: 1440px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--color-white);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

.page {
  max-width: var(--max-content);
  margin: 0 auto;
  background: var(--color-cream);
}
.page.bg-white { background: var(--color-white); }

/* ---------- Layout helpers ---------- */
.row {
  display: flex;
  align-items: center;
}
.section {
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}
.container {
  width: 100%;
}

/* Honeypot utility: hides a form field from sighted visitors (and from
   tab order / screen readers) while keeping it in the DOM for bots to
   stumble into. Used by contact.html's spam trap. */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  left: -9999px;
  overflow: hidden;
}

/* ---------- Navigation (shared across all pages) ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  padding: 0 var(--page-gutter);
  background: var(--color-white);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__spark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}
.nav__brand-name {
  font-weight: 800;
  font-size: 24px;
  color: var(--color-ink);
}
.nav__brand-suffix {
  font-size: 12px;
  color: var(--color-text-muted);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav__link {
  font-weight: 500;
  font-size: 14px;
  color: var(--color-ink);
  white-space: nowrap;
}
.nav__link.is-active {
  font-weight: 700;
  color: var(--color-primary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}
.btn-arrow { font-size: 20px; font-weight: 400; line-height: 1; }

.btn--dark { background: var(--color-ink); color: var(--color-white); }
.btn--primary { background: var(--color-primary); color: var(--color-white); }

.btn--small {
  height: 38px;
  width: 38px;
  padding: 0;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}

/* ---------- Badge / pill label ---------- */
.badge {
  display: inline-flex;
  align-items: flex-start;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-badge-bg);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-on-dark);
  color: var(--color-white);
  font-size: 12px;
}

.pill-filter {
  display: inline-flex;
  padding: 10px 17px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-ink);
  font-size: 13px;
}
.pill-filter.is-active {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-white);
}

.phase-chip {
  display: inline-flex;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-badge-bg);
  color: var(--color-ink);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.phase-chip.is-active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ---------- Page heading pattern (badge + title + intro copy) ---------- */
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: 58px var(--page-gutter) 34px;
}
.page-heading__main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 760px;
}
.page-heading__title {
  font-weight: 800;
  font-size: 56px;
  line-height: 1.05;
  color: var(--color-ink);
  margin: 0;
}
.page-heading__intro {
  font-size: 18px;
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 430px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.card--soft {
  background: var(--color-cream);
  border-radius: var(--radius-md);
}

/* ---------- Footer (shared across all pages) ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px var(--page-gutter);
  background: var(--color-ink);
  flex-wrap: wrap;
  gap: 10px;
}
.footer__brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--color-white);
}
.footer__tagline {
  font-size: 14px;
  color: var(--color-footer-tagline);
}
.footer__copyright {
  font-size: 12px;
  color: var(--color-footer-copyright);
}

/* =========================================================
   Home page
   ========================================================= */
.hero {
  display: flex;
  gap: 64px;
  align-items: center;
  padding: 72px;
}
.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 600px;
  max-width: 100%;
}
.hero__title {
  font-weight: 800;
  font-size: 72px;
  line-height: 0.98;
  color: var(--color-ink);
  margin: 0;
}
.hero__subtitle {
  font-size: 20px;
  line-height: 1.5;
  color: var(--color-text-muted);
  max-width: 540px;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.hero__actions-link {
  font-size: 15px;
  color: var(--color-ink);
}

.hero__art {
  flex: 1;
  min-width: 0;
  height: 490px;
  border-radius: var(--radius-lg);
  background: linear-gradient(to bottom, var(--color-primary), var(--color-gradient-mid) 50%, var(--color-primary-dark));
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  --mx: 0;
  --my: 0;
}
.hero__orb {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.hero__orb--1 {
  width: 260px; height: 260px; left: 70px; top: 64px;
  transform: translate(calc(var(--mx, 0) * 22px), calc(var(--my, 0) * 16px));
}
.hero__orb--2 {
  width: 230px; height: 230px; left: 320px; top: 220px; background: rgba(32, 17, 12, 0.35);
  transform: translate(calc(var(--mx, 0) * -28px), calc(var(--my, 0) * -20px));
}
.hero__path {
  position: absolute;
  left: 60px;
  top: 275px;
  width: 400px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.5);
  transform: rotate(-18deg) translate(calc(var(--mx, 0) * 14px), calc(var(--my, 0) * 8px));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.hero__caption {
  position: absolute;
  left: 48px;
  bottom: 40px;
  width: 340px;
  font-weight: 700;
  font-size: 22px;
  color: var(--color-white);
}

.benefits {
  display: flex;
  gap: 20px;
  padding: 54px 72px;
  background: var(--color-white);
}
.benefit {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
}
.benefit__number {
  font-weight: 700;
  font-size: 13px;
  color: var(--color-primary);
}
.benefit__title {
  font-size: 24px;
  color: var(--color-ink);
}
.benefit__desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* =========================================================
   How It Works page
   ========================================================= */
.timeline {
  display: flex;
  flex-direction: column;
  padding: 28px 72px;
}
.timeline-step {
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 128px;
}
.timeline-step__track {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  width: 54px;
}
.timeline-step__connector {
  width: 2px;
  flex: 1;
  background: var(--color-border);
}
.timeline-step__connector--filled { background: var(--color-white); }
.timeline-step__marker {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-ink);
  flex-shrink: 0;
}
.timeline-step__marker.is-active { background: var(--color-primary); }
.timeline-step__index {
  font-size: 20px;
  color: var(--color-primary);
  width: 62px;
}
.timeline-step__title {
  font-size: 24px;
  color: var(--color-ink);
  width: 290px;
}
.timeline-step__desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text-muted);
  width: 520px;
  flex: 1;
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 38px 72px;
  background: var(--color-cream);
  flex-wrap: wrap;
}
.cta-banner__text {
  font-size: 28px;
  color: var(--color-ink);
}

/* =========================================================
   Portfolio page
   ========================================================= */
.filters {
  display: flex;
  gap: 10px;
  padding: 0 72px 28px;
  flex-wrap: wrap;
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 0 72px 58px;
}
.project-card {
  position: relative;
  width: calc(50% - 11px);
  min-width: 320px;
  height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  overflow: hidden;
}
.project-card__accent {
  position: absolute;
  right: 32px;
  top: 24px;
  width: 155px;
  height: 155px;
  border-radius: var(--radius-lg);
  transform: rotate(18deg);
}
.project-card__category {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-badge-bg);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
}
.project-card__summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 410px;
}
.project-card__title {
  font-size: 28px;
  line-height: 1.12;
  color: var(--color-ink);
}
.project-card__label {
  font-size: 14px;
  color: var(--color-text-muted);
}
.project-card__stat {
  font-size: 14px;
  color: var(--color-primary);
}

/* =========================================================
   Project Details page
   ========================================================= */
.project-hero {
  display: flex;
  gap: 54px;
  padding: 58px 72px;
  background: var(--color-ink);
}
.project-hero__story {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 690px;
  max-width: 100%;
}
.project-hero__title {
  font-weight: 800;
  font-size: 56px;
  line-height: 1.03;
  color: var(--color-white);
  margin: 0;
}
.project-hero__desc {
  font-size: 19px;
  line-height: 1.5;
  color: var(--color-muted-on-dark);
  max-width: 590px;
}
.project-hero__tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.outcome-panel {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  color: var(--color-ink);
}
.outcome-panel__label {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}
.outcome-panel__stat {
  font-size: 64px;
  color: var(--color-white);
}
.outcome-panel__caption {
  font-size: 18px;
}
.outcome-panel__rule {
  height: 1px;
  width: 100%;
  background: var(--color-divider-on-accent);
}
.outcome-panel__quote {
  font-size: 15px;
  line-height: 1.5;
}

.case-study {
  display: flex;
  gap: 66px;
  padding: 54px 72px;
  flex-wrap: wrap;
}
.narrative {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 740px;
  max-width: 100%;
}
.story-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.story-section__title {
  font-size: 24px;
  color: var(--color-ink);
}
.story-section__body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.outcome-list {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.outcome-list__heading {
  font-size: 20px;
  color: var(--color-ink);
}
.outcome-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--color-cream);
}
.outcome-row__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}
.outcome-row__figure {
  font-weight: 800;
  font-size: 20px;
  color: var(--color-ink);
  width: 74px;
}
.outcome-row__label {
  flex: 1;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* =========================================================
   Contact page
   ========================================================= */
.contact-heading {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 54px 72px 34px;
}
.contact-heading__title {
  font-weight: 800;
  font-size: 56px;
  color: var(--color-ink);
  margin: 0;
}
.contact-heading__intro {
  font-size: 19px;
  line-height: 1.5;
  color: var(--color-text-muted);
  max-width: 690px;
}

.contact-options {
  display: flex;
  gap: 28px;
  padding: 0 72px 56px;
  flex-wrap: wrap;
}
.direct-contact {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 560px;
  max-width: 100%;
}

.chat-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--color-ink);
  box-shadow: var(--shadow-card);
}
.chat-box__header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-box__status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3ddc84;
  flex-shrink: 0;
}
.chat-box__header-text {
  font-size: 13px;
  color: var(--color-white);
}
.chat-box__message {
  padding: 18px;
  border-radius: 14px 14px 14px 4px;
  background: var(--color-bubble-dark);
  color: var(--color-white);
  font-size: 16px;
  line-height: 1.5;
  max-width: 420px;
}
/* Stacks multiple .chat-box__message bubbles as the conversation grows
   (originally there was only ever the one static greeting). */
.chat-box__log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
}
/* Visitor's own messages: right-aligned, brand color, mirrored bubble
   tail (bottom-right square corner instead of bottom-left). */
.chat-box__message--outgoing {
  align-self: flex-end;
  background: var(--color-primary);
  border-radius: 14px 14px 4px 14px;
}
.chat-box__reply-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--color-white);
}
.chat-box__reply-placeholder {
  font-size: 14px;
  color: var(--color-text-muted);
}
/* Replaces the old placeholder <span> with a real input, styled to sit
   inside .chat-box__reply-field the same way the placeholder text did. */
.chat-box__reply-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-ink);
}
.chat-box__reply-input::placeholder {
  color: var(--color-text-muted);
}
.chat-box__reply-field button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.chat-box__footnote {
  font-size: 11px;
  color: var(--color-footer-copyright);
}

.phone-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--color-white);
}
.phone-option__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--color-ink);
}
.phone-option__label {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--color-primary);
}
.phone-option__value {
  font-size: 18px;
  color: var(--color-ink);
}

.contact-form {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}
.contact-form__title {
  font-size: 26px;
  color: var(--color-ink);
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-field__label {
  font-size: 12px;
  color: var(--color-ink);
}
.form-field__input,
.form-field__textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-cream);
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 0 15px;
}
.form-field__input { height: 48px; }
.form-field__textarea {
  height: 96px;
  padding-top: 15px;
  resize: vertical;
}
/* Inline feedback under the submit button ("Sending…", success, or error). */
.contact-form__status {
  font-size: 13px;
  color: var(--color-text-muted);
}
.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Entrance animation ----------
   Recreates the Figma prototype's staggered fade-up reveal.
   Figma exports this as an infinite 2s loop (for its own preview),
   but on a real page that would make content flicker forever, so
   here it plays once on load using the same easing/offsets/stagger. */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(var(--reveal-y, 18px)); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: reveal-up 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--reveal-delay, 0s);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .hero__orb--1, .hero__orb--2, .hero__path { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  :root { --page-gutter: 32px; }
  .nav__links { gap: 16px; flex-wrap: wrap; }
  .hero, .page-heading, .project-hero, .case-study, .contact-options, .benefits {
    flex-direction: column;
  }
  .hero__title, .page-heading__title, .project-hero__title, .contact-heading__title {
    font-size: 40px;
  }
  .project-card { width: 100%; }
  .footer { flex-direction: column; text-align: center; }
}