/* ─── FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ─── VARIABLES ─── */
:root {
  --bg:           #0d0d0d;
  --bg-light:     #f4f1ea;
  --surface:      #161616;
  --border:       #242424;
  --border-light: #e0ddd6;
  --accent:       #3dd68c;
  --accent-dim:   rgba(61, 214, 140, 0.07);
  --on-dark:      #e8e8e6;
  --on-light:     #141412;
  --muted-dark:   #5a5a58;
  --muted-light:  #757570;
  --font-display: 'Syne', sans-serif;
  --font-body:    'Instrument Sans', sans-serif;
  --max-w:        1120px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--on-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

/* ─── GRAIN OVERLAY ─── */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── CONTAINER ─── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 40px; }

/* ─── NAV ─── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 13, 13, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto; padding: 0 40px;
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 800;
  color: #fff; letter-spacing: -0.02em;
}
.nav__logo span { color: var(--accent); }
.nav__links { display: flex; gap: 36px; align-items: center; }
.nav__links a {
  font-size: 0.84rem; font-weight: 500;
  color: var(--muted-dark);
  transition: color 0.15s;
  position: relative;
}
.nav__links a:not(.nav__cta)::after {
  content: '';
  position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.nav__links a:not(.nav__cta):hover { color: var(--on-dark); }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  background: var(--accent); color: #0d0d0d !important;
  padding: 9px 20px; border-radius: 3px;
  font-weight: 600; font-size: 0.84rem;
  transition: opacity 0.15s, box-shadow 0.15s;
}
.nav__cta:hover { opacity: 0.88; box-shadow: 0 0 18px rgba(61,214,140,0.25); }
.nav__cta::after { display: none !important; }

/* ─── HERO ─── */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 0 88px;
  position: relative; overflow: hidden;
}
.hero__glow {
  position: absolute; top: 30%; right: -8%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(61,214,140,0.06) 0%, transparent 65%);
  pointer-events: none;
}
.hero__glow-2 {
  position: absolute; bottom: 10%; left: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(61,214,140,0.03) 0%, transparent 65%);
  pointer-events: none;
}
.hero__content { position: relative; }
.hero__line {
  display: block; width: 44px; height: 2px;
  background: var(--accent); margin-bottom: 28px;
}
.hero__eyebrow {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted-dark); margin-bottom: 36px;
  display: flex; align-items: center; gap: 12px;
}
.hero__eyebrow em { font-style: normal; color: var(--accent); }
.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 8.5vw, 7.8rem);
  font-weight: 800;
  line-height: 0.93;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 64px;
}
.hero__headline em { font-style: normal; color: var(--accent); }
.hero__bottom {
  display: grid; grid-template-columns: 1fr auto;
  gap: 64px; align-items: end;
}
.hero__sub {
  font-size: 1rem; color: var(--muted-dark);
  line-height: 1.8; max-width: 400px;
}
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* ─── LOAD ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__line     { animation: fadeUp 0.5s ease both; animation-delay: 0.05s; }
.hero__eyebrow  { animation: fadeUp 0.5s ease both; animation-delay: 0.15s; }
.hero__headline { animation: fadeUp 0.65s ease both; animation-delay: 0.25s; }
.hero__bottom   { animation: fadeUp 0.5s ease both; animation-delay: 0.45s; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center;
  padding: 12px 26px; border-radius: 3px;
  font-weight: 600; font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer; border: none;
  transition: opacity 0.15s, box-shadow 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #0d0d0d; }
.btn--primary:hover { opacity: 0.88; box-shadow: 0 0 22px rgba(61,214,140,0.3); }
.btn--outline { background: transparent; color: var(--on-dark); border: 1px solid #383836; }
.btn--outline:hover { border-color: #666; }

/* ─── MARQUEE ─── */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
  background: var(--surface);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee__track {
  display: flex; align-items: center;
  width: max-content;
  animation: marquee 22s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee__item {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted-dark); padding: 0 44px;
  white-space: nowrap;
}
.marquee__dot {
  color: var(--accent); font-size: 0.45rem;
  flex-shrink: 0;
}

/* ─── SECTIONS ─── */
.section { padding: 104px 0; }
.section--light { background: var(--bg-light); color: var(--on-light); }
.section--dark  { background: var(--bg); color: var(--on-dark); }

/* smooth gradient bleed at section boundaries */
.section--light + .section--dark::before,
.section--dark + .section--light::before {
  content: '';
  display: block;
  height: 1px;
  background: transparent;
}
.section--dark { position: relative; }
.section--dark::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.18));
  pointer-events: none;
}

.section__eyebrow {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
  display: flex; align-items: center; gap: 14px;
}
.section__eyebrow::after {
  content: '';
  display: block; height: 1px; width: 40px;
  background: currentColor; opacity: 0.3;
}

