/* ============================================================
   DESIGN SYSTEM — CSS VARIABLES
============================================================ */
:root {
  --color-bg: #FDFBF8;
  --color-card: #FFFFFF;
  --color-text: #1A1A1A;
  --color-accent: #1A1A1A;
  --color-border: #E0E0E0;
  --color-btn-bg: #1A1A1A;
  --color-btn-text: #FFFFFF;
  --color-black: #1A1A1A;

  --font-logo: 'Nunito', sans-serif;
  --font-body: 'Inter', sans-serif;

  --max-width: 1100px;
  --section-pad: 88px;
  --section-pad-sm: 56px;

  --border-subtle: 1.5px solid var(--color-border);
  --border-nav: 1.5px solid var(--color-border);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --radius-frame: 6px;

  --frame: 28px;
  --frame-tablet: 16px;
  --frame-mobile: 5px;
  --color-frame: #111111;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-frame);
  padding: var(--frame);
  min-height: 100vh;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* The framed content column — sits inside the black body padding */
.site-frame {
  background-color: var(--color-bg);
  border-radius: var(--radius-frame);
  overflow: clip;
  min-height: calc(100vh - var(--frame) * 2);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ============================================================
   LAYOUT UTILITIES
============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 32px;
}

.section {
  padding-block: var(--section-pad);
  border-top: var(--border-subtle);
}

.section-alt {
  background-color: var(--color-card);
}

/* ============================================================
   SECTION LABELS
============================================================ */
.section-header {
  margin-bottom: 56px;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #999999;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text);
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  text-align: center;
  white-space: nowrap;
}

.btn-neo {
  background-color: var(--color-btn-bg);
  color: var(--color-btn-text);
  border-radius: var(--radius-pill);
}

.btn-neo:hover {
  background-color: #333333;
}

.btn-neo:active {
  opacity: 0.85;
}

/* ============================================================
   NAV BAR
============================================================ */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: var(--color-bg);
  border-bottom: var(--border-nav);
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 68px;
}

.nav-logo {
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo img {
  width: 22px;
  height: 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text);
  opacity: 0.8;
  transition: opacity 0.15s;
  position: relative;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background-color: var(--color-text);
  transition: width 0.2s ease;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  opacity: 1;
}

.nav-cta {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.88rem;
  padding: 10px 22px;
}

/* Mobile CTA item — hidden on desktop */
.nav-cta-mobile {
  display: none;
}

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: transform 0.2s, opacity 0.2s;
}

/* Hamburger open state */
.nav-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO SECTION
============================================================ */
.hero {
  padding-block: 100px 96px;
  border-bottom: var(--border-subtle);
}

.hero-inner {
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  gap: 64px;
}

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

.hero-headline {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--color-text);
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
  opacity: 0.55;
  margin-bottom: 40px;
  max-width: 460px;
}

.hero-diagram {
  flex: 0 0 420px;
  width: 420px;
}

.hero-diagram img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   SERVICES SECTION
============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.service-card {
  background-color: var(--color-card);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
}

.card-problem-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text);
}

.card-pain {
  font-size: 0.9rem;
  color: var(--color-text);
  opacity: 0.75;
  line-height: 1.65;
  margin-bottom: 20px;
}

.card-divider {
  border: none;
  border-top: var(--border-subtle);
  margin-bottom: 20px;
}

.card-solution {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.7;
  flex: 1;
}

/* ============================================================
   HOW IT WORKS SECTION
============================================================ */
.steps-row {
  display: flex;
  gap: 24px;
}

.step-box {
  flex: 1;
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  background-color: var(--color-bg);
}

.section-alt .step-box {
  background-color: var(--color-bg);
}

.step-number {
  display: block;
  font-size: 2.8rem;
  font-weight: 700;
  color: #BBBBBB;
  line-height: 1;
  margin-bottom: 20px;
  font-family: var(--font-body);
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
}

