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

html, body {
  background: #ffffff;
  color: #000000;
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Header ---------- */
.site-header {
  padding: 56px 68px 0;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.logo {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1;
  color: #000000;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 13px;
}

.social-icons img {
  display: block;
}

.social-icons a:hover {
  opacity: 0.65;
}

/* ---------- Layout shell ---------- */
.home {
  padding: 40px 68px 96px;
}

.home-inner {
  display: flex;
  align-items: stretch;
  gap: 48px;
}

/* ---------- Timeline ---------- */
.timeline {
  /* Grows continuously with the viewport past ~1620px instead of
     jumping at one breakpoint, plateauing at 380px — same clamp()
     expression as .page-sidebar's in case-study.css, so the two stay
     pixel-identical at every width (no size jump between pages).
     Scaled down from the original 406/25vw/640 in five earlier passes
     (370/22vw/580, 330/20vw/520, 300/18vw/470, 270/16vw/420,
     245/14.5vw/380), then widened back up slightly on the minimum
     only (245 -> 300) so the longest timeline-item titles (e.g.
     "Laundry Service App Re-Design") have enough room to stay on
     one line instead of wrapping — see .timeline-title's
     white-space: nowrap below. */
  flex: 0 0 clamp(300px, 14.5vw, 380px);
  max-width: clamp(300px, 14.5vw, 380px);
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: flex;
  width: 100%;
  gap: 20px;
  padding: 24px 24px 0;
  margin: 0 -24px;
  background: transparent;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}

.timeline-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 26px;
  flex-shrink: 0;
}

.timeline-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #CFD6DC;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.timeline-dot svg {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.timeline-connector {
  width: 1px;
  flex: 1;
  min-height: 60px;
  background: #D5D4CD;
  margin-top: 4px;
  transition: background-color 0.15s ease;
}

.timeline-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 24px;
}

.timeline-role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.8px;
  color: #73766F;
}

.timeline-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #292B29;
  transition: color 0.15s ease;
  /* Stays on one line at the widened sidebar minimum above; mobile
     restores normal wrapping below since the timeline goes full-width
     there anyway. */
  white-space: nowrap;
}

.timeline-company {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: #73766F;
}

/* Hover — State=Hover in the Figma component:
   dot fills light gray, title dims to secondary gray */
.timeline-item:hover .timeline-dot {
  background: #CFD6DC;
  border-color: #ffffff;
}

.timeline-item:hover .timeline-title {
  color: #666666;
}

/* Selected — State=Selected in the Figma component:
   row gets a cream background, dot + connector go black */
.timeline-item.is-selected {
  background: #F8F7F3;
}

.timeline-item.is-selected .timeline-dot {
  background: #000000;
  border-color: #ffffff;
}

.timeline-item.is-selected .timeline-dot svg {
  opacity: 1;
}

.timeline-item.is-selected .timeline-connector {
  background: #000000;
}

.timeline-item.is-selected .timeline-title {
  color: #292B29;
}

/* ---------- Hero ---------- */
/* .hero stretches to the full height/width of the white space the timeline
   isn't using (align-items: stretch on .home-inner gives it that height),
   and centers .hero-block inside it on both axes — that's "the remaining
   white space", and the block sits in the middle of it.
   .hero-block is the single scaling unit: photo + headline are sized in
   `em` off its own font-size (clamp()), so as the page grows the block
   enlarges as one piece, at fixed ratios, rather than the photo and text
   scaling independently. The block is content-sized (not stretched), so
   flex centering keeps it in the middle as it grows. */
.hero {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-block {
  font-size: clamp(36px, 4.5vw, 66px);
  /* Mirrors the ~521px/60px frame-width-to-font-size ratio in Figma, so
     the block's own width scales in lockstep with its font-size. */
  max-width: 8.68em;
}

/* Floated first, at the very top of the block, so the photo always sits
   on the same line as the headline's first word ("Developing") — a CSS
   float aligns to the top of the content it's placed in front of. */
.hero-photo {
  float: right;
  width: 1.8em;
  height: auto;
  margin: 0 0 0.3em 0.02em;
  shape-outside: margin-box;
}

.hero-text {
  max-width: 100%;
}

.headline {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 1em;
  line-height: 1.15;
  color: #000000;
}

/* Keep "Digitally and physically." together on one line in web format,
   as long as there's realistically room for it — right up against the
   mobile breakpoint, where the hero column gets very narrow, let it wrap
   normally again so the phrase doesn't overflow its box. */
.nowrap {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .nowrap {
    white-space: normal;
  }
}

.credit {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #666666;
  margin-top: 16px;
  clear: right;
}

/* ================================================
   Mobile — matches the "mobile, home" Figma frame:
   header, then photo + headline side by side, then timeline.
   (The mobile headline is a separate, smaller node in Figma —
   24px, no "created by" credit line.)
   ================================================ */
@media (max-width: 767px) {

  .site-header {
    padding: 32px 30px 0;
  }

  .brand {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0;
  }

  .home {
    padding: 0 30px 64px;
  }

  .home-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  /* Photo + headline sit side by side above the timeline on mobile
     (matches Frame 129 in "mobile, home": photo left, text right,
     43px gap, no float/wrap and no credit line). No centering on
     mobile — the row just sits at the top, full width. */
  .hero {
    order: -1;
    justify-content: flex-start;
    padding-top: 24px;
  }

  .hero-block {
    display: flex;
    align-items: flex-start;
    gap: 43px;
    font-size: 30px;
    max-width: none;
    width: 100%;
  }

  .hero-photo {
    float: none;
    width: 108px;
    flex-shrink: 0;
    margin: 0;
  }

  .hero-text {
    max-width: none;
    padding-top: 4px;
  }

  .headline {
    font-size: 1em;
    line-height: 1.3;
  }

  /* The "created by" credit line isn't part of the mobile design */
  .credit {
    display: none;
  }

  .timeline {
    flex: 1 1 auto;
    max-width: 100%;
    margin-top: 24px;
  }

  /* Mobile has the full-width timeline (no cramped sidebar column),
     so titles go back to wrapping normally instead of forcing a
     single line. */
  .timeline-title {
    white-space: normal;
  }
}

/* ================================================
   Large / expanded web states — the timeline ("scroll
   system") scales up slightly rather than staying pinned
   at its normal-desktop size while everything else grows,
   so it keeps a sensible proportion to the wider page and
   the window doesn't read as mostly empty space. Shared
   sizing with case-study.css's equivalent block below so
   the timeline is still pixel-identical across every page
   at this width, too — no size jump on navigation.
   ================================================ */
@media (min-width: 1600px) {
  .timeline-item {
    padding: 28px 28px 0;
    margin: 0 -28px;
  }

  .timeline-status {
    width: 28px;
  }

  .timeline-dot {
    width: 28px;
    height: 28px;
  }

  .timeline-connector {
    min-height: 66px;
  }

  .timeline-copy {
    gap: 10px;
    padding-bottom: 28px;
  }

  .timeline-role {
    font-size: 11px;
    letter-spacing: 0.9px;
  }

  /* No font-size bump for .timeline-title here (unlike the other
     timeline metrics above) — it stays 14px so the longest titles
     keep fitting on one line (white-space: nowrap) even once the
     sidebar's own vw-based growth outpaces its 300px floor. */

  .timeline-company {
    font-size: 13px;
  }
}
