/* 3F Tech — Modern Agency */
:root {
  --ink: #0E0E10;
  --ink-80: #1a1a1d;
  --ink-60: #4a4a4f;
  --ink-40: #8a8a90;
  --ink-20: #d9d9dc;
  --ink-10: #ececee;
  --paper: #F6F4EF;       /* warm off-white */
  --paper-2: #FBF9F4;
  --orange: #E25A2B;      /* matched to logo F */
  --orange-soft: #F3A07E;
  --orange-50: rgba(226,90,43,0.5);
  --orange-10: rgba(226,90,43,0.08);
  --line: rgba(14,14,16,0.10);
  --line-strong: rgba(14,14,16,0.22);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "JetBrains Mono", monospace;

  --maxw: 1360px;
  --pad-x: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Hide native cursor on desktop when custom cursor active */
@media (hover: hover) and (pointer: fine) {
  body.cursor-active,
  body.cursor-active * { cursor: none !important; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* Utilities */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-60);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 20px; height: 1px;
  background: var(--ink-40);
}

/* Headings */
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.02; }
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.96;
}
.display em {
  font-style: italic;
  color: var(--orange);
}

/* Section rhythm */
section { position: relative; padding: clamp(80px, 10vw, 140px) 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 64px;
}
@media (max-width: 820px) {
  .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
}

.hrule {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--orange); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  transition: background .25s ease, backdrop-filter .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(246,244,239,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-logo img { height: 22px; width: auto; }
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--ink-60);
}
.nav-links a { position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 1px;
  background: var(--orange);
  transition: right .25s ease;
}
.nav-links a:hover::after { right: 0; }
@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* Hero */
.hero {
  padding-top: clamp(140px, 18vw, 200px);
  padding-bottom: clamp(60px, 8vw, 100px);
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: clamp(40px, 6vw, 72px);
  flex-wrap: wrap;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-60);
}
.hero-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2aaf5d;
  box-shadow: 0 0 0 4px rgba(42,175,93,0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(42,175,93,0.18); }
  50% { box-shadow: 0 0 0 7px rgba(42,175,93,0.08); }
}
.hero-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-40);
  text-transform: uppercase;
  text-align: right;
  line-height: 1.8;
}
.hero-meta strong { color: var(--ink); font-weight: 500; }

.hero h1 {
  font-size: clamp(56px, 10.5vw, 184px);
  margin-bottom: clamp(32px, 4vw, 48px);
  max-width: 13ch;
}
.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: end;
}
@media (max-width: 820px) {
  .hero-bottom { grid-template-columns: 1fr; gap: 32px; }
  .hero-meta { text-align: left; }
}
.hero-lede {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--ink-60);
  max-width: 44ch;
  line-height: 1.55;
}
.hero-lede strong { color: var(--ink); font-weight: 500; }
.hero-actions {
  display: flex;
  gap: 12px;
  justify-self: end;
  flex-wrap: wrap;
}
@media (max-width: 820px) { .hero-actions { justify-self: start; } }

/* Marquee */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  overflow: hidden;
  background: var(--paper);
}
.marquee-track {
  display: flex;
  gap: 60px;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
  width: max-content;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  color: var(--ink);
}
.marquee-item::before {
  content: "✦";
  color: var(--orange);
  font-style: normal;
  font-size: 14px;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
@media (max-width: 820px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  position: relative;
  padding: 40px 36px 36px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  transition: background .4s ease;
}
.service-card:hover { background: var(--paper-2); }
.service-card .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-40);
  letter-spacing: 0.08em;
  margin-bottom: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.service-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3vw, 44px);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  line-height: 1.05;
}
.service-card p {
  font-size: 15px;
  color: var(--ink-60);
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 46ch;
}
.service-card .tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 32px;
}
.service-card .tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-60);
}
.service-card .svc-link {
  font-size: 13px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.service-card .svc-link .underline {
  background-image: linear-gradient(var(--orange), var(--orange));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .3s ease;
  padding-bottom: 2px;
}
.service-card:hover .svc-link .underline { background-size: 100% 1px; }

.service-card .orange-slice {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 4px;
  background: var(--orange);
  transition: width .5s cubic-bezier(.2,.8,.2,1);
}
.service-card:hover .orange-slice { width: 100%; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}
.about-copy p {
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--ink-60);
  line-height: 1.6;
  max-width: 50ch;
  margin: 0 0 20px;
}
.about-copy p strong { color: var(--ink); font-weight: 500; }
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 40px;
}
.stat {
  padding: 22px 24px;
  background: var(--paper);
}
.stat .num {
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat .num em { color: var(--orange); font-style: italic; }
.stat .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-top: 8px;
}

/* Founders */
.founders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 60px;
}
@media (max-width: 900px) { .founders { grid-template-columns: 1fr; } }

