/* ============================================================
   QueueMetrics — Brand Identity System (branding case study)
   Built from Figma "Branding - Case Study - QueueMetrics"
   Brand: Loway oranges on Google Sans Flex.
   ============================================================ */

:root {
  --qm-primary: #ff640a;
  --qm-secondary: #ff8632;
  --qm-ink: #393e46;
  --qm-sub: #5c6d7e;
  --qm-faint: #e3e8ea;
  --qm-dark: #212832;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Google Sans Flex", "Golos Text", sans-serif;
  color: var(--qm-ink);
  background: #fff;
}

img {
  display: block;
}

.page {
  position: relative;
  overflow: clip;
}

/* Decorative brand curves behind the upper sections */
.bg-line {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.bg-line--right {
  left: calc(50% + 100px);
  top: 740px;
  width: 1447px;
  max-width: none;
}

.bg-line--left {
  left: calc(50% - 1540px);
  top: 1960px;
  width: 1330px;
  max-width: none;
}

.home-link {
  position: absolute;
  left: 40px;
  top: 24px;
  z-index: 5;
  font-family: "Google Sans Code", monospace;
  font-size: 16px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--qm-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease;
}

.home-link:hover {
  transform: translateX(-3px);
}

.wrap {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Shared type ---------- */

.qm-h {
  margin: 0;
  font-size: 40px;
  font-weight: 500;
  line-height: normal;
  color: var(--qm-ink);
}

.qm-lead {
  margin: 40px 0 0;
  max-width: 772px;
  font-size: 24px;
  line-height: 1.5;
}

.qm-body {
  margin: 40px 0 0;
  font-size: 20px;
  line-height: 1.5;
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 120px;
  padding: 80px 24px;
  background: rgba(255, 134, 50, 0.2);
}

.hero-tag {
  margin: 0;
  font-size: 32px;
  letter-spacing: 3.2px;
  color: var(--qm-primary);
  text-align: center;
}

.hero-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.hero-logo img {
  width: 317px;
  height: 262px;
}

.hero-year {
  margin: 0;
  font-size: 20px;
  letter-spacing: 20px;
  text-indent: 20px;
  color: var(--qm-secondary);
}

/* ---------- About ---------- */

.qm-about {
  position: relative;
  margin-top: 160px;
  display: grid;
  grid-template-columns: 264px minmax(0, 687px);
}

.about-label {
  margin: 0;
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
}

.about-copy p {
  margin: 0 0 36px;
  font-size: 24px;
  line-height: 1.5;
}

.about-info {
  margin: 4px 0 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 24px 48px;
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: capitalize;
}

.about-info dt {
  color: var(--qm-ink);
}

.about-info dd {
  margin: 0;
  font-weight: 500;
  color: var(--qm-sub);
}

/* ---------- Challenge ---------- */

.qm-challenge {
  position: relative;
  margin-top: 160px;
}

.ch-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, minmax(182px, auto));
  gap: 24px 80px;
}

.ch-1 { grid-column: 1; grid-row: 1; }
.ch-2 { grid-column: 2; grid-row: 2; }
.ch-3 { grid-column: 3; grid-row: 3; }

.ch-num {
  margin: 0;
  font-size: 64px;
  font-weight: 500;
  line-height: 1;
  color: var(--qm-faint);
}

.ch-card h3 {
  margin: 24px 0 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--qm-primary);
}

.ch-card p + h3 + p,
.ch-card > p:last-child {
  margin: 24px 0 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--qm-ink);
}

/* ---------- Goal ---------- */

.qm-goal {
  position: relative;
  margin-top: 74px;
  min-height: 832px;
}

.goal-text {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 148px 24px 0;
  color: var(--qm-secondary);
}

.goal-text h2,
.goal-text p {
  max-width: 618px;
}

.goal-text h2 {
  margin: 0 0 40px;
  font-size: 96px;
  font-weight: 500;
  line-height: normal;
}

.goal-text p {
  margin: 0;
  font-size: 24px;
  line-height: 1.5;
}

.goal-text em {
  font-style: italic;
  font-weight: 500;
  color: var(--qm-primary);
}

.goal-phone {
  position: absolute;
  top: 0;
  left: calc(50% + 155px);
  width: 1036px;
  max-width: none;
  height: auto;
}

/* ---------- Concept ---------- */

.qm-concept {
  position: relative;
  margin-top: 90px;
  text-align: center;
}

.concept-label {
  margin: 0;
  font-size: 40px;
  font-weight: 500;
}

.concept-display {
  margin: 40px 0 0;
  font-size: min(128px, 8.8vw);
  font-weight: 500;
  line-height: normal;
  white-space: nowrap;
  color: var(--qm-ink);
}

.concept-copy {
  margin: 40px auto 0;
  max-width: 775px;
  font-size: 20px;
  line-height: 1.5;
  text-align: left;
}

