/* ============================================================
   ALAKHY — main.css
   Design reference: decode.agency
   Clean, editorial, Swiss modernism. Inter + generous whitespace.
   ============================================================ */

/* ── TOKENS ── */
:root {
  --black:   #1a1a1a;
  --white:   #ffffff;
  --gold:    #c49a3c;
  --muted:   #858585;
  --border:  #e8e8e8;
  --alt-bg:  #f5f5f5;
  --dark-bg: #1a1a1a;
  --dark-fg: #f0f0f0;
  --dark-muted: #909090;

  --font: 'Inter', system-ui, -apple-system, sans-serif;

  --max: 1320px;
  --pad: clamp(1.5rem, 5vw, 4rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  padding-top: 80px; /* offset for fixed header */
}

/* ── CONTAINER ── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ── HEADER / NAV ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem var(--pad);
  display: flex;
  align-items: center;
  gap: 3rem;
}

.logo {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--black);
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.logo:hover { opacity: 0.75; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex: 1;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.3rem 0 0.45rem;
  position: relative;
  display: inline-block;
  vertical-align: bottom;
  /* spring easing for the lift — slight overshoot gives the pop */
  transition: color 0.22s ease,
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-links a:hover {
  color: var(--black);
  transform: translateY(-3px);
}

/* Gold underline: slides in on hover, persists on active */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.36s cubic-bezier(0.76, 0, 0.24, 1);
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Active section: black underline, always visible */
.nav-links a.nav-active {
  color: var(--black);
  font-weight: 500;
}
.nav-links a.nav-active::after {
  background: var(--black);
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--black);
  flex-shrink: 0;
  transition: color 0.15s;
}
.nav-cta:hover { color: var(--gold); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--black);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle span:last-child { width: 65%; }
.nav-toggle.open span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle.open span:last-child  { transform: translateY(-3.25px) rotate(-45deg); width: 100%; }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 2rem var(--pad);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  gap: 1.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 1.1rem; color: var(--black); }
.mobile-cta { font-weight: 500; color: var(--gold) !important; }

/* ── SECTIONS ── */
.section {
  min-height: var(--vh, 100vh);
  padding: clamp(4rem, 7vw, 7rem) 0;
  display: flex;
  align-items: center;
}
.section > .container { width: 100%; }
.section-alt  { background: var(--alt-bg); }
.section-dark { background: var(--dark-bg); color: var(--dark-fg); }

/* Sub-pages: disable snap, natural height */
.page-inner .section {
  min-height: unset;
  scroll-snap-align: none;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.section-label-dim { color: var(--dark-muted); }

.section-h2 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
#services .section-h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-bottom: 1.5rem;
}
.h2-light { color: var(--dark-fg); }

/* ── CTA LINKS ── */
.cta-link {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--black);
  transition: color 0.15s;
}
.cta-link:hover { color: var(--gold); }
.cta-light { color: var(--dark-fg); }
.cta-light:hover { color: var(--gold); }

/* ── FULLPAGE NAV ARROWS ── */
.fp-nav {
  position: fixed;
  bottom: 2.25rem;
  right: 2.25rem;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.fp-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(196, 154, 60, 0.45);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: background 0.22s, border-color 0.22s, color 0.22s, box-shadow 0.22s;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.88);
  transition: opacity 0.3s, transform 0.3s, background 0.22s, border-color 0.22s, color 0.22s;
}
.fp-arrow.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.fp-arrow:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
  box-shadow: 0 6px 24px rgba(196, 154, 60, 0.35);
}
.fp-arrow:active { transform: scale(0.94); }

.fp-arrow svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