/* keep old class as alias */
.section__label {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}

.section__heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.03em;
}
.section--dark  .section__heading { color: #fff; }
.section--light .section__heading { color: var(--on-light); }

/* ─── ABOUT ─── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 104px; align-items: center;
}
.about__copy { padding-top: 8px; }
.about__copy p {
  font-size: 1.04rem; color: var(--muted-light);
  line-height: 1.82; margin-bottom: 18px;
}
/* ─── LAPTOP 3D ─── */
.about__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0 40px;
}

/*
 * Two-layer approach:
 *   laptop-scene  → opacity + translateY (rise)
 *   laptop        → rotateY (spin)   — NO opacity here: opacity breaks preserve-3d
 */
.laptop-scene {
  perspective: 800px;
  perspective-origin: 50% 40%;
  opacity: 0;
  transform: translateY(70px);
  transition:
    opacity   0.8s ease,
    transform 1.0s cubic-bezier(0.22, 1, 0.36, 1);
}

.laptop-scene.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.laptop {
  position: relative;
  transform-style: preserve-3d;
  width: 240px;
  transform: rotateY(42deg);
  /* spring bezier: overshoots past -8deg and settles, giving spin-through feel */
  transition: transform 1.5s cubic-bezier(0.34, 1.4, 0.64, 1) 0.1s;
}

.laptop-scene.is-visible .laptop {
  transform: rotateY(-8deg);
}

.laptop__lid {
  width: 240px;
  height: 154px;
  background: linear-gradient(160deg, #232323, #191919);
  border: 1px solid #333;
  border-bottom: none;
  border-radius: 10px 10px 2px 2px;
  transform-origin: bottom center;
  transform: rotateX(-92deg);
  position: relative;
  /* lid opens after the rise + spin — delay 0.5s */
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s;
}

.laptop-scene.is-visible .laptop__lid {
  transform: rotateX(-26deg);
}

.laptop__screen {
  position: absolute;
  inset: 10px 14px 8px;
  background: #060606;
  border-radius: 4px;
  overflow: hidden;
}

.laptop__screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 35% 30%, rgba(61,214,140,0.18) 0%, transparent 65%);
  pointer-events: none;
}

.laptop__screen-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
  font-family: 'Courier New', monospace;
  font-size: 0.62rem;
  color: var(--accent);
  line-height: 2;
  opacity: 0;
  /* text fades in after lid is open */
  transition: opacity 0.6s ease 1.7s;
}

.laptop-scene.is-visible .laptop__screen-inner {
  opacity: 1;
}

.laptop__screen-line { display: block; }
.laptop__screen-line::before { content: '> '; opacity: 0.5; }

.laptop__cursor {
  display: inline-block;
  width: 6px; height: 11px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.laptop__base {
  width: 240px;
  height: 14px;
  background: linear-gradient(to bottom, #2a2a2a, #1d1d1d);
  border: 1px solid #333;
  border-top: 1px solid #3a3a3a;
  border-radius: 0 0 8px 8px;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.4);
}

.laptop__base::before {
  content: '';
  position: absolute;
  top: 3px; left: 18px; right: 18px; height: 6px;
  background: repeating-linear-gradient(
    90deg,
    #2e2e2e 0px, #2e2e2e 14px,
    #222 14px, #222 16px
  );
  border-radius: 1px;
  opacity: 0.7;
}

.laptop__base::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 5px;
  background: #232323;
  border-radius: 2px;
  border: 1px solid #333;
}

.laptop__shadow {
  width: 200px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.45) 0%, transparent 70%);
  margin: 0 auto;
  margin-top: 4px;
}

