/* ═══════════════════════════════════════════════════════
   SILVERFYRE — Global Stylesheet
   Design: Mineral Modernism — Institutional Precision
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sf-bg:      #F4F3F1;
  --sf-bg-alt:  #ECEAE7;
  --sf-white:   #FFFFFF;
  --sf-slate:   #1A1C22;
  --sf-mid:     #5C5F68;
  --sf-muted:   #9A9FA8;
  --sf-border:  #D8D6D2;
  --sf-silver:  #9A9CA4;
  --sf-silver-dark: #7A7C84;
  --font-sans:  'DM Sans', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--sf-bg);
  color: var(--sf-slate);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Typography ── */
.sf-h1 {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(1.875rem, 4vw, 3rem);
  line-height: 1.2;
  color: var(--sf-slate);
  letter-spacing: -0.01em;
}

.sf-h2 {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.35;
  color: var(--sf-slate);
  letter-spacing: -0.01em;
}

.sf-label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sf-muted);
  display: block;
}

.sf-body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 2.2;
  color: var(--sf-mid);
  letter-spacing: 0.01em;
}

/* ── Buttons ── */
.sf-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FFFFFF;
  text-decoration: none;
  background-color: var(--sf-silver);
  border: 1px solid var(--sf-silver-dark);
  padding: 1rem 2rem;
  min-height: 48px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.sf-btn:hover {
  background-color: var(--sf-silver-dark);
  border-color: #6A6C74;
}

.sf-btn-outline {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sf-slate);
  text-decoration: none;
  border: 1px solid var(--sf-border);
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  background-color: transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}
.sf-btn-outline:hover {
  border-color: var(--sf-silver-dark);
  background-color: rgba(160,160,166,0.06);
}

/* ── Sections ── */
.sf-section { padding: 7rem 0; background-color: var(--sf-bg); border: none; }
.sf-section-alt { padding: 7rem 0; background-color: var(--sf-bg-alt); border: none; }
.sf-page-header { padding: 8rem 0 5rem; border-bottom: 1px solid var(--sf-border); }

/* ── Two-column label grid ── */
.sf-label-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 3rem;
  align-items: start;
}
@media (max-width: 767px) {
  .sf-label-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem 0;
  }
}

/* ── Fade-up animation ── */
.sf-fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.sf-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Divider ── */
.sf-divider { border: none; border-top: 1px solid var(--sf-border); margin: 0; }

/* ═══════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════ */

.sf-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 90px;
  background-color: rgba(244,243,241,0.0);
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.sf-header.scrolled {
  background-color: rgba(244,243,241,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--sf-border);
}

.sf-header-inner {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.sf-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; align-self: center; }
.sf-logo img { height: 100px; width: auto; vertical-align: middle; }

.sf-nav { display: flex; align-items: center; gap: 2rem; }

.sf-nav-link {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sf-mid);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.sf-nav-link:hover,
.sf-nav-link.active {
  color: var(--sf-slate);
  border-bottom-color: var(--sf-slate);
}

/* Mobile hamburger */
.sf-hamburger {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.sf-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background-color: var(--sf-slate);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sf-mobile-menu {
  display: none;
  position: absolute;
  top: 90px; left: 0; right: 0;
  background-color: rgba(244,243,241,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0 1.5rem 2rem;
  border-bottom: 1px solid var(--sf-border);
}
.sf-mobile-menu.open { display: block; }
.sf-mobile-menu a {
  display: flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sf-slate);
  text-decoration: none;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--sf-border);
  min-height: 44px;
}

@media (max-width: 767px) {
  .sf-nav { display: none; }
  .sf-hamburger { display: flex; }
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */

.sf-footer {
  border-top: 1px solid var(--sf-border);
  padding: 4rem 0 2.5rem;
  background-color: var(--sf-bg);
  margin-top: auto;
}

.sf-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.sf-footer-logo img { height: 96px !important; width: auto !important; display: block !important; min-height: 96px !important; }

.sf-footer-right {
  display: flex;
  align-items: center;
  gap: 0;
}

.sf-footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.sf-footer-nav a {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sf-mid);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.sf-footer-nav a:hover { color: var(--sf-slate); }

.sf-footer-linkedin {
  color: var(--sf-mid);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  margin-left: 1.5rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--sf-border);
}
.sf-footer-linkedin:hover { color: var(--sf-slate); }
.sf-footer-linkedin svg { width: 15px; height: 15px; }

.sf-footer-copyright {
  border-top: 1px solid var(--sf-border);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
}
.sf-footer-copyright p {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--sf-muted);
  letter-spacing: 0.06em;
}

/* ── Main content offset for fixed header ── */
.sf-main { flex: 1; padding-top: 90px; }

/* ═══════════════════════════════════════════════════════
   HOME PAGE — Specific Styles
   ═══════════════════════════════════════════════════════ */