.equation {
  margin-top: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.equation span {
  font-size: 36px;
  color: var(--qm-sub);
  line-height: 1;
}

.eq-q { width: 44px; height: 48px; }
.eq-tape { width: 86px; height: 48px; }
.eq-mark { width: 48px; height: 48px; }

/* Logomark on construction grid: grid lines bleed past the box */
.logo-grid {
  position: relative;
}

.logo-grid--lg {
  width: 400px;
  margin: 80px auto 0;
  aspect-ratio: 1;
}

.logo-grid .lg-grid {
  position: absolute;
  inset: -11.33%;
  width: 122.66%;
  height: 122.66%;
  max-width: none;
}

.logo-grid .lg-mark {
  position: absolute;
  inset: 16.6%;
  width: 66.8%;
  height: 66.8%;
}

/* ---------- Pillars ---------- */

.qm-pillars {
  position: relative;
  margin-top: 160px;
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.qm-pillars .qm-h {
  flex: none;
}

.pillar-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pillar h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 28px;
}

.pillar p {
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 28px;
}

/* ---------- Logo anatomy ---------- */

.qm-anatomy {
  position: relative;
  margin-top: 160px;
}

.anatomy-row--light {
  margin-top: 80px;
  padding: 0 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.an-logo {
  width: 384px;
  height: auto;
}

.an-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.logo-grid--sm {
  width: 240px;
  aspect-ratio: 1;
}

.an-mark p {
  margin: 0;
  font-size: 16px;
  color: var(--qm-sub);
}

.anatomy-row--dark {
  margin-top: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.an-dark-panel {
  flex: none;
  width: 597px;
  height: 280px;
  background: var(--qm-dark);
  display: flex;
  align-items: center;
  padding: 0 120px;
}

.an-dark-panel img {
  width: 384px;
  max-width: 100%;
  height: auto;
}

.an-type {
  flex: none;
  width: 240px;
  height: 240px;
}

.an-hex {
  flex: none;
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.an-hex span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  font-size: 16px;
  color: #fff;
}

.app-icon {
  margin-top: 80px;
}

.app-icon h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
}

.app-icon .qm-body {
  margin-top: 24px;
}

.icon-row {
  margin-top: 80px;
  display: flex;
  align-items: flex-end;
  gap: 80px;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.icon-item img {
  height: auto;
}

.icon-item span {
  font-size: 16px;
  color: var(--qm-sub);
}

/* ---------- Color system ---------- */

.qm-colors {
  position: relative;
  margin-top: 160px;
}

.color-group {
  margin-top: 56px;
}

.cg-head {
  margin: 0;
  display: flex;
  gap: 24px;
  align-items: baseline;
  font-size: 20px;
}

.cg-head b {
  font-weight: 500;
}

.cg-primary { color: var(--qm-primary); }
.cg-secondary { color: var(--qm-sub); }
.cg-neutral { color: #a4b1bc; }

.cg-head span {
  color: var(--qm-sub);
}

.cg-row {
  margin-top: 24px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.sw {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.sw--wide {
  width: 160px;
}

.sw--hero {
  width: 160px;
  height: 160px;
  background: #ff4a00;
  color: #fff;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px;
}

.sw--hero .sw-name {
  font-size: 14px;
}

.sw--hero .sw-hex {
  font-size: 22px;
  font-weight: 500;
}

/* ---------- Illustration system ---------- */

.qm-ills {
  position: relative;
  margin-top: 160px;
}

.qm-ills .qm-lead {
  margin-top: 32px;
  max-width: none;
}

.ill {
  height: auto;
}

.ill--full {
  width: 100%;
  margin-top: 80px;
}

.ill--left {
  width: calc(100% - 200px);
  margin-top: 80px;
}

.ill--right {
  width: calc(100% - 200px);
  margin-top: 80px;
  margin-left: auto;
}

/* ---------- Outro / closure ---------- */

.qm-outro {
  position: relative;
  margin-top: 160px;
}

.outro-img {
  width: 100%;
  height: auto;
}

.outro-text {
  position: absolute;
  left: max(24px, calc(50% - 520px));
  top: 27%;
  width: min(480px, calc(100% - 48px));
}

.outro-points {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.outro-points h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.5;
}

.outro-points p {
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 1.5;
}

.outro-copyright {
  position: absolute;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 16px;
  color: var(--qm-sub);
  white-space: nowrap;
}

/* ============================================================
   Tablet — compress fixed boards below their natural widths
   ============================================================ */

@media (max-width: 1279px) {
  .goal-phone {
    width: 72vw;
    left: auto;
    right: -18vw;
  }

  .anatomy-row--light {
    padding: 0 40px;
  }

  .anatomy-row--dark {
    flex-wrap: wrap;
  }
}

/* ============================================================
   Mobile — flow layout
   ============================================================ */

@media (max-width: 767px) {
  .wrap {
    padding: 0 20px;
  }

  .bg-line {
    display: none;
  }

  .home-link {
    left: 20px;
    top: 20px;
  }

  .qm-h {
    font-size: 30px;
  }

  .qm-lead {
    margin-top: 24px;
    font-size: 18px;
  }

  .qm-body {
    margin-top: 24px;
    font-size: 16px;
  }

  /* hero */
  .hero {
    gap: 64px;
    padding: 72px 20px 64px;
  }

  .hero-tag {
    font-size: 18px;
    letter-spacing: 1.8px;
  }

  .hero-logo img {
    width: 200px;
    height: 165px;
  }

  .hero-year {
    font-size: 16px;
    letter-spacing: 12px;
    text-indent: 12px;
  }

  /* about */
  .qm-about {
    margin-top: 88px;
    display: block;
  }

  .about-label {
    font-size: 30px;
  }

  .about-copy {
    margin-top: 24px;
  }

  .about-copy p {
    margin-bottom: 20px;
    font-size: 18px;
  }

  .about-info {
    margin-top: 32px;
    font-size: 16px;
    letter-spacing: 1.2px;
    gap: 16px 24px;
  }

  /* challenge */
  .qm-challenge {
    margin-top: 88px;
  }

  .ch-grid {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .ch-num {
    font-size: 48px;
  }

  .ch-card h3 {
    margin-top: 16px;
    font-size: 20px;
  }

  .ch-card > p:last-child {
    margin-top: 12px;
  }

  /* goal */
  .qm-goal {
    margin-top: 88px;
    min-height: 0;
  }

  .goal-text {
    max-width: none;
    margin: 0;
    padding: 0 20px;
    transform: none;
  }

  .goal-text h2 {
    margin-bottom: 24px;
    font-size: 52px;
  }

  .goal-text p {
    font-size: 18px;
  }

  .goal-phone {
    position: static;
    width: 110%;
    margin: 24px 0 0 auto;
    margin-right: -10%;
  }

  /* concept */
  .qm-concept {
    margin-top: 88px;
  }

  .concept-label {
    font-size: 24px;
  }

  .concept-display {
    margin-top: 24px;
    font-size: 40px;
    white-space: normal;
    line-height: 1.1;
  }

  .concept-copy {
    margin-top: 24px;
    font-size: 16px;
  }

  .equation {
    margin-top: 48px;
    gap: 16px;
  }

  .equation span {
    font-size: 24px;
  }

  .eq-q { width: 33px; height: 36px; }
  .eq-tape { width: 64px; height: 36px; }
  .eq-mark { width: 36px; height: 36px; }

  .logo-grid--lg {
    width: min(300px, 76vw);
    margin-top: 56px;
  }

  /* pillars */
  .qm-pillars {
    margin-top: 88px;
    flex-direction: column;
    gap: 32px;
  }

  .pillar h3 {
    font-size: 20px;
  }

  .pillar p {
    font-size: 16px;
    line-height: 24px;
  }

  /* anatomy */
  .qm-anatomy {
    margin-top: 88px;
  }

  .anatomy-row--light {
    margin-top: 48px;
    padding: 0;
    flex-direction: column;
    gap: 56px;
  }

  .an-logo {
    width: min(320px, 85%);
  }

  .logo-grid--sm {
    width: 200px;
  }

  .anatomy-row--dark {
    margin-top: 56px;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
  }

  .an-dark-panel {
    width: calc(100% + 40px);
    margin: 0 -20px;
    height: 200px;
    padding: 0 40px;
    justify-content: center;
  }

  .an-dark-panel img {
    width: min(320px, 100%);
  }

  .an-type {
    align-self: center;
    width: 200px;
    height: 200px;
  }

  .an-hex {
    align-self: center;
    width: 160px;
  }

  .app-icon {
    margin-top: 56px;
  }

  .app-icon h3 {
    font-size: 20px;
  }

  .icon-row {
    margin-top: 40px;
    gap: 24px;
    flex-wrap: wrap;
  }

  /* colors */
  .qm-colors {
    margin-top: 88px;
  }

  .color-group {
    margin-top: 40px;
  }

  .cg-head {
    flex-direction: column;
    gap: 6px;
    font-size: 16px;
  }

  .cg-row {
    gap: 10px;
  }

  .sw {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    font-size: 8.5px;
  }

  .sw--wide {
    width: 120px;
  }

  .sw--hero {
    width: 128px;
    height: 128px;
    padding: 12px;
  }

  .sw--hero .sw-name {
    font-size: 12px;
  }

  .sw--hero .sw-hex {
    font-size: 17px;
  }

  /* illustrations */
  .qm-ills {
    margin-top: 88px;
  }

  .qm-ills .qm-lead {
    margin-top: 20px;
  }

  .ill--full,
  .ill--left,
  .ill--right {
    width: 100%;
    margin-top: 40px;
  }

  /* outro */
  .qm-outro {
    margin-top: 88px;
  }

  .outro-text {
    position: static;
    width: auto;
    padding: 0 20px 40px;
  }

  .outro-points {
    margin-top: 24px;
    gap: 24px;
  }

  .outro-points h3 {
    font-size: 20px;
  }

  .outro-points p {
    font-size: 16px;
  }

  .outro-copyright {
    position: static;
    transform: none;
    padding: 24px 20px 32px;
    text-align: center;
    font-size: 13px;
    white-space: normal;
  }
}
