/* Shared primitives used by all three homepage directions + case study.
   Each direction sets its own CSS custom properties for palette/type; these
   rules consume them. */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif);
  color: var(--ink, #1a1a1a);
  background: var(--bg, #ffffff);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

/* Typographic tokens — overridden per direction */
.display {
  font-family: var(--font-display, var(--font-body));
  font-weight: var(--display-weight, 500);
  letter-spacing: var(--display-tracking, -0.02em);
  line-height: var(--display-leading, 1.02);
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted, #7a7468);
}

/* Layout primitives */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 48px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 2px;
  border: 1px solid transparent;
  background: var(--accent, #2a2a2a);
  color: var(--accent-ink, #ffffff);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink, #1a1a1a);
  border-color: currentColor;
}
.btn-link {
  background: transparent;
  color: inherit;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  padding-bottom: 3px;
}

.arrow-r::after {
  content: "→";
  margin-left: 0.4em;
  display: inline-block;
  transition: transform .2s ease;
}
.btn:hover .arrow-r::after,
a:hover > .arrow-r::after { transform: translateX(3px); }

/* Rule */
hr.rule {
  border: 0;
  border-top: 1px solid var(--rule, rgba(0,0,0,.08));
  margin: 0;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: var(--nav-bg, rgba(255,255,255,.82));
  border-bottom: 1px solid var(--rule, rgba(0,0,0,.06));
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  max-width: 1440px;
  margin: 0 auto;
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 13px;
  letter-spacing: 0.02em;
  align-items: center;
}
.nav-links a { opacity: 0.72; transition: opacity .15s ease; }
.nav-links a:hover { opacity: 1; }
.nav-link-with-caret {
  display: inline-flex;
  align-items: center;
}

/* Sticky footer — every page is a min-height flex column, main flexes to fill,
   footer sits at the bottom flush against the artboard's bottom edge. */
.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.page-main {
  flex: 1 0 auto;
}
.page-shell > .site-footer {
  flex: 0 0 auto;
}

/* Footer */
.site-footer {
  padding: 64px 48px 32px;
  border-top: 1px solid var(--rule, rgba(0,0,0,.08));
  background: var(--footer-bg, transparent);
}
.site-footer .foot-row {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.site-footer h4 {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted, #7a7468);
  margin: 0 0 18px;
  font-weight: 500;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer ul a { color: inherit; text-decoration: none; opacity: 0.78; transition: opacity .18s ease; }
.site-footer ul a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* Contact form — filled grey rectangles, labels above */
.acb-form { display: flex; flex-direction: column; gap: 24px; }
.acb-form .acb-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: inherit;
}
.acb-form .acb-label {
  font-size: 15px;
  color: var(--ink, #1a1a1a);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.acb-form .acb-req { color: var(--ink, #1a1a1a); margin-left: 2px; }
.acb-form input,
.acb-form textarea {
  border: 1px solid transparent;
  background: #f1efea;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink, #1a1a1a);
  outline: none;
  transition: border-color .18s ease, background .18s ease;
  width: 100%;
  resize: vertical;
  border-radius: 2px;
}
.acb-form input { height: 48px; }
.acb-form textarea {
  line-height: 1.55;
  min-height: 130px;
}
.acb-form input:focus,
.acb-form textarea:focus {
  border-color: var(--ink, #1a1a1a);
  background: #ebe9e3;
}
.acb-form input::placeholder,
.acb-form textarea::placeholder {
  color: #a8a39a;
  font-style: normal;
}
.acb-submit {
  background: #0f0d0b;
  color: #fff;
  border: 0;
  padding: 14px 32px;
  font-size: 14px;
  font-family: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  margin-top: 8px;
  transition: background .18s ease;
  border-radius: 2px;
}
.acb-submit:hover { background: #2a2521; }

/* Dark footer variant — black band, mirrors the top nav */
.site-footer--dark {
  background: #0f0d0b;
  color: #f6f3ed;
  border-top: none;
}
.site-footer--dark .site-footer,
.site-footer--dark a,
.site-footer--dark span,
.site-footer--dark svg { color: #f6f3ed; }
.site-footer--dark h4 {
  color: rgba(255,255,255,.55);
}
.site-footer--dark ul a { color: #f6f3ed; opacity: 0.78; }
.site-footer--dark ul a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.site-footer--dark .foot-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
}
.site-footer .foot-bottom {
  max-width: 1440px;
  margin: 64px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule, rgba(0,0,0,.06));
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted, #7a7468);
}

/* Utility */
.u-grain {
  position: relative;
}
.u-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Reveal on scroll — subtle */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .9s ease, transform .9s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Kill scrollbars inside artboards (DesignCanvas already handles the cards) */
.mini-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.mini-scrollbar::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 3px; }
