/* =============================================
   BREALLE — AI Systems & Automation
   Refined Editorial Design System
   ============================================= */

/* --- Tokens --- */
:root {
  --teal:         #1f8f7a;
  --teal-dark:    #176b5c;
  --teal-muted:   rgba(31, 143, 122, 0.12);
  --teal-subtle:  rgba(31, 143, 122, 0.06);
  --ink:          #0d1117;
  --ink-mid:      #374151;
  --ink-light:    #6b7280;
  --rule:         #e5e7eb;
  --surface:      #ffffff;
  --bg:           #f5f6f4;
  --bg-dark:      #0f1a17;
  --radius-sm:    10px;
  --radius-md:    18px;
  --radius-lg:    28px;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* =============================================
   NAV
   ============================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 60px;
  height: 84px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 246, 244, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-logo {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 3px;
  line-height: 1;
  color: var(--ink);
}

.tagline {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-light);
  letter-spacing: 0.5px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mid);
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--teal); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn.primary {
  background: var(--teal);
  color: #fff;
}

.btn.primary:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(31, 143, 122, 0.28);
}

.btn.secondary {
  background: transparent;
  border: 1.5px solid var(--teal);
  color: var(--teal);
}

.btn.secondary:hover {
  background: var(--teal-subtle);
}

.btn.large {
  padding: 18px 36px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

/* =============================================
   SHARED SECTION TOKENS
   ============================================= */
.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

.section-label.light {
  color: rgba(255,255,255,0.5);
}

.section-header {
  margin-bottom: 60px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1px;
  color: var(--ink);
  margin-top: 8px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
}

h2 em, h1 em {
  font-style: italic;
  font-weight: inherit;
  color: var(--teal);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  padding: 100px 60px 120px;
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow */
.hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -120px;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 143, 122, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-left {
  flex: 1 1 600px;
  max-width: 700px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 24px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

.hero-left h1 {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -2px;
  color: var(--ink);
  margin-bottom: 28px;
}

.hero-body {
  font-size: 20px;
  line-height: 1.7;
  color: var(--ink-mid);
  max-width: 620px;
  font-weight: 300;
}

.cta-group {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-right {
  flex: 0 1 520px;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-mark-wrap {
  position: relative;
}

.hero-mark-wrap::before {
  content: '';
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal-muted) 0%, transparent 70%);
}

.hero-logo {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  position: relative;
}

/* =============================================
   WHAT WE BUILD
   ============================================= */
.build {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  position: relative;
  transition: all 0.25s ease;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.07);
  border-color: transparent;
}

.card:hover::after {
  transform: scaleX(1);
}

.card-number {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--teal);
  margin-bottom: 20px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--ink);
}

.card p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-mid);
  font-weight: 300;
}

/* =============================================
   HOW IT WORKS
   ============================================= */
.how {
  padding: 100px 0;
}

.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.flow::before {
  content: '';
  position: absolute;
  top: 30px;
  left: calc(33.333% / 2 + 24px);
  right: calc(33.333% / 2 + 24px);
  height: 1.5px;
  background: linear-gradient(to right, var(--teal), var(--teal));
  z-index: 0;
}

.flow-step {
  padding: 0 28px;
  position: relative;
}

.flow-step-head {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  position: relative;
}

.flow-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.25s;
}

.flow-step:hover .flow-icon {
  border-color: var(--teal);
  box-shadow: 0 0 0 6px var(--teal-muted);
}

.source-icon { color: var(--teal); }
.core-icon   { color: var(--teal); }
.output-icon { color: var(--teal); }

.flow-connector {
  flex: 1;
  height: 1.5px;
  background: var(--rule);
  position: relative;
  z-index: 0;
}

.flow-step--last .flow-step-head {
  /* no connector after last step */
}

.flow-step-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--teal);
  margin-bottom: 10px;
}

.flow-step h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
  line-height: 1.15;
}

.flow-step p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-mid);
  font-weight: 300;
}