/* ─── SERVICES LIST ─── */
.services-list {
  border-top: 1px solid var(--border);
  margin-top: 56px;
}
.service-item {
  display: grid;
  grid-template-columns: 56px 1fr 28px;
  gap: 0 40px;
  align-items: start;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: background 0.18s, padding 0.18s;
  cursor: pointer;
}
.service-item:hover {
  background: var(--accent-dim);
  padding-left: 20px; padding-right: 20px;
  margin: 0 -20px;
}
.service-item:hover .service-item__arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}
.service-item__num {
  font-family: var(--font-display);
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.06em; color: var(--accent);
  padding-top: 5px;
}
.service-item__title {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  color: var(--on-dark); margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.service-item__desc {
  font-size: 0.92rem; color: var(--muted-dark);
  line-height: 1.72; max-width: 560px;
}
.service-item__arrow {
  font-size: 1rem; color: var(--muted-dark);
  transition: color 0.18s, transform 0.18s;
  padding-top: 5px; justify-self: end;
}

/* ─── PROCESS ─── */
.process-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 64px;
  border: 1px solid var(--border-light);
  border-radius: 3px; overflow: hidden;
}
.process-step {
  padding: 48px 40px;
  border-right: 1px solid var(--border-light);
}
.process-step:last-child { border-right: none; }
.process-step__num {
  font-family: var(--font-display);
  font-size: 5rem; font-weight: 800;
  line-height: 1; color: var(--accent);
  opacity: 0.15; margin-bottom: 28px;
}
.process-step__title {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700;
  color: var(--on-light); margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.process-step__body {
  font-size: 0.92rem; color: var(--muted-light); line-height: 1.78;
}

/* ─── ARTICLE CARDS ─── */
.articles-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px; margin-top: 48px;
}
.article-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 3px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.1);
}
.article-card__img {
  width: 100%; height: 196px;
  object-fit: cover; display: block;
}
.article-card__content {
  padding: 26px 28px 28px;
  flex: 1; display: flex; flex-direction: column;
}
.article-card__tag {
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.article-card__title {
  font-family: var(--font-display);
  font-size: 1.02rem; font-weight: 700;
  color: var(--on-light); margin-bottom: 10px;
  line-height: 1.32; letter-spacing: -0.01em;
}
.article-card__desc {
  font-size: 0.87rem; color: var(--muted-light);
  line-height: 1.72;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.article-card:hover .article-card__desc {
  display: block;
  overflow: visible;
}
.article-card__link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px; font-size: 0.82rem; font-weight: 600;
  color: var(--accent); transition: gap 0.2s;
}
.article-card__link:hover { gap: 10px; }

/* ─── CTA SECTION ─── */
.cta-section {
  padding: 120px 40px;
  text-align: center;
  border-top: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; bottom: -60px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse, rgba(61,214,140,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.cta-section__heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.035em; color: #fff;
  max-width: 720px; margin: 0 auto 40px;
  position: relative;
}
.cta-section__heading em { font-style: normal; color: var(--accent); }

/* ─── FOOTER ─── */
.footer {
  background: var(--bg); padding: 28px 0;
  border-top: 1px solid var(--border);
}
.footer__inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer__copy { font-size: 0.78rem; color: var(--muted-dark); }
.footer__links { display: flex; gap: 28px; }
.footer__links a {
  font-size: 0.78rem; color: var(--muted-dark);
  transition: color 0.15s;
}
.footer__links a:hover { color: var(--accent); }

/* ─── ARTICLE PAGES ─── */
.article-header { padding: 80px 0 56px; background: var(--bg); }
.article-body { padding: 64px 0 96px; background: var(--bg-light); }
.prose {
  max-width: 680px; margin: 0 auto;
  font-size: 1.04rem; line-height: 1.85; color: var(--on-light);
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  margin: 52px 0 16px; letter-spacing: -0.02em;
  color: var(--on-light);
}
.prose p { margin-bottom: 22px; }
.prose ul { padding-left: 20px; margin-bottom: 22px; }
.prose li { margin-bottom: 12px; }
.prose strong { font-weight: 600; }

/* ─── SIGN BLOCKS (Article 2) ─── */
.sign-block {
  border-left: 2px solid var(--accent);
  padding-left: 24px; margin: 44px 0;
}
.sign-number {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
.sign-title {
  font-family: var(--font-display);
  font-size: 1.12rem; font-weight: 700;
  color: var(--on-light); margin-bottom: 10px;
}

/* ─── CONTACT FORM ─── */
.contact-form { max-width: 560px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.form-group label {
  font-size: 0.78rem; font-weight: 600;
  color: var(--muted-light); letter-spacing: 0.04em;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: 3px;
  font-family: var(--font-body); font-size: 0.96rem;
  color: var(--on-light); background: #fff;
  transition: border-color 0.15s; outline: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 130px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .container  { padding: 0 20px; }
  .nav__inner { padding: 0 20px; }
  .nav__links { gap: 20px; }
  .nav__links a { font-size: 0.8rem; }
  .hero { padding-bottom: 56px; }
  .hero__bottom { grid-template-columns: 1fr; gap: 28px; }
  .hero__ctas { justify-content: flex-start; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about__visual { padding: 8px 0 16px; }
  .laptop-scene { transform: translateY(50px); }
  .laptop-scene.is-visible { transform: translateY(0); }
  .laptop { width: 180px; transform: rotateY(42deg); }
  .laptop-scene.is-visible .laptop { transform: rotateY(-6deg); }
  .laptop__lid { width: 180px; height: 116px; }
  .laptop__base { width: 180px; }
  .laptop__shadow { width: 150px; }
  .service-item { grid-template-columns: 40px 1fr; }
  .service-item__arrow { display: none; }
  .process-grid { grid-template-columns: 1fr; }
  .process-step { border-right: none; border-bottom: 1px solid var(--border-light); }
  .process-step:last-child { border-bottom: none; }
  .articles-grid { grid-template-columns: 1fr; }
  .cta-section { padding: 80px 20px; }
  @media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }
}