.founder {
  position: relative;
  padding: 28px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  transition: border-color .3s ease, transform .4s ease;
  overflow: hidden;
}
.founder:hover { border-color: var(--ink); }
.founder .avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 32px;
  margin-bottom: 60px;
  transition: background .3s ease;
}
.founder:hover .avatar { background: var(--orange); }
.founder .role-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-40);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.founder .name {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.founder .title {
  font-size: 14px;
  color: var(--ink-60);
  margin-bottom: 20px;
}
.founder .bio {
  font-size: 14px;
  color: var(--ink-60);
  line-height: 1.55;
  margin-bottom: 24px;
}
.founder .edu {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-40);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  letter-spacing: 0.04em;
}

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; } }
@media (min-width: 901px) and (max-width: 1100px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }

.why-item {
  padding: 36px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.why-item .idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--orange);
  letter-spacing: 0.08em;
  margin-bottom: 40px;
}
.why-item h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.why-item p {
  font-size: 14px;
  color: var(--ink-60);
  line-height: 1.6;
  margin: 0;
}

/* Process */
.process-list {
  border-top: 1px solid var(--ink);
  margin-top: 20px;
}
.process-row {
  display: grid;
  grid-template-columns: 80px 1.2fr 2fr 100px;
  gap: 24px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: padding .3s ease;
  position: relative;
}
@media (max-width: 820px) {
  .process-row { grid-template-columns: 60px 1fr; gap: 16px; padding: 24px 0; }
  .process-row > :nth-child(3),
  .process-row > :nth-child(4) { grid-column: 2; }
}
.process-row:hover { padding-left: 16px; }
.process-row::before {
  content: "";
  position: absolute;
  left: -20px; top: 50%;
  width: 0; height: 1px;
  background: var(--orange);
  transform: translateY(-50%);
  transition: width .4s ease;
}
.process-row:hover::before { width: 12px; }
.process-row .num {
  font-family: var(--serif);
  font-size: 42px;
  color: var(--ink-40);
  line-height: 1;
}
.process-row:hover .num { color: var(--orange); }
.process-row h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.process-row p {
  font-size: 15px;
  color: var(--ink-60);
  line-height: 1.55;
  margin: 0;
  max-width: 50ch;
}
.process-row .dur {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-40);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}

/* Stack */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stack-grid { grid-template-columns: 1fr; } }

.stack-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.stack-col ul { list-style: none; padding: 0; margin: 0; }
.stack-col li {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color .2s ease, padding-left .3s ease;
}
.stack-col li:hover { color: var(--orange); padding-left: 6px; }
.stack-col li::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink-20);
  transition: background .2s ease;
}
.stack-col li:hover::before { background: var(--orange); }

/* Contact */
.contact {
  background: var(--ink);
  color: var(--paper);
  border-radius: 24px;
  padding: clamp(48px, 6vw, 80px);
  margin: 0 var(--pad-x);
  max-width: calc(var(--maxw) - var(--pad-x) * 2);
  margin-left: auto; margin-right: auto;
}
.contact h2 { color: var(--paper); }
.contact h2 em { color: var(--orange); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  margin-top: 48px;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-info .row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.contact-info .row:last-child { border-bottom: none; }
.contact-info .row .icon {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 12px;
  padding-top: 4px;
}
.contact-info .row .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}
.contact-info .row .value {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form .full { grid-column: span 2; }
.form label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  padding: 10px 0;
  outline: none;
  transition: border-color .2s ease;
}
.form textarea { resize: vertical; min-height: 100px; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--orange); }
.form input::placeholder, .form textarea::placeholder { color: rgba(255,255,255,0.3); }
.form select option { background: var(--ink); color: var(--paper); }
.form .submit {
  justify-self: start;
  margin-top: 12px;
  background: var(--orange);
  color: var(--paper);
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s ease, transform .2s ease;
  display: inline-flex; align-items: center; gap: 10px;
}
.form .submit:hover { background: var(--paper); color: var(--ink); }

/* Footer */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--line);
  margin-top: 100px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h6 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-40);
  font-weight: 500;
  margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { padding: 5px 0; font-size: 14px; color: var(--ink-60); }
.footer li a:hover { color: var(--orange); }
.footer-logo { max-width: 380px; }
.footer-logo img { height: 24px; margin-bottom: 16px; }
.footer-logo p { font-size: 14px; color: var(--ink-60); line-height: 1.55; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-40);
  flex-wrap: wrap;
  gap: 16px;
}
.socials { display: flex; gap: 10px; }
.socials a {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px;
  color: var(--ink-60);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.socials a:hover { background: var(--orange); border-color: var(--orange); color: var(--paper); }

/* Custom cursor */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  transition: width .2s ease, height .2s ease, opacity .2s ease;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid #fff;
  border-radius: 50%;
  transition: width .25s ease, height .25s ease, border-color .25s ease, background .2s ease;
}
.cursor-ring.hover {
  width: 64px; height: 64px;
  background: rgba(226,90,43,0.3);
  border-color: rgba(255,255,255,0.4);
}
.cursor-ring.text {
  width: 4px; height: 32px;
  border-radius: 2px;
  background: #fff;
  border: none;
}
.cursor-dot.hidden { opacity: 0; }
@media (hover: none) or (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