/* =============================================
   WHY BREALLE
   ============================================= */
.why {
  background: var(--bg-dark);
  padding: 110px 60px;
}

.why-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.why-text {
  flex: 1 1 540px;
}

.why-text h2 {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: #ffffff;
  margin-bottom: 28px;
  margin-top: 8px;
}

.why-text h2 em {
  color: var(--teal);
}

.why-text p {
  font-size: 19px;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
  margin-bottom: 36px;
  max-width: 520px;
}

.why-stat-block {
  flex: 0 1 360px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
}

.stat {
  padding: 28px 32px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  transition: all 0.25s;
}

.stat:hover {
  background: rgba(31, 143, 122, 0.08);
  border-color: rgba(31, 143, 122, 0.3);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  font-weight: 300;
}

/* =============================================
   AUDIT CTA
   ============================================= */
.audit {
  padding: 120px 60px;
  text-align: center;
  border-top: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.audit::before {
  content: '';
  position: absolute;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 143, 122, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.audit-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.audit-label {
  margin-bottom: 0;
}

.audit h2 {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.08;
  color: var(--ink);
  margin: 8px 0 24px;
}

.audit p {
  font-size: 20px;
  line-height: 1.7;
  color: var(--ink-mid);
  font-weight: 300;
  margin-bottom: 44px;
}

/* =============================================
   HERO BRAND LOCKUP (text-based, no logo_full)
   ============================================= */
.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  width: 100%;
  padding: 56px 48px;
  background: rgba(31, 143, 122, 0.05);
  border: 1.5px solid rgba(31, 143, 122, 0.15);
  border-radius: 32px;
}

.hero-svg-mark {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 28px rgba(31, 143, 122, 0.45));
}

.hero-symbol {
  /* kept for fallback only */
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
}

.hero-brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.hero-brand-name {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 800;
  letter-spacing: 10px;
  color: var(--ink);
  line-height: 1;
}

.hero-tagline {
  font-size: 15px;
  color: var(--ink-light);
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

/* Stat block label */
.stat-block-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 12px;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--ink);
  padding: 36px 60px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.footer-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.5px;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.footer-link {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--teal);
}

.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

/* =============================================
   HOW THE SYSTEM WORKS
   ============================================= */
.system-works {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section-intro {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-mid);
  font-weight: 300;
  margin-top: 12px;
  max-width: 600px;
}

.card--problem {
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.system-works-closing {
  margin-top: 48px;
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 500;
  max-width: 680px;
  padding-left: 24px;
  border-left: 3px solid var(--teal);
}

/* =============================================
   FOUNDER / YOU'LL WORK WITH ME
   ============================================= */
.founder {
  padding: 100px 0;
  background: var(--bg);
}

.founder-inner {
  display: flex;
  align-items: center;
  gap: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
}

.founder-photo-wrap {
  flex: 0 0 240px;
}

.founder-photo {
  width: 240px;
  height: 300px;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-lg);
  display: block;
  border: 1px solid var(--rule);
}

.founder-text {
  flex: 1;
  min-width: 0;
  max-width: 560px;
}

.founder-text h2 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.8px;
  color: var(--ink);
  margin: 8px 0 20px;
}

.founder-text p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-mid);
  font-weight: 300;
  margin-bottom: 14px;
  max-width: 500px;
}

.founder-lang {
  font-size: 14px !important;
  color: var(--teal) !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px;
  margin-bottom: 8px !important;
}

.founder-sig {
  font-family: var(--font-display);
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
  margin-bottom: 28px !important;
  letter-spacing: 0.2px;
}

/* =============================================
   RESPONSIVE — 3 BREAKPOINTS
   1100px: tablet landscape / small desktop
   768px:  iPad / tablet portrait
   480px:  mobile
   ============================================= */