/* Bounce animations */
@keyframes fp-bounce-down {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}
@keyframes fp-bounce-up {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
.fp-down.visible svg { animation: fp-bounce-down 1.6s ease-in-out infinite; }
.fp-up.visible   svg { animation: fp-bounce-up   1.6s ease-in-out infinite; }

/* Dark section — invert arrow background so it stays readable */
.fp-arrow.dark-bg {
  background: rgba(26, 26, 26, 0.82);
  border-color: rgba(196, 154, 60, 0.5);
}
.fp-arrow.dark-bg:hover {
  background: var(--gold);
  border-color: var(--gold);
}

@media (max-width: 600px) {
  .fp-nav { bottom: 1.25rem; right: 1.25rem; }
  .fp-arrow { width: 40px; height: 40px; }
  .fp-arrow svg { width: 15px; height: 15px; }
}

/* ── SECTION INDICATOR ── */
.section-indicator {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--black);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 200;
  white-space: nowrap;
}
.section-indicator.visible { opacity: 1; }

/* ── HERO ── */
.hero {
  min-height: var(--vh, 100vh);
  padding: clamp(5rem, 10vw, 10rem) 0 clamp(4rem, 8vw, 8rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.hero > .container { width: 100%; }

/* Scroll cue */
.hero::after {
  content: '';
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, var(--border), transparent);
}

.hero-h1 {
  font-size: clamp(2.8rem, 6.5vw, 6.5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--black);
  margin-bottom: clamp(2rem, 4vw, 4rem);
}

.hero-sub {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 2.5rem;
}

/* ── HERO CTAs ── */
.hero-ctas {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.cta-secondary { color: var(--muted); }
.cta-secondary:hover { color: var(--black); }

/* ── WHAT WE ARE ── */
.what-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 7rem);
  align-items: start;
  margin-bottom: clamp(3.5rem, 6vw, 6rem);
}
.what-h2 {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.what-right p {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

/* Three arm cards */
.arm-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}
.arm-card {
  padding: 3.5rem 3rem 3.5rem 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.arm-card:last-child { border-right: 0; padding-right: 0; }
.arm-card:not(:first-child) { padding-left: 3rem; }
.arm-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.arm-card p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.row-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--black);
  transition: color 0.15s;
  margin-top: auto;
}
.row-link:hover { color: var(--gold); }

/* ── SERVICES ── */

/* Services section — tighter vertical padding so all cards + CTA fit in one screen */
#services.section {
  padding: clamp(3rem, 4vw, 4.5rem) 0;
}

/* Override global h3 inside service cards */
.svc-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ── SERVICE CARDS (numbered grid) ── */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.svc-card {
  background: var(--white);
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--gold);
}
.svc-card:hover { background: var(--white); }
.svc-num {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}
.svc-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  line-height: 1.25;
}
.svc-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}
.svc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.svc-tags span {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}
.svc-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(196,154,60,0.10) 0%, rgba(196,154,60,0.04) 100%);
  border-left: 3px solid var(--gold);
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Shimmer fill on hover */
.svc-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 0;
}
.svc-cta:hover::before { transform: translateY(0); }

.svc-cta a {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  font-weight: 500;
  color: var(--black);
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
  text-align: center;
  line-height: 1.5;
}
.svc-cta:hover a { color: var(--white); }

/* Override the global cta-link hover so gold fill + white text wins */
.svc-cta:hover a.cta-link { color: var(--white); }

@media (max-width: 720px) {
  .svc-grid { grid-template-columns: 1fr; }
}

/* ── INCUBATOR ── */
.incubator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 7rem);
  align-items: start;
}
.incubator-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--dark-muted);
  margin-bottom: 1.75rem;
}
.pillar {
  padding: 2.25rem 0;
  border-bottom: 1px solid oklch(1 0 0 / 12%);
}
.pillar:first-child { border-top: 1px solid oklch(1 0 0 / 12%); }
.pillar-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.pillar p {
  font-size: 1rem;
  color: var(--dark-muted);
  line-height: 1.7;
}