.sf-hero-section {
  padding: 10rem 0 8rem;
  background: linear-gradient(180deg, rgba(165,175,195,0.2) 0%, rgba(190,195,205,0.1) 40%, rgba(244,243,241,0) 100%);
}

.sf-home-section {
  padding: 8rem 0;
}

.sf-home-section-alt {
  padding: 8rem 0;
  background-color: var(--sf-bg-alt);
}

/* Mobile structural animation wrappers — hidden on desktop */
.sf-mobile-structure-wrap { display: none; }

/* Structural visual container */
.sf-structural-canvas {
  position: fixed;
  top: 0; right: 0;
  width: 50%;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (max-width: 1023px) {
  .sf-structural-canvas { display: none; }
}

/* Method page — structural visual that scrolls with page */
.sf-method-structural-canvas {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}
@media (max-width: 1023px) {
  .sf-method-structural-canvas { display: none; }
}

/* Method page — image + text side by side */
.sf-image-text-row {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}
.sf-image-text-row .sf-image-col {
  flex-shrink: 0;
  width: 380px;
  height: 480px;
  overflow: hidden;
  border-radius: 2px;
}
.sf-image-text-row .sf-image-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.75) brightness(1.02);
}
.sf-image-text-row .sf-text-col {
  flex: 1;
  max-width: 560px;
  padding-top: 1rem;
}
@media (max-width: 900px) {
  .sf-image-text-row {
    flex-direction: column;
    gap: 2rem;
  }
  .sf-image-text-row .sf-image-col {
    width: 100%;
    max-width: 400px;
    height: 300px;
  }
}
.sf-method-image-header {
  position: relative;
  padding: 12rem 0 6rem;
  overflow: hidden;
}
.sf-method-image-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.6) brightness(1.1);
  z-index: 0;
}
.sf-method-image-header::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(244,243,241,0.3) 0%, rgba(244,243,241,0.7) 60%, rgba(244,243,241,1) 100%);
  z-index: 1;
}
.sf-method-image-header > * {
  position: relative;
  z-index: 2;
}

/* Ambient color sections — VISIBLE gradients */
.sf-section-warm {
  padding: 7rem 0;
  background: linear-gradient(160deg, rgba(175,185,200,0.2) 0%, #E8E5E0 40%, rgba(200,195,185,0.15) 100%);
}
/* Warm section with subtle grain texture */
.sf-section-warm-textured {
  padding: 7rem 0;
  background: linear-gradient(160deg, rgba(175,185,200,0.2) 0%, #E8E5E0 40%, rgba(200,195,185,0.15) 100%);
  position: relative;
}
.sf-section-warm-textured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 0;
}
.sf-section-warm-textured > * {
  position: relative;
  z-index: 1;
}
.sf-section-mineral {
  padding: 7rem 0;
  background: linear-gradient(180deg, rgba(175,185,200,0.15) 0%, #F0EFED 50%, rgba(195,190,180,0.12) 100%);
}

/* Atmospheric break panels — seamless color between text sections */
.sf-atmosphere {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg,
    rgba(160,175,195,0.25) 0%,
    rgba(190,195,205,0.18) 30%,
    rgba(210,205,195,0.22) 60%,
    rgba(180,185,195,0.15) 100%
  );
  position: relative;
  overflow: hidden;
  border: none;
  outline: none;
}
.sf-atmosphere::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(170,180,200,0.15) 0%, transparent 70%),
              radial-gradient(ellipse at 70% 40%, rgba(195,190,180,0.12) 0%, transparent 60%);
}
.sf-atmosphere-tall {
  height: 280px;
}

/* Full-width image break — for architectural photos */
.sf-image-break {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  border: none;
}
.sf-image-break img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(0.75) brightness(1.02);
}

/* Large pull-quote text */
.sf-pullquote {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.5;
  color: var(--sf-slate);
  letter-spacing: -0.01em;
  max-width: 800px;
  padding: 5rem 0;
}

/* Numbered section header — large format */
.sf-numbered-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.sf-number {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--sf-silver);
}
.sf-numbered-title {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  line-height: 1.3;
  color: var(--sf-slate);
  letter-spacing: -0.01em;
}

/* Two-column text layout */
.sf-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 767px) {
  .sf-two-col { grid-template-columns: 1fr; gap: 2rem; }
}

/* Offset image — not full bleed */
.sf-offset-image {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
  line-height: 0;
}
.sf-offset-image img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.75) brightness(1.02);
}

