/* wallbreak — site styles
   font: SLTF Dessign Maison (SilverStag Type Foundry), self-hosted.
   palette: ink #101a21 on a muted blue #b2c4c8 (the figma #d7eef2 @ 80%). */

@font-face {
  font-family: "SLTF Dessign Maison";
  /* web formats only (woff2 + woff cover all modern browsers); the raw .otf
     source is intentionally NOT shipped to the public site. */
  src:
    url("fonts/SLTFDessignMaison-Regular.woff2") format("woff2"),
    url("fonts/SLTFDessignMaison-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #b2c4c8;
  --ink: #101a21;
  --ink-soft: color-mix(in oklab, var(--ink) 66%, var(--bg));
  --font: "SLTF Dessign Maison", "Iowan Old Style", Georgia, serif;

  /* emil: strong custom curves, never the weak built-ins */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-out-strong: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

/* ---------- the wordmark: "wall" breaks open, "break" stays whole ---------- */

.wordmark {
  margin: 0;
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-feature-settings: "ss02" 1;
  white-space: nowrap;
  color: var(--ink);
}

/* "wall" is the wall: outlined, hollow, on the verge of giving way */
.wm-wall {
  color: rgba(16, 26, 33, 0.16); /* fallback if text-stroke unsupported */
}
@supports (-webkit-text-stroke: 1px #000) {
  .wm-wall {
    color: transparent;
    -webkit-text-stroke: 0.014em var(--ink);
  }
}

/* "break" is solid and stylized — the foundry's swash set, ligatures off */
.wm-break {
  color: var(--ink);
  letter-spacing: -0.0075em;
  font-feature-settings: "ss01" 1, "ss02" 1, "liga" 0;
}

.ss01 {
  font-feature-settings: "ss01" 1;
}

/* ---------- home ---------- */

body.home {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem;
}

.stage .wordmark {
  font-size: clamp(3.25rem, 13vw, 8rem);
}

.tagline {
  margin: 0.32em 0 0;
  font-size: clamp(1.05rem, 3.1vw, 2rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* the dashed CTA box from the comp */
.cta {
  margin-top: clamp(1.5rem, 3.2vw, 2.5rem);
  width: min(13.3rem, 72vw);
  height: 4.75rem;
  display: grid;
  place-items: center;
  border: 1.5px dashed var(--ink);
  text-decoration: none;
  color: var(--ink);
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms var(--ease-out),
    border-color 200ms var(--ease-out);
}

.cta-arrow {
  font-size: 2.5rem;
  line-height: 1;
  transition: transform 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .cta:hover {
    background-color: rgba(16, 26, 33, 0.06);
    border-style: solid;
  }
  .cta:hover .cta-arrow {
    transform: translateX(5px);
  }
}

.cta:active {
  transform: scale(0.97);
}

.cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

/* footer band, sized to sit under the wordmark column like the comp */
.footer {
  display: flex;
  justify-content: center;
  /* keep it clear of the bottom edge on short and tall viewports alike */
  padding-block: clamp(1.5rem, 4vh, 2.5rem) clamp(3rem, 8vh, 5.5rem);
  padding-inline: 1.25rem;
}

.footer-inner {
  width: min(28rem, 100%);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
}

.byline {
  margin: 0;
  font-size: 1.25rem;
  color: var(--ink);
}

.other-projects {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* text links with an underline that grows from the left on hover */
.link {
  position: relative;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.12em;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-out);
}

.link .arrow {
  display: inline-block;
  transition: transform 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .link:hover::after {
    transform: scaleX(1);
  }
  .link:hover .arrow {
    transform: translateX(4px);
  }
  .link:hover .arrow.back {
    transform: translateX(-4px);
  }
}

.link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- entrance: a quiet staggered rise ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  animation: rise 760ms var(--ease-out-strong) both;
}
.reveal.d1 { animation-delay: 80ms; }
.reveal.d2 { animation-delay: 200ms; }
.reveal.d3 { animation-delay: 320ms; }
.reveal.d4 { animation-delay: 440ms; }

/* ---------- the wall-smash intro (home) ----------
   when JS will play the smash, hold the hero hidden (intro.js reveals it through the
   breach). a pure-CSS failsafe un-hides it if intro.js never runs. */
html.smash-intro .stage > *,
html.smash-intro .footer {
  opacity: 0;
  animation: smash-failsafe 600ms 2400ms var(--ease-out) forwards;
}
@keyframes smash-failsafe {
  to { opacity: 1; }
}

.smash-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}
.smash-stage svg {
  position: absolute;
  width: min(700px, 92vw);
  height: auto;
  overflow: visible;
}
.smash-brick {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
  .smash-stage { display: none !important; }
  html.smash-intro .stage > *,
  html.smash-intro .footer { animation: none; opacity: 1; }
}

/* ---------- case study ---------- */

body.study {
  line-height: 1.6;
}

.page {
  max-width: 40rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 3rem) 1.5rem clamp(4rem, 10vh, 7rem);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin-bottom: clamp(3rem, 12vh, 7rem);
}

.study-head .kicker {
  margin: 0 0 0.6rem;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.study-head .wordmark {
  font-size: clamp(2.5rem, 9vw, 4.5rem);
}

.lead {
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 32rem;
  color: var(--ink);
}

.study section {
  margin-top: clamp(2.75rem, 7vw, 4.5rem);
}

.study h2 {
  margin: 0 0 0.9rem;
  font-weight: 400;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.study p {
  margin: 0 0 1.05rem;
  font-size: 1.1875rem;
  max-width: 36rem;
  color: var(--ink);
}

.study p:last-child {
  margin-bottom: 0;
}

.study .pull {
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  max-width: 32rem;
}

.study strong {
  font-weight: 400;
  font-feature-settings: "ss01" 1;
}

.spec {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.25rem;
  font-size: 1.0625rem;
  color: var(--ink);
}
.spec dt {
  color: var(--ink-soft);
  white-space: nowrap;
}
.spec dd {
  margin: 0;
}

/* ---------- alternating stylistic sets (the font's ss01 / ss02 alternates) ---------- */
/* used to give highlights, category labels, and list items visual rhythm */
.alt1 { font-feature-settings: "ss01" 1; }
.alt2 { font-feature-settings: "ss02" 1; }

/* category labels in the stack list flip between the two alternate sets */
.spec dt:nth-child(4n + 1) { font-feature-settings: "ss01" 1; }
.spec dt:nth-child(4n + 3) { font-feature-settings: "ss02" 1; }

/* labelled lists: each row's tag alternates set, so a list reads as a pattern */
.feature-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  max-width: 36rem;
}
.feature-list li {
  display: flex;
  gap: 0.85rem;
  align-items: baseline;
  font-size: 1.0625rem;
}
.feature-list .tag {
  min-width: 6.5rem;
  white-space: nowrap;
  color: var(--ink-soft);
}
.feature-list li:nth-child(odd) .tag { font-feature-settings: "ss01" 1; }
.feature-list li:nth-child(even) .tag { font-feature-settings: "ss02" 1; }
.feature-list.no .tag { color: var(--ink); text-decoration: line-through; text-decoration-thickness: 1px; }

.study-foot {
  margin-top: clamp(3.5rem, 9vw, 6rem);
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in oklab, var(--ink) 22%, transparent);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 1.0625rem;
}

/* inline code in prose: stay on-brand (no monospace costume), just a soft tint */
.study code {
  font-family: inherit;
  font-size: 0.94em;
  padding: 0.05em 0.32em;
  background: color-mix(in oklab, var(--ink) 9%, transparent);
  border-radius: 3px;
}

/* scroll-reveal for case-study sections.
   gated behind .js so a no-JS visitor sees everything (added by the head script). */
.js .io {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 600ms var(--ease-out),
    transform 600ms var(--ease-out);
  will-change: opacity, transform;
}
.js .io.in {
  opacity: 1;
  transform: none;
}

/* ---------- reduced motion: keep fades, drop the movement ---------- */

@media (prefers-reduced-motion: reduce) {
  @keyframes rise {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .reveal { animation-duration: 400ms; }
  .js .io {
    transform: none;
    transition: opacity 400ms ease;
  }
  .cta:hover .cta-arrow,
  .link:hover .arrow {
    transform: none;
  }
  .cta:active {
    transform: none;
  }
}

@media (max-width: 30rem) {
  .topbar {
    margin-bottom: 3rem;
  }
}
