/* ========================================
   Nufinox — style.css
   Warm editorial, expressive layout
   ======================================== */

/* ---------- Reset & Base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  color: #1c1410;
  background: #fffbf7;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

ol, ul {
  list-style: none;
}

/* ---------- Shared Utilities ---------- */

.section-alt {
  background-color: #fef3ea;
  background-image: radial-gradient(circle, rgba(214, 59, 30, 0.1) 1px, transparent 1px);
  background-size: 22px 22px;
}

.section-headline {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1c1410;
  margin-bottom: 1.5rem;
}

.section-body {
  color: #5a4e47;
  margin-bottom: 1rem;
}

.section-body:last-child {
  margin-bottom: 0;
}

/* ---------- Scroll Animations ---------- */

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons ---------- */

.btn-primary {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 0 #1d4ed8;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-primary:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1d4ed8;
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1d4ed8;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.125rem;
}

.btn-nav {
  display: inline-block;
  background: #D63B1E;
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 0 #a82d16;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-nav:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #a82d16;
}

.btn-nav:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #a82d16;
}

/* ---------- Topbar ---------- */

.topbar {
  background: #1a1a1a;
  color: #9a7a70;
  text-align: center;
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
}

.topbar a {
  color: #fff;
  text-decoration: none;
  transition: color 0.15s;
}

.topbar a:hover {
  color: #2563eb;
}

/* ---------- Navigation ---------- */

#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fffbf7;
  border-bottom: 2px solid #e8ddd5;
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  display: block;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #1c1410;
  border-radius: 2px;
  transition: opacity 0.15s;
}

.nav-links {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: #fffbf7;
  border-bottom: 2px solid #e8ddd5;
  padding: 1rem 2rem 1.5rem;
  gap: 1rem;
}

.nav-links.is-open {
  display: flex;
}

.nav-link {
  color: #5a4e47;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover {
  color: #D63B1E;
  text-decoration: none;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    border: none;
    padding: 0;
    align-items: center;
    gap: 2rem;
  }
}

/* ---------- Hero: two unequal columns ---------- */

#hero {
  background: #fffbf7;
  overflow: hidden;
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6rem 2rem 7rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-text {
  flex: 1 1 55%;
  min-width: 0;
}

.hero-badge {
  display: inline-block;
  background: #fde8e3;
  color: #D63B1E;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  margin-bottom: 1.75rem;
}

.hero-headline {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: #1c1410;
  margin-bottom: 1.5rem;
}

.hero-accent {
  text-decoration: underline;
  text-decoration-color: #D63B1E;
  text-decoration-style: wavy;
  text-underline-offset: 6px;
}

.hero-sub {
  font-size: 1.125rem;
  color: #5a4e47;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-deco {
  flex: 0 0 38%;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
}

.hero-truth {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 700;
  color: #D63B1E;
  line-height: 1.1;
  white-space: nowrap;
}

.hero-truth:nth-child(1) {
  font-size: 1.75rem;
  opacity: 0.2;
}

.hero-truth:nth-child(2) {
  font-size: 2.75rem;
  opacity: 0.15;
}

.hero-truth:nth-child(3) {
  font-size: 4rem;
  opacity: 0.1;
}

@media (min-width: 768px) {
  .hero-inner {
    padding: 8rem 2rem 9rem;
  }

  .hero-headline {
    font-size: 3.75rem;
  }

  .hero-sub {
    font-size: 1.25rem;
  }

  .hero-deco {
    display: flex;
  }

  .hero-truth:nth-child(1) { font-size: 2.25rem; }
  .hero-truth:nth-child(2) { font-size: 3.5rem; }
  .hero-truth:nth-child(3) { font-size: 5.5rem; }
}

/* ---------- Problem: large headline + right-offset body ---------- */

#problem {
  background: #fff;
}

.problem-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 7rem 2rem 8rem;
}

.problem-headline {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: #1c1410;
  margin-bottom: 2.5rem;
  max-width: 760px;
}

.problem-body {
  max-width: 480px;
}

.problem-punch {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.375rem;
  font-weight: 700;
  font-style: italic;
  color: #D63B1E;
  margin-top: 1.5rem;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .problem-headline {
    font-size: 4.5rem;
    margin-bottom: 3rem;
  }

  .problem-body {
    margin-left: auto;
  }
}

/* ---------- Features: brickwork mosaic ---------- */

.features-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6rem 2rem 7rem;
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.feature-card {
  border: 2px solid #e8ddd5;
  border-top-width: 4px;
  border-radius: 10px;
  padding: 1.75rem;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 0 12px 28px rgba(28, 20, 16, 0.1);
}