/* Card-style cycle steps */
.sf-cycle-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.sf-cycle-card {
  padding: 2rem;
  background-color: rgba(255,255,255,0.6);
  border: 1px solid var(--sf-border);
}
.sf-cycle-card .sf-number { margin-bottom: 0.75rem; display: block; }
.sf-cycle-card strong {
  font-weight: 500;
  color: var(--sf-slate);
  font-size: 0.9375rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* Wide text — for editorial emphasis */
.sf-wide-text {
  max-width: 800px;
}
.sf-narrow-text {
  max-width: 480px;
}

/* Text right layout */
.sf-text-right {
  display: flex;
  justify-content: flex-end;
}
.sf-text-right > div {
  max-width: 640px;
}

/* Founder page — label above content, not in side grid */
.sf-label-above {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ═══════════════════════════════════════════════════════
   FOUNDER PAGE — Photo layout
   ═══════════════════════════════════════════════════════ */

.sf-founder-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.sf-founder-text { flex: 1; min-width: 280px; }

.sf-founder-photo-wrap { flex-shrink: 0; }

.sf-founder-photo {
  width: 320px;
  max-width: 100%;
  border-radius: 2px;
}

@media (max-width: 767px) {
  .sf-founder-layout {
    flex-direction: column-reverse;
  }
  .sf-founder-photo { width: 100%; max-width: 240px; }
}

/* ═══════════════════════════════════════════════════════
   CONTACT PAGE — Form placeholder
   ═══════════════════════════════════════════════════════ */

.sf-form-placeholder {
  background-color: var(--sf-bg-alt);
  border: 1px dashed var(--sf-border);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 640px;
}
.sf-form-placeholder p {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--sf-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sf-form-placeholder .sf-form-note {
  font-size: 0.8125rem;
  text-transform: none;
  letter-spacing: normal;
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════
   MOBILE-SPECIFIC OVERRIDES
   Only affects screens below 768px — desktop untouched
   ═══════════════════════════════════════════════════════ */

@media (max-width: 767px) {

  /* ── Fix header bg image bleeding into nav ── */
  .sf-header {
    height: 70px;
    background-color: rgba(244,243,241,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--sf-border);
    transition: none;
  }
  .sf-header-inner {
    height: 70px;
  }
  .sf-logo img {
    height: 76px;
  }
  .sf-main {
    padding-top: 70px;
  }
  .sf-mobile-menu {
    top: 70px;
  }

  /* ── Section padding — tighter on mobile ── */
  .sf-section, .sf-section-alt, .sf-section-warm, .sf-section-warm-textured, .sf-section-mineral {
    padding: 4rem 0;
  }
  .sf-page-header {
    padding: 5rem 0 3rem;
  }
  .sf-hero-section {
    padding: 6rem 0 4rem;
  }

  /* ── Homepage: animated structural graphic ── */
  .sf-structure-section {
    padding-top: 4rem;
  }
  .sf-mobile-structure-wrap {
    display: block;
    width: 100%;
    max-width: 220px;
    margin: 0 auto 2.5rem;
  }
  .sf-mobile-method-wrap {
    max-width: 180px;
    margin: 0 auto 2rem;
  }
  .sf-mobile-structure-animated {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.7;
  }

  /* ── Footer — fix LinkedIn and wrapping ── */
  .sf-footer {
    padding: 3rem 0 2rem;
  }
  .sf-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .sf-footer-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-left: 20px;
  }
  .sf-footer-logo img {
    height: 80px !important;
    min-height: 80px !important;
  }
  .sf-footer-nav {
    flex-wrap: wrap;
    gap: 0.875rem 1.25rem;
    align-items: center;
  }
  .sf-footer-nav a {
    font-size: 0.5rem;
  }
  .sf-footer-linkedin {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    min-height: 36px;
  }
  .sf-footer-linkedin svg {
    width: 13px;
    height: 13px;
  }

  /* ── Method page image header — prevent nav overlap ── */
  .sf-method-image-header,
  [style*="min-height: 500px"] {
    margin-top: 0;
  }

  /* ── Pull quote sizing ── */
  .sf-pullquote {
    font-size: 1.25rem;
    padding: 3rem 0;
  }

  /* ── Cycle cards — stack on mobile ── */
  .sf-cycle-cards {
    grid-template-columns: 1fr;
  }

  /* ── Engage page — add visual break ── */
  .sf-section-warm-textured::before {
    opacity: 0.05;
  }

  /* ── Body text — slightly smaller line-height on mobile ── */
  .sf-body {
    font-size: 1rem;
    line-height: 2.0;
  }

  /* ── H1 sizing for mobile ── */
  .sf-h1 {
    font-size: 1.75rem;
  }

  /* ── Buttons — full width on mobile ── */
  .sf-btn {
    width: 100%;
    justify-content: center;
    max-width: 320px;
  }
}

/* ── Hide mobile-only elements on desktop ── */
@media (min-width: 768px) {
  .sf-mobile-structure {
    display: none;
  }
  .sf-mobile-only {
    display: none;
  }
}

/* ── Show mobile-only elements only on mobile ── */
@media (max-width: 767px) {
  .sf-desktop-only {
    display: none;
  }
}
