/* ═══════════════════════════════════════════════════════
   BeBored — site.css
   Everything below the hero + service pages.
   Syne only. Narrow, centred content on white; the only
   element allowed to run edge to edge is the work carousel.
   ═══════════════════════════════════════════════════════ */
:root {
  --ink:    #000000;
  --paper:  #FFFFFF;
  --green:  #196246;
  --mint:   #ABD3AD;
  --line:   #E6E6E3;
  --muted:  rgba(0,0,0,0.55);
  --font-text: 'Syne', system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --narrow: 1080px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

.site {
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
.site img { display: block; }
.site a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.narrow {
  max-width: var(--narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Type */
.h-lead {
  font-weight: 500;
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  max-width: 17ch;
  margin: 0 auto;
  text-wrap: balance;
}
.t-small {
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 36ch;
  margin: 1.5rem auto 0;
}
.sec-title {
  font-size: 0.9375rem;
  font-weight: 500;
  margin: 0;
}
.sec-note {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
}
.text-link {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity .25s;
}
.text-link:hover { opacity: .5; }

/* Word masks (motion.js) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.w-rise { display: inline-block; will-change: transform; }

/* ─── Lead ─── */
.lead {
  padding: clamp(6rem, 11vw, 10rem) var(--gutter) clamp(4rem, 7vw, 6rem);
  text-align: center;
}
.rule {
  width: 1px;
  height: 4rem;
  background: currentColor;
  opacity: .3;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  transform-origin: top;
}

/* ─── Service list ─── */
.services { padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 9vw, 8rem); }
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding-bottom: 1.25rem;
}
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc-list li { border-bottom: 1px solid var(--line); }
.svc-row {
  display: grid;
  grid-template-columns: 1fr auto 1.5rem;
  align-items: center;
  gap: 2rem;
  padding: clamp(1.25rem, 2.4vw, 2rem) 0;
  color: inherit;
  text-decoration: none;
}
.svc-row__name {
  font-size: clamp(1.75rem, 3.6vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  transition: transform .6s var(--ease-out);
}
.svc-row__desc {
  font-size: 0.875rem;
  color: var(--muted);
  text-align: right;
  transition: color .3s;
}
.svc-row__icon {
  width: 1.25rem; height: 1.25rem;
  opacity: 0;
  transform: translateX(-0.5rem);
  transition: opacity .3s, transform .5s var(--ease-out);
}
.svc-row:hover .svc-row__name { transform: translateX(0.75rem); }
.svc-row:hover .svc-row__desc { color: var(--ink); }
.svc-row:hover .svc-row__icon { opacity: 1; transform: none; }

/* Image that follows the cursor over the list */
.svc-preview {
  position: fixed;
  top: 0; left: 0;
  width: 15rem;
  aspect-ratio: 4 / 5;
  margin: -9.4rem 0 0 -7.5rem;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
}
.svc-preview img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  clip-path: inset(0% 0% 100% 0%);
}

/* ─── Work carousel (the one full-width element) ─── */
.work { padding: clamp(4rem, 7vw, 6rem) 0; overflow: hidden; }
.work .sec-head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); }
.work__track {
  display: flex;
  align-items: flex-start;
  gap: clamp(1rem, 2vw, 1.75rem);
  padding: 0 var(--gutter);
  width: max-content;
}
.case { flex: none; display: block; color: inherit; text-decoration: none; }
.case__media { overflow: hidden; background: var(--line); }
.case__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.case:hover .case__media img { transform: scale(1.04); }
.case--a { width: clamp(15rem, 24vw, 23rem); }
.case--a .case__media { aspect-ratio: 4 / 5; }
.case--b { width: clamp(12rem, 16vw, 15rem); margin-top: clamp(3rem, 8vh, 6rem); }
.case--b .case__media { aspect-ratio: 3 / 4; }
.case--c { width: clamp(17rem, 30vw, 28rem); margin-top: clamp(1.5rem, 4vh, 3rem); }
.case--c .case__media { aspect-ratio: 3 / 2; }
.case__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.7rem;
  font-size: 0.8125rem;
}
.case__title { font-weight: 600; }
.case__cat { color: var(--muted); }

