/* ─────────────────────────────────────────────────────────
   SITE — styles every page shares (homepage + case pages)
   Load after tokens.css, before the page's own <style>.
   ───────────────────────────────────────────────────────── */

/* ─── Reset ─────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }


/* ─── Focus ─────────────────────────────────────── */
/* Baseline keyboard ring for anything interactive. Zero specificity
   (:where) so every component's own :focus-visible rule still wins. */
:where(a, button, summary, input, select, textarea, [tabindex]:not([tabindex="-1"])):where(:focus-visible) {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* "Skip to content": first stop on Tab, off-screen until focused */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000; /* above the navbar (100) and mobile gate (9999) */
  padding: 10px 16px;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; outline-color: var(--color-text); }
#main:focus { outline: none; } /* skip-link target: no ring around the whole page */


/* ─── Layout ────────────────────────────────────── */
.layout {
  width: 100%;
  max-width: var(--layout-max);
  margin-inline: auto;
  padding-inline: var(--layout-margin);
  box-sizing: border-box;
}


/* ─── NAV (homepage + case pages) ───────────────── */
.nav-logo svg { width: 100%; height: 100%; display: block; }


/* ─── WORK CARDS (homepage + "Don't miss it") ───── */

.card-title {
  font-size: 24px;
  font-weight: 500;
  color: var(--color-black);
  line-height: 1.25;
  letter-spacing: -0.005em;
}

.card-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-neutral-800);
  line-height: 1.55;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: -16px;
  background: var(--color-surface-hover);
  border-radius: var(--radius-hover);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
  z-index: -1;
}

.work-card:hover::before { opacity: 1; }

.media .cta {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -42%);
  background: var(--color-accent);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 12px 18px;
  border-radius: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .35s cubic-bezier(.2,.7,.2,1);
  white-space: nowrap;
  z-index: 2;
}


/* ─── FOOTER ─────────────────────────────────────── */

.footer .layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.footer-top { margin-bottom: 80px; }

.footer-logo {
  display: inline-flex;
  width: 56px;
  height: 56px;
  color: var(--color-white);
}
.footer-logo svg { width: 56px; height: 56px; display: block; }

.footer-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.link-groups { display: flex; gap: 80px; }

.group-title {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-white);
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-white);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease;
  padding: 2px 0;
  width: fit-content;
}
.footer-link:hover,
.footer-link:focus-visible { text-decoration-color: var(--color-white); }

.footer-link .arrow {
  display: inline-flex;
  width: 18px;
  height: 18px;
  transition: transform 0.25s cubic-bezier(.4,.2,.2,1);
}
.footer-link:hover .arrow,
.footer-link:focus-visible .arrow { transform: translate(2px, -2px); }
.footer-link .arrow svg { width: 18px; height: 18px; display: block; }

.copyright {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-white);
  line-height: 1;
}


/* ─── Mobile viewport gate (< 1000px) ────────────────
   The responsive layout is still in progress, so on any
   viewport narrower than 1000px we cover the page with a
   full-screen "come back on desktop" card. Hidden from
   1000px up — safely below the ~1280px laptop floor, so
   the real site always renders on desktops and laptops. */
/* Read by search engines and screen readers, invisible on screen */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mobile-gate { display: none; }

@media (max-width: 999px) {
  .mobile-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    background: var(--color-tech-green);
    overflow: hidden;
  }

  .mobile-gate__photo {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% 22%;
  }

  .mobile-gate__card {
    position: relative;
    z-index: 1;
    margin-top: -34px;
    padding: 40px 32px 34px;
    background: var(--color-tech-green);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    text-align: center;
  }

  .mobile-gate__title {
    font-family: "Work Sans", system-ui, sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-bg);
    margin-bottom: 14px;
  }

  .mobile-gate__body {
    font-family: "Work Sans", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-bg);
    opacity: 0.82;
    max-width: 32ch;
    margin-inline: auto;
  }

  .mobile-gate__footer {
    flex: 0 0 auto;
    padding: 18px 24px calc(18px + env(safe-area-inset-bottom));
    background: var(--color-harmony-green);
    text-align: center;
  }

  .mobile-gate__footer-text {
    font-family: "Work Sans", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-tech-green);
  }

  /* hide the half-built desktop layout entirely so it can't force
     horizontal overflow behind the gate — the gate is all that shows */
  body > *:not(.mobile-gate) { display: none; }
  body { overflow: hidden; }
}
