/* ============================================================
   Home — Swiss grid
   Uses the palette variables defined in extra.css, so both
   lightanelia and darkanelia schemes work without extra rules.
   ============================================================ */

.sw-home {
  padding: 2rem 1rem 4rem;
  font-family: var(--md-text-font);
  color: var(--md-typeset-color);
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.sw-hero {
  margin-top: 1.5rem;
}

.sw-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--md-default-fg-color);
}

.sw-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
}

.sw-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--md-default-fg-color);
  max-width: 24ch;
  margin: 2.4rem 0 0;
}

.sw-sub {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--md-default-fg-color--light);
  max-width: 44ch;
  margin: 1.4rem 0 0;
}

/* Spec table */

.sw-spec {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 2.8rem 0 0;
  border-top: 1px solid var(--graphic-lines);
}

.sw-spec-cell {
  padding: 0.9rem 1rem 0.9rem 0;
}

.sw-spec-cell + .sw-spec-cell {
  padding-left: 1rem;
  border-left: 1px solid var(--graphic-lines);
}

.sw-spec dt {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--lightest);
  margin: 0 0 0.3rem;
}

.sw-spec dd {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--md-default-fg-color);
  margin: 0;
}

.sw-status-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--success);
  margin-right: 0.35rem;
  vertical-align: 1px;
}

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */

.sw-section {
  margin-top: 4.5rem;
}

.sw-section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 2px solid var(--md-default-fg-color);
  margin-bottom: 1.6rem;
}

.sw-num {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--md-default-fg-color--lightest);
}

.sw-section-head h2 {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--md-default-fg-color);
  margin: 0;
}

.sw-head-link {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
  text-decoration: none;
  border-bottom: 1px solid var(--graphic-lines);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.sw-head-link:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ------------------------------------------------------------
   01 — Work index
   ------------------------------------------------------------ */

.sw-work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.6rem 1.5rem;
}

.sw-work-card {
  display: block;
  text-decoration: none;
  color: var(--md-default-fg-color);
}

.sw-work-card--featured {
  grid-column: 1 / -1;
}

.sw-work-img {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--graphic-background);
}

.sw-work-card--featured .sw-work-img {
  aspect-ratio: 21 / 9;
}

.sw-work-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.sw-work-card:hover .sw-work-img img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.sw-work-meta {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--graphic-lines);
  transition: border-color 0.2s ease;
}

.sw-work-card:hover .sw-work-meta {
  border-top-color: var(--primary);
}

.sw-work-n {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--md-default-fg-color--lightest);
}

.sw-work-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
}

.sw-work-card--featured .sw-work-title {
  font-size: 1.5rem;
}

.sw-work-cat,
.sw-work-year {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--lightest);
  white-space: nowrap;
}

/* ------------------------------------------------------------
   02 — Client logos
   ------------------------------------------------------------ */

.sw-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 1px;
  background: var(--graphic-lines);
  border: 1px solid var(--graphic-lines);
}

.sw-logo-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--md-default-bg-color);
  padding: 1.6rem 1.2rem;
  min-height: 5rem;
}

.sw-logo-cell .svg-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(100%);
  opacity: 0.65;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.sw-logo-cell:hover .svg-icon {
  filter: grayscale(0%);
  opacity: 1;
}

.sw-logo-cell svg {
  max-height: 1.8rem;
  max-width: 6.5rem;
  width: auto;
  height: auto;
  color: var(--md-default-fg-color);
}

.sw-logo-cell svg,
.sw-logo-cell svg * {
  fill: currentColor !important;
}

/* ------------------------------------------------------------
   03 — Capabilities
   ------------------------------------------------------------ */

.sw-cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.sw-cap h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--md-default-fg-color);
  margin: 0 0 0.5rem;
}

.sw-cap p {
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--md-default-fg-color--light);
  margin: 0;
}

.sw-tools {
  margin: 2rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--graphic-lines);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--lightest);
}

/* ------------------------------------------------------------
   04 — About
   ------------------------------------------------------------ */

.sw-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr;
  gap: 2rem;
  align-items: start;
}

.sw-about {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 550;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--md-default-fg-color);
  margin: 0;
  max-width: 32ch;
}

.sw-about-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  justify-self: end;
}

.sw-about-links a {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
  text-decoration: none;
  border-bottom: 1px solid var(--graphic-lines);
  padding-bottom: 0.15rem;
  width: fit-content;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.sw-about-links a:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.sw-photo-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--graphic-lines);
  border: 1px solid var(--graphic-lines);
  margin-top: 2.2rem;
}

.sw-photo {
  display: block;
  aspect-ratio: 3 / 4;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.sw-photo:hover {
  filter: grayscale(0%);
}

/* ------------------------------------------------------------
   05 — Contact
   ------------------------------------------------------------ */

.sw-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--md-default-fg-color);
  text-decoration: none;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 0.2rem;
  transition: color 0.15s ease;
  word-break: break-all;
}

.sw-email:hover {
  color: var(--primary);
}

.sw-langs {
  margin: 1.2rem 0 0;
  font-size: 0.72rem;
  color: var(--md-default-fg-color--light);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media screen and (max-width: 60rem) {
  .sw-spec {
    grid-template-columns: repeat(3, 1fr);
  }

  .sw-spec-cell {
    border-top: 1px solid var(--graphic-lines);
    margin-top: -1px;
  }

  .sw-spec-cell:nth-child(3n + 1) {
    border-left: none;
    padding-left: 0;
  }

  .sw-work-cat {
    display: none;
  }
}

@media screen and (max-width: 40rem) {
  .sw-hero-top {
    flex-direction: column;
    gap: 0.2rem;
  }

  .sw-spec {
    grid-template-columns: repeat(2, 1fr);
  }

  .sw-spec-cell:nth-child(3n + 1) {
    border-left: 1px solid var(--graphic-lines);
    padding-left: 1rem;
  }

  .sw-spec-cell:nth-child(2n + 1) {
    border-left: none;
    padding-left: 0;
  }

  .sw-work-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sw-work-card--featured .sw-work-img {
    aspect-ratio: 3 / 2;
  }

  .sw-work-card--featured .sw-work-title {
    font-size: 1.1rem;
  }

  .sw-photo-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .sw-cap-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .sw-about-grid {
    grid-template-columns: 1fr;
  }

  .sw-about-links {
    justify-self: start;
    flex-direction: row;
    gap: 1.4rem;
  }
}