/* ─── About (narrow, centred) ─── */
.about {
  padding: clamp(6rem, 10vw, 9rem) var(--gutter);
  text-align: center;
}
.about .text-link { margin-top: 2rem; }

/* ─── Contact (narrow, centred, on white) ─── */
.contact {
  padding: clamp(5rem, 9vw, 8rem) var(--gutter) clamp(6rem, 10vw, 9rem);
  text-align: center;
}
.contact .h-lead { margin-bottom: 2rem; }
.contact__social {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
  font-size: 0.875rem;
}
.contact__social a { color: var(--muted); text-decoration: none; }
.contact__social a:hover { color: var(--ink); }

/* ─── Footer ─── */
.site-footer {
  font-family: var(--font-text);
  font-size: 0.8125rem;
  color: var(--muted);
  background: var(--paper);
}
.site-footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding-top: 1.75rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--line);
}
.site-footer__logo img { height: 18px; width: auto; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin: 0; padding: 0; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer__copy { margin: 0; }

/* ═══ Service page ═══ */
.page-light .nav { color: var(--ink); }
.page-light .nav__links a { color: rgba(0,0,0,.6); }
.page-light .nav__links a:hover { color: #000; }
.page-light .nav__logo img { filter: none; }
.page-light .nav__hamburger span { background: #000; }

.svc-hero {
  padding: clamp(9rem, 16vw, 13rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  text-align: center;
}
.svc-hero__back { font-size: 0.875rem; color: var(--muted); text-decoration: none; }
.svc-hero__back:hover { color: var(--ink); }
.svc-hero__title {
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 1.5rem 0 0;
}
.svc-hero .t-small { margin-top: 1.75rem; }

.figure {
  max-width: var(--narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.figure__frame { overflow: hidden; aspect-ratio: 16 / 9; background: var(--line); }
.figure__frame img { width: 100%; height: 100%; object-fit: cover; }

.parts { padding: 0 0 clamp(4rem, 8vw, 7rem); }
.part {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.part:first-child { border-top: 1px solid var(--line); }
.part__title {
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0;
}
.part__text { font-size: 0.9375rem; color: var(--muted); margin: 0; max-width: 40ch; }

.next-link {
  display: block;
  text-align: center;
  padding: clamp(4rem, 8vw, 7rem) var(--gutter) clamp(5rem, 9vw, 8rem);
  color: inherit;
  text-decoration: none;
}
.next-link__label { font-size: 0.875rem; color: var(--muted); }
.next-link__title {
  display: block;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-top: 1rem;
  transition: opacity .3s;
}
.next-link:hover .next-link__title { opacity: .5; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .svc-row { grid-template-columns: 1fr 1.25rem; gap: 0.4rem 1rem; }
  .svc-row__desc { grid-row: 2; text-align: left; }
  .svc-row__icon { opacity: 1; transform: none; grid-row: 1; grid-column: 2; }
  .work__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .work__track::-webkit-scrollbar { display: none; }
  .case { scroll-snap-align: start; }
  .case--a { width: 70vw; }
  .case--b { width: 54vw; }
  .case--c { width: 80vw; }
  .part { grid-template-columns: 1fr; gap: 0.5rem; }
}

@media (hover: none), (pointer: coarse) {
  .svc-preview { display: none; }
}

/* ─── Editor content (pages, services) ─── */
.entry-content {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(5rem, 9vw, 8rem);
  max-width: 760px;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.entry-content > * + * { margin-top: 1.25em; }
.entry-content h2, .entry-content h3 {
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-top: 2em;
}
.entry-content h2 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); }
.entry-content h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); }
.entry-content a { color: var(--green); }
.entry-content img { max-width: 100%; height: auto; }
.entry-content ul, .entry-content ol { padding-left: 1.25em; }
.entry-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.entry-list li { border-bottom: 1px solid var(--line); }
.entry-list a { display: block; padding: 1.25rem 0; font-size: 1.375rem; font-weight: 500; letter-spacing: -0.03em; color: inherit; text-decoration: none; }
.entry-list a:hover { opacity: .55; }
.hero__explore { text-decoration: none; }
.stack-card__visual img { display: block; }