.step-desc {
  font-size: 0.9rem;
  color: var(--color-text);
  opacity: 0.75;
  line-height: 1.7;
}

/* ============================================================
   WHY OPERAMIZE SECTION
============================================================ */
.why-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
}

.why-list li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  font-size: 1rem;
  line-height: 1.7;
  padding: 20px 24px;
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--color-card);
}

.why-bullet {
  font-weight: 700;
  color: #BBBBBB;
  flex-shrink: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  min-width: 24px;
}

/* ============================================================
   PAST WORK SECTION
============================================================ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.work-card {
  background-color: var(--color-bg);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  padding-bottom: 16px;
  border-bottom: var(--border-subtle);
}

.work-context,
.work-built {
  font-size: 0.88rem;
  color: var(--color-text);
  opacity: 0.8;
  line-height: 1.7;
}

.work-result {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.7;
  margin-top: auto;
  padding-top: 8px;
  border-top: var(--border-subtle);
}

/* ============================================================
   FINAL CTA SECTION
============================================================ */
.cta-section {
  border-top: var(--border-subtle);
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 36px;
  max-width: 640px;
}

.cta-text {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--color-text);
  opacity: 0.85;
}

/* ============================================================
   FOOTER
============================================================ */
.footer {
  border-top: var(--border-subtle);
  padding-block: 48px;
  background-color: var(--color-card);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-text);
  display: block;
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--color-text);
  opacity: 0.65;
  max-width: 340px;
  line-height: 1.65;
}

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

.footer-email {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  transition: opacity 0.15s;
}

.footer-email:hover {
  opacity: 0.65;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--color-text);
  opacity: 0.5;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.footer-links a {
  color: var(--color-text);
  opacity: 0.6;
  transition: opacity 0.15s;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-sep {
  color: var(--color-text);
  opacity: 0.3;
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 900px)
============================================================ */
@media (max-width: 900px) {
  :root {
    --section-pad: 64px;
  }

  body {
    padding: var(--frame-tablet);
  }

  .hero-inner {
    flex-direction: column;
    gap: 48px;
  }

  .hero-diagram {
    flex: none;
    width: 100%;
    max-width: 380px;
    align-self: center;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

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

  .steps-row {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

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

/* ============================================================
   RESPONSIVE — NARROW NAV (≤ 780px)
============================================================ */
@media (max-width: 780px) {
  .nav {
    gap: 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 0.82rem;
  }

  .nav-cta {
    font-size: 0.82rem;
    padding: 8px 16px;
  }
}

@media (max-width: 650px) {
  .nav-cta {
    display: none;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 600px)
============================================================ */
@media (max-width: 600px) {
  :root {
    --section-pad: var(--section-pad-sm);
  }

  body {
    padding: var(--frame-mobile);
  }

  .container {
    padding-inline: 20px;
  }

  /* Nav mobile */
  .nav-hamburger {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  /* Fullscreen overlay */
  .nav-wrapper {
    position: relative;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1.5px);
    left: 0;
    width: 100%;
    height: calc(100dvh - 100%);
    background-color: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 199;
  }

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

  .nav-links li {
    width: 100%;
    text-align: center;
    border: none;
  }

  .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 1.2rem;
    opacity: 1;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-cta-mobile {
    display: block;
    margin-top: 0;
    padding-top: 0;
    border: none;
  }

  .nav-cta-mobile a {
    font-weight: 700;
  }

  /* Hero */
  .hero {
    padding-block: 56px 48px;
  }

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

  .hero-diagram {
    display: none;
  }

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

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Steps */
  .steps-row {
    flex-direction: column;
  }

  /* Why list */
  .why-list li {
    flex-direction: column;
    gap: 8px;
  }

  /* Work */
  .work-grid {
    grid-template-columns: 1fr;
  }

  /* CTA */
  .cta-text {
    font-size: 1rem;
  }

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