/* ==========================================================================
   Manifest Digital – site styles
   Edit the tokens in :root to change colours, fonts and spacing site-wide.
   ========================================================================== */

:root {
  --bg: #000;
  --surface: #0d0d0d;
  --surface-2: #161616;
  --border: rgba(255, 255, 255, 0.1);
  --text: #fff;
  --muted: #9a9a9a;
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 140px);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.section { padding-block: var(--section); }
.section-tight { padding-block: 0 var(--section); }

/* ---------- Type ---------- */
.display { font-size: clamp(48px, 9vw, 110px); margin: 20px 0; }
.h2 { font-size: clamp(36px, 5vw, 56px); margin-top: 16px; }
.h3 { font-size: clamp(24px, 3vw, 36px); }
.h4 { font-size: 20px; margin: 8px 0 12px; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 640px; }
.num { font-size: 13px; color: var(--muted); }

.pill {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  color: #ddd;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font: 500 14px/1 var(--font-sans);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:hover .arrow { transform: translateX(3px); }
.arrow { transition: transform .2s ease; }
.btn-light { background: linear-gradient(180deg, #fff, #e7e7e7); color: #000; }
.btn-dark { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 60%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card-pad { padding: clamp(24px, 4vw, 56px); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 5px 12px; border-radius: 999px; font-size: 12px;
  background: rgba(0,0,0,.55); border: 1px solid var(--border); backdrop-filter: blur(8px);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-block: 18px;
  transition: background .3s ease, backdrop-filter .3s ease;
}
.site-header.scrolled { background: rgba(0,0,0,.7); backdrop-filter: blur(14px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo img { height: 22px; width: auto; }
.nav ul {
  display: flex; gap: 4px; padding: 4px;
  border: 1px solid var(--border); border-radius: 999px; background: rgba(20,20,20,.7);
}
.nav a { display: block; padding: 6px 16px; font-size: 13px; border-radius: 999px; color: #ccc; transition: background .2s, color .2s; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
.header-cta { padding: 9px 16px; font-size: 13px; }
.nav-toggle { display: none; }

@media (max-width: 800px) {
  .header-cta { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 0 12px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 50%; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 1.5px; background: #fff; transition: transform .25s ease; }
  .nav-open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 80px 16px auto; display: none;
  }
  .nav-open .nav { display: block; }
  .nav ul { flex-direction: column; border-radius: var(--radius); padding: 12px; background: #111; }
  .nav a { padding: 14px 16px; font-size: 18px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 960px); display: flex; align-items: flex-end;
  padding-block: 140px 48px; overflow: hidden;
  background: radial-gradient(ellipse at 70% 40%, #1a1a1a 0%, #000 60%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; }
.hero-title { font-size: clamp(52px, 10.5vw, 160px); line-height: .9; letter-spacing: -0.04em; }
.hero-title em { display: block; color: #d9d9d9; }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 56px; }
.hero-sub { max-width: 320px; font-size: 14px; margin: 0; }
.hero-services { display: block; margin-top: 12px; color: var(--muted); }
.hero-services .svc { white-space: nowrap; }
.hero-services .slash { margin: 0 6px; opacity: .5; }
.scroll-down {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--border); animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- Section heads ---------- */
.section-head { margin-bottom: 48px; }
.section-head.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.section-head.split > p { max-width: 380px; margin: 0; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.service { padding: 32px 28px; border-left: 1px solid var(--border); }
.service:first-child { border-left: 0; }
.icon-box {
  display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 40px;
  border-radius: 16px; border: 1px solid var(--border);
  background: linear-gradient(336deg, #333 -70%, #6e6e6e 104%);
}
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service:nth-child(3) { border-left: 0; }
  .service:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
  .service { border-left: 0; }
  .service + .service { border-top: 1px solid var(--border); }
}

/* ---------- Statement text ---------- */
.statement { font-size: clamp(22px, 2.8vw, 34px); line-height: 1.35; font-weight: 500; margin-top: 24px; }
.reveal-words .w { opacity: .18; transition: opacity .4s ease; }
.reveal-words .w.on { opacity: 1; }

/* ---------- Project cards ---------- */
.project-card {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border);
  aspect-ratio: 16 / 8;
}
@media (max-width: 700px) { .project-card, .projects-grid .project-card { aspect-ratio: auto; height: 440px; } }
.project-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.project-card:hover img { transform: scale(1.04); }
.project-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1) 30%, rgba(0,0,0,.8)); }
.project-card-body { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(20px, 3vw, 36px); }
.project-card-foot p { max-width: 640px; font-size: 14px; color: #ddd; }
.project-card-title { font-size: clamp(32px, 5vw, 56px); }

.project-stack { display: grid; gap: 24px; margin-bottom: 48px; }
@media (min-width: 900px) {
  .stack-item { position: sticky; top: 100px; }
  .stack-item:nth-child(2) { top: 120px; }
  .stack-item:nth-child(3) { top: 140px; }
  .stack-item:nth-child(4) { top: 160px; }
}

.projects-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
.projects-grid .project-card { aspect-ratio: 4 / 3; }
@media (max-width: 800px) { .projects-grid { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.process-step { position: relative; padding: 28px 24px 110px; overflow: hidden; }
.process-dot {
  position: absolute; left: 50%; bottom: -90px; transform: translateX(-50%);
  width: 180px; height: 180px; border-radius: 50%;
  background: linear-gradient(180deg, #2a2a2a, #000); border: 1px solid var(--border);
  display: flex; justify-content: center; padding-top: 28px; font-size: 13px; color: var(--muted);
}
@media (max-width: 900px) { .process-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ / accordions ---------- */
.faq-list { display: grid; gap: 4px; }
.faq { border-bottom: 1px solid var(--border); }
.faq summary, .service-row summary {
  display: flex; align-items: center; gap: 16px; cursor: pointer; list-style: none;
}
.faq summary { justify-content: space-between; padding: 20px 0; font-weight: 500; }
.faq summary::-webkit-details-marker, .service-row summary::-webkit-details-marker { display: none; }
.faq p { color: var(--muted); padding-right: 48px; }
.faq-icon {
  position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border); margin-left: auto;
}
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: #fff;
  transform: translate(-50%, -50%); transition: transform .25s ease;
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
details[open] > summary .faq-icon { background: #fff; }
details[open] > summary .faq-icon::before { background: #000; }
details[open] > summary .faq-icon::after { transform: translate(-50%, -50%) rotate(0); opacity: 0; }

.service-accordion { display: grid; gap: 16px; margin-bottom: 48px; }
.service-row summary { padding: 28px clamp(20px, 3vw, 40px); }
.service-row-body { padding: 0 clamp(20px, 3vw, 40px) 32px; max-width: 820px; }
.price { display: inline-block; margin-top: 8px; padding: 8px 16px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { padding: 32px; display: flex; flex-direction: column; gap: 8px; }
.stat-value { font-size: clamp(48px, 6vw, 80px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }

/* ---------- CTA + forms ---------- */
.cta-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.cta-image { position: relative; min-height: 480px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.cta-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.85)); }
.cta-title { position: absolute; left: 32px; bottom: 32px; z-index: 1; font-size: clamp(36px, 4.5vw, 60px); }
.cta-form { padding: clamp(24px, 3vw, 36px); }
.cta-form h3 { margin-top: 0; margin-bottom: 24px; }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } .cta-image { min-height: 360px; } }

.contact-form { display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; font-size: 13px; font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: 12px 0; font: 15px var(--font-sans); color: var(--text);
  background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; outline: none; resize: vertical;
}
.field input:focus, .field textarea:focus { border-bottom-color: #fff; }
.field ::placeholder { color: #555; }

/* ---------- Inner page hero ---------- */
.page-hero { padding-block: 180px 64px; }
.page-hero .tags { margin-bottom: 8px; }
.contact-hero { background-image: linear-gradient(180deg, rgba(0,0,0,.55), #000), var(--bg); background-size: cover; background-position: center; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; }
.contact-grid .display { font-size: clamp(48px, 6.5vw, 96px); }
.contact-grid a { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.not-found { min-height: 70vh; display: grid; place-items: center; }

/* ---------- Case studies / articles ---------- */
.rounded-img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.rounded-img.wide { aspect-ratio: 16 / 8; object-fit: cover; }

.prose-grid, .prose { max-width: 860px; }
.prose-grid h2, .prose h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 56px 0 20px; }
.prose h3 { font-size: 22px; margin: 32px 0 12px; }
.prose-grid p, .prose p, .prose li { color: #bdbdbd; }
.prose-grid img, .prose img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); margin: 48px 0; }
.prose ul { list-style: disc; padding-left: 1.2em; margin-bottom: 1em; }
.prose li { margin-bottom: 4px; }
.prose blockquote { margin: 32px 0; padding: 24px 28px; border-left: 2px solid #fff; background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose blockquote p { color: #fff; font-size: 20px; margin: 0; }

.highlights { display: grid; gap: 12px; margin: 48px 0 32px; }
.highlights li { display: flex; gap: 12px; align-items: center; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.highlights li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; flex: none; }

/* ---------- Blog cards ---------- */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card { overflow: hidden; transition: transform .3s ease; }
.post-card:hover { transform: translateY(-4px); }
.post-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.post-card-body { padding: 24px; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 80px 32px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-label { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.footer-col p:not(.footer-label) { margin-bottom: 28px; font-size: 14px; }
.footer-links a { display: inline-block; font-size: clamp(20px, 2vw, 26px); padding: 4px 0; transition: opacity .2s; }
.footer-links a:hover { opacity: .6; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 64px; font-size: 12px; color: var(--muted); }
.footer-bottom p { margin: 0; }
.back-to-top { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.icon-circle { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Scroll-in animation ---------- */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.fade-up.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fade-up, .reveal-words .w { opacity: 1; transform: none; }
}