.feature-card:nth-child(1) { border-top-color: #D63B1E; }
.feature-card:nth-child(2) { border-top-color: #2563eb; }
.feature-card:nth-child(3) { border-top-color: #059669; }
.feature-card:nth-child(4) { border-top-color: #d97706; }
.feature-card:nth-child(5) { border-top-color: #7c3aed; }
.feature-card:nth-child(6) { border-top-color: #0891b2; }

.feature-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1c1410;
  margin-bottom: 0.5rem;
}

.feature-desc {
  color: #5a4e47;
  font-size: 1rem;
  line-height: 1.65;
}

@media (min-width: 768px) {
  .features-grid {
    flex-direction: row;
    flex-wrap: wrap;
  }

  /* alternating wide/narrow brickwork */
  .feature-card:nth-child(1) { flex: 1 1 58%; }
  .feature-card:nth-child(2) { flex: 1 1 36%; }
  .feature-card:nth-child(3) { flex: 1 1 36%; }
  .feature-card:nth-child(4) { flex: 1 1 58%; }
  .feature-card:nth-child(5) { flex: 1 1 45%; }
  .feature-card:nth-child(6) { flex: 1 1 45%; }
}

/* ---------- How It Works: horizontal timeline ---------- */

#how {
  background: #fff;
}

.how-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6rem 2rem 7rem;
}

.how-list {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.how-item {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
}

.how-number {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  background: #D63B1E;
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-6deg);
  box-shadow: 3px 3px 0 #a82d16;
}

.how-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: #1c1410;
  margin-bottom: 0.5rem;
}

.how-desc {
  color: #5a4e47;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .how-list {
    flex-direction: row;
    gap: 0;
    align-items: stretch;
  }

  .how-item {
    flex: 1;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0 2.5rem;
    border-left: 2px solid #e8ddd5;
  }

  .how-item:first-child {
    padding-left: 0;
    border-left: none;
  }

  .how-number {
    width: 4rem;
    height: 4rem;
    font-size: 1.75rem;
  }
}

/* ---------- Integrations: 2×2 grid ---------- */

.integrations-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6rem 2rem 7rem;
}

.integrations-list {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.integration-item {
  background: #fff;
  border: 2px solid #e8ddd5;
  border-left-width: 5px;
  border-radius: 10px;
  padding: 1.5rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.integration-item:hover {
  transform: translateX(4px);
  box-shadow: -4px 4px 0 #e8ddd5;
}

.integration-item:nth-child(1) { border-left-color: #F06A6A; }
.integration-item:nth-child(2) { border-left-color: #5E6AD2; }
.integration-item:nth-child(3) { border-left-color: #059669; }
.integration-item:nth-child(4) { border-left-color: #2563eb; }

.integration-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1c1410;
  margin-bottom: 0.25rem;
}

.integration-desc {
  color: #5a4e47;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .integrations-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .integration-item {
    flex: 1 1 calc(50% - 0.625rem);
  }
}

/* ---------- Why Nufinox: three columns ---------- */

#why {
  background: #fff;
}

.why-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6rem 2rem 7rem;
}

.why-list {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: why-counter;
}

.why-item {
  padding: 2rem 0;
  border-bottom: 2px solid #e8ddd5;
  counter-increment: why-counter;
}

.why-item:first-child {
  padding-top: 0;
}

.why-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.why-item::before {
  content: counter(why-counter, decimal-leading-zero);
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 3rem;
  font-weight: 700;
  color: #D63B1E;
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.why-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1c1410;
  margin-bottom: 0.5rem;
}

.why-desc {
  color: #5a4e47;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .why-list {
    flex-direction: row;
    gap: 0;
    align-items: flex-start;
  }

  .why-item {
    flex: 1;
    padding: 0 3rem;
    border-bottom: none;
    border-right: 2px solid #e8ddd5;
  }

  .why-item:first-child {
    padding-left: 0;
  }

  .why-item:last-child {
    border-right: none;
    padding-right: 0;
  }

  .why-item::before {
    font-size: 4rem;
    margin-bottom: 1.25rem;
  }
}

/* ---------- FAQ: sticky label + accordion ---------- */

.faq-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6rem 2rem 7rem;
}

.faq-header {
  margin-bottom: 1rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 2px solid #e8ddd5;
}

.faq-item:first-child {
  border-top: 2px solid #e8ddd5;
}

.faq-question {
  display: block;
  padding: 1.25rem 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #1c1410;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.15s;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  float: right;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: #D63B1E;
  line-height: 1.25;
}

details[open] .faq-question::after {
  content: '−';
}

details[open] .faq-question {
  color: #D63B1E;
}

.faq-question:hover {
  color: #D63B1E;
}

.faq-answer {
  color: #5a4e47;
  font-size: 1rem;
  padding-bottom: 1.25rem;
  max-width: 640px;
}

@media (min-width: 768px) {
  .faq-inner {
    display: flex;
    gap: 5rem;
    align-items: flex-start;
  }

  .faq-header {
    flex: 0 0 220px;
    position: sticky;
    top: 88px;
    margin-bottom: 0;
  }

  .faq-list {
    flex: 1;
  }
}

/* ---------- CTA: full-bleed with background letterform ---------- */

#cta {
  background: #D63B1E;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 9rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-bg-text {
  position: absolute;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 40vw;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.07);
  line-height: 0.85;
  right: -2vw;
  bottom: -0.1em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.cta-headline {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.cta-sub {
  color: #f5d5ce;
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

#cta .btn-primary {
  background: #fff;
  color: #D63B1E;
  box-shadow: 0 4px 0 #a82d16;
}

#cta .btn-primary:hover {
  background: #fff5f3;
  box-shadow: 0 6px 0 #a82d16;
}

#cta .btn-primary:active {
  box-shadow: 0 1px 0 #a82d16;
}

@media (min-width: 768px) {
  .cta-headline {
    font-size: 3.5rem;
  }
}

/* ---------- Footer ---------- */

#footer {
  background: #1c1410;
  border-top: 1px solid #2c1e18;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-brand {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #9a7a70;
}

.footer-built {
  font-size: 0.9375rem;
  color: #9a7a70;
}

.footer-built a {
  color: #9a7a70;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-built a:hover {
  color: #fff;
}

.footer-contact a {
  font-size: 0.9375rem;
  color: #9a7a70;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-contact a:hover {
  color: #fff;
}