/* ── PRODUCTS ── */
.product-row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 5rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  align-items: center;
}
.product-row:last-child { border-bottom: 1px solid var(--border); }
.product-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.3rem;
}
.product-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: rgba(196,154,60,0.1);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  border: 1px solid rgba(196,154,60,0.3);
  width: fit-content;
}
.product-tag-live {
  color: #3a6647;
  background: rgba(58,102,71,0.1);
  border-color: rgba(58,102,71,0.25);
}
.product-tag-dev {
  color: #7a6030;
  background: rgba(196,154,60,0.12);
  border-color: rgba(196,154,60,0.3);
}
.product-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.product-name {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}
.product-body p {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 580px;
  margin-bottom: 1.75rem;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 7rem);
  align-items: start;
}
.contact-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.creds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 1.75rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.field input,
.field textarea,
.field select {
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  width: 100%;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--black); }
.field textarea { resize: vertical; min-height: 7rem; line-height: 1.6; }

.form button[type="submit"] {
  align-self: flex-start;
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  background: var(--black);
  padding: 0.85rem 2.5rem;
  border-radius: 4px;
  transition: background 0.15s;
  cursor: pointer;
}
.form button[type="submit"]:hover { background: var(--gold); }

/* ── FOOTER ── */
.footer {
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--black); }
.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── PAGE HERO (sub-pages) ── */
.page-hero {
  padding: clamp(4rem, 8vw, 8rem) 0 clamp(3rem, 6vw, 6rem);
  border-bottom: 1px solid var(--border);
}
.page-h1 {
  font-size: clamp(2.2rem, 5vw, 5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 800px;
}
.page-sub {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 600px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .what-header { grid-template-columns: 1fr; }
  .arm-cards { grid-template-columns: 1fr; }
  .arm-card {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
  }
  .arm-card:last-child { border-bottom: 0; }
  .arm-card:not(:first-child) { padding-left: 0; }
  .product-row { grid-template-columns: 1fr; gap: 1rem; }
  .incubator-grid,
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-links,
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ── MOBILE — fit sections within viewport ── */
@media (max-width: 768px) {

  /* Tighter header */
  .header-inner { padding: 1rem var(--pad); }
  body { padding-top: 64px; }

  /* Sections — reduce padding so content has room */
  .section { padding: 2.5rem 0; }
  #services.section { padding: 1rem 0; }

  .section-h2 {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    margin-bottom: 1.25rem;
  }
  #services .section-h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  /* Hero */
  .hero { padding: 3rem 0 2rem; }

  /* What We Are */
  .what-header { gap: 1.25rem; margin-bottom: 1.75rem; }
  .what-h2 { font-size: 1.9rem; }
  .what-right p { font-size: 1rem; margin-bottom: 0.75rem; }
  .arm-card { padding: 1.5rem 0; }
  .arm-card p { font-size: 0.95rem; margin-bottom: 1rem; }

  /* Services — clamp desc to 1 line so all 5 + CTA fit in one screen */
  .svc-grid { gap: 0.5rem; margin-bottom: 0.5rem; }
  .svc-card { padding: 0.75rem 1rem; }
  .svc-num { margin-bottom: 0.2rem; }
  .svc-title { font-size: 0.9rem; margin-bottom: 0.2rem; }
  .svc-desc {
    font-size: 0.78rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .svc-tags { display: none; }
  .svc-cta { min-height: 3rem; }

  /* Incubator */
  .incubator-grid { gap: 1.75rem; }
  .incubator-body { font-size: 1rem; margin-bottom: 1rem; }
  .pillar { padding: 1.25rem 0; }
  .pillar p { font-size: 0.9rem; }

  /* Products */
  .product-row { gap: 1.5rem; padding: 2rem 0; }
  .product-name { font-size: 1.8rem; }
  .product-body p { font-size: 1rem; margin-bottom: 1.25rem; }

  /* Contact */
  .contact-grid { gap: 2rem; }
  .contact-body { font-size: 0.95rem; }

  /* Floating arrows — smaller, lower z-index on mobile */
  .fp-nav { bottom: 1.25rem; right: 1.25rem; }
  .fp-arrow { width: 40px; height: 40px; }
  .fp-arrow svg { width: 15px; height: 15px; }
}