@media (max-width: 1100px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-right {
    width: 100%;
    max-width: 520px;
  }

  .why-inner {
    flex-direction: column;
    gap: 52px;
  }

  .why-stat-block {
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
  }

  .stat {
    flex: 1 1 160px;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 16px 24px;
    height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-left {
    flex: 1;
  }

  .nav-right {
    width: 100%;
    gap: 10px;
  }

  .nav-link { display: none; }

  .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .hero {
    padding: 48px 24px 64px;
  }

  .hero-inner {
    gap: 40px;
  }

  .hero-left h1 {
    font-size: 52px;
    letter-spacing: -1.4px;
  }

  .hero-eyebrow {
    font-size: 10px;
  }

  .hero-body {
    font-size: 17px;
  }

  .hero-right {
    max-width: 100%;
  }

  .hero-brand {
    padding: 36px 32px;
    gap: 28px;
  }

  .hero-brand-name {
    font-size: 42px;
    letter-spacing: 6px;
  }

  .hero-tagline {
    font-size: 14px;
  }

  .cta-group {
    flex-direction: column;
  }

  .section-inner {
    padding: 0 24px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h2 {
    font-size: 34px;
  }

  .build,
  .how {
    padding: 72px 0;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 24px;
  }

  .flow {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .flow::before { display: none; }

  .flow-step {
    padding: 0;
    display: grid;
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 20px;
    align-items: start;
  }

  .flow-step-head {
    grid-column: 1;
    grid-row: 1 / 4;
    flex-direction: column;
    margin-bottom: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
  }

  .flow-connector {
    width: 1.5px;
    height: 40px;
    flex: none;
    background: var(--rule);
  }

  .flow-step--last .flow-connector { display: none; }

  .flow-step-num { grid-column: 2; grid-row: 1; }
  .flow-step h3  { grid-column: 2; grid-row: 2; font-size: 20px; }
  .flow-step p   { grid-column: 2; grid-row: 3; }

  .why {
    padding: 72px 24px;
  }

  .why-text h2 {
    font-size: 36px;
  }

  .why-text p {
    font-size: 16px;
  }

  .why-stat-block {
    flex-direction: column;
    gap: 2px;
  }

  .stat-value {
    font-size: 30px;
  }

  .system-works {
    padding: 72px 0;
  }

  .system-works-closing {
    font-size: 17px;
    margin-top: 36px;
  }

  .founder {
    padding: 72px 0;
  }

  .founder-inner {
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
    padding: 0 24px;
  }

  .founder-photo-wrap {
    flex: none;
    width: 100%;
  }

  .founder-photo {
    width: 160px;
    height: 200px;
    border-radius: var(--radius-md);
  }

  .founder-text h2 {
    font-size: 32px;
  }

  .founder-text p {
    font-size: 16px;
  }

  .audit {
    padding: 72px 24px;
  }

  .audit h2 {
    font-size: 34px;
  }

  .audit p {
    font-size: 17px;
  }

  .footer {
    padding: 28px 24px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-right {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .nav-logo {
    height: 36px;
  }

  .brand-name {
    font-size: 20px;
  }

  .hero {
    padding: 36px 20px 52px;
  }

  .hero-left h1 {
    font-size: 40px;
    letter-spacing: -1px;
  }

  .hero-brand {
    padding: 28px 24px;
    gap: 20px;
  }

  .hero-brand-name {
    font-size: 32px;
    letter-spacing: 4px;
  }

  .section-inner {
    padding: 0 20px;
  }

  .build,
  .how {
    padding: 56px 0;
  }

  .why {
    padding: 56px 20px;
  }

  .why-text h2 {
    font-size: 30px;
  }

  .system-works {
    padding: 56px 0;
  }

  .founder {
    padding: 56px 0;
  }

  .founder-photo {
    width: 140px;
    height: 140px;
  }

  .founder-text h2 {
    font-size: 26px;
  }

  .audit {
    padding: 56px 20px;
  }

  .audit h2 {
    font-size: 28px;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .stat-value {
    font-size: 26px;
  }

  .footer {
    padding: 24px 20px;
  }
}

