/* Two Loop Systems homepage */

:root {
  --charcoal: #363636;
  --indigo: #231A67;
  --green: #00FF09;
  --white: #FFFFFF;

  --serif: "Instrument Serif", serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* Base */

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--white);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--white);
  text-decoration-color: rgba(255, 255, 255, .4);
  text-underline-offset: 4px;
}

a:hover {
  color: var(--green);
  text-decoration-color: var(--green);
}

::selection { background: var(--green); color: var(--indigo); }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* Shared type */

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green);
}

.h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 4.4vw, 60px);
  line-height: 1;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.h2--lg { font-size: clamp(40px, 5.2vw, 72px); }

.h2 em { font-style: italic; color: var(--green); }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-size: 16px;
  text-decoration: none;
}

.btn--primary {
  background: var(--green);
  color: var(--indigo);
  font-weight: 600;
}

.btn--primary:hover { background: var(--white); color: var(--indigo); }

.btn--secondary {
  border: 1px solid rgba(255, 255, 255, .4);
  color: var(--white);
  font-weight: 500;
}

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(54, 54, 54, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.site-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.brand__mark { width: 56px; height: auto; display: block; }

.brand__name {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.site-header__cta {
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

/* Hero */

.hero {
  padding-top: 96px;
  padding-bottom: 88px;
  display: grid;
  gap: 48px;
  align-items: center;
}

/* The footer lockup at hero scale: loop on the left, stacked wordmark on
   the right, both --lockup tall. Three lines at line-height .95 make the
   wordmark 2.85x its font size. The whole lockup is about 3.35x --lockup
   wide. It comes first on narrow screens and moves to the right-hand
   column on wide ones. */
.hero__brand {
  --lockup: 120px;
  display: flex;
  align-items: center;
  gap: calc(var(--lockup) * .2);
}

.hero__mark { height: var(--lockup); width: auto; display: block; }

.hero__wordmark {
  font-family: var(--serif);
  font-size: calc(var(--lockup) / 2.85);
  line-height: .95;
  text-align: right;
  white-space: nowrap;
}

@media (min-width: 1100px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero__brand { --lockup: clamp(120px, 11.2vw, 164px); order: 2; justify-content: center; }
}

.hero__copy { display: flex; flex-direction: column; gap: 32px; }

.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 6.4vw, 88px);
  line-height: .98;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.hero__lede {
  margin: 0;
  max-width: 560px;
  font-size: 20px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .82);
  text-wrap: pretty;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Logo strip */

.proof {
  border-top: 1px solid rgba(255, 255, 255, .1);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.proof__inner {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.proof__label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}

.proof__logos {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .proof__inner { flex-direction: column; align-items: stretch; gap: 16px; }
  .proof__label { font-size: 10px; text-align: center; }
  .proof__logos { flex: none; }
}

.proof__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
}

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

/* Toronto and HubSpot are knocked out to white; Salesforce and YC keep their
   colours because they contain white text the filter would hide. */
.logo--toronto { max-height: 36px; filter: brightness(0) invert(1); opacity: .85; }
.logo--hubspot { max-height: 30px; filter: brightness(0) invert(1); opacity: .85; }
.logo--salesforce { max-height: 44px; opacity: .95; }
.logo--yc { max-height: 32px; opacity: .95; }

/* Case study */

.case { background: var(--indigo); scroll-margin-top: 60px; }

.case__inner {
  padding-top: 120px;
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.case__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 900px;
}

.case__subhead {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.1;
  letter-spacing: -.01em;
  color: rgba(255, 255, 255, .88);
  text-wrap: balance;
}

.case__subhead em { font-style: italic; color: var(--green); }

.case__body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 56px;
  align-items: start;
}

.case__copy p {
  margin: 0;
  font-size: 20px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .9);
  text-wrap: pretty;
}

.case__copy p + p { margin-top: 1.6em; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .18);
}

.stat {
  background: var(--indigo);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat__num {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1;
  color: var(--green);
}

.stat__label {
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .85);
}

/* What we do */

.services {
  padding-top: 120px;
  padding-bottom: 120px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  scroll-margin-top: 80px;
}

.services__intro {
  flex: 1.35 1 440px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  border: 1px dashed rgba(255, 255, 255, .35);
}

.services__intro-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.services__mark { width: 64px; height: auto; display: block; }

.card {
  --card-bg: transparent;
  --card-fg: var(--white);
  --card-border: rgba(255, 255, 255, .2);
  --card-shadow: var(--green);
  --card-deco: rgba(255, 255, 255, .06);
  --card-body: rgba(255, 255, 255, .82);
  --card-chip: rgba(255, 255, 255, .3);

  flex: 1 1 280px;
  position: relative;
  overflow: hidden;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background: var(--card-bg);
  color: var(--card-fg);
  border: 1px solid var(--card-border);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.card:hover {
  transform: translate(-6px, -6px);
  box-shadow: 6px 6px 0 var(--card-shadow);
}

.card--green {
  --card-bg: var(--green);
  --card-fg: var(--indigo);
  --card-border: var(--green);
  --card-shadow: var(--indigo);
  --card-deco: rgba(35, 26, 103, .12);
  --card-body: var(--indigo);
  --card-chip: rgba(35, 26, 103, .5);
  flex: 1 1 320px;
}

.card--indigo {
  --card-bg: var(--indigo);
  --card-border: var(--indigo);
  --card-deco: rgba(0, 255, 9, .14);
  --card-body: rgba(255, 255, 255, .88);
  --card-chip: rgba(0, 255, 9, .5);
  flex: 1.5 1 380px;
}

.card--white {
  --card-bg: var(--white);
  --card-fg: var(--indigo);
  --card-border: var(--white);
  --card-deco: rgba(35, 26, 103, .08);
  --card-body: var(--charcoal);
  --card-chip: rgba(35, 26, 103, .35);
}

.card--wide {
  --card-deco: rgba(0, 255, 9, .1);
  flex: 1 1 100%;
}

.card__deco {
  position: absolute;
  top: -28px;
  right: 12px;
  font-family: var(--serif);
  font-size: 220px;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--card-deco);
  pointer-events: none;
}

.card__num {
  position: relative;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
}

.card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.card--indigo .card__title { font-size: 52px; }

.card__body p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--card-body);
  max-width: 520px;
  text-wrap: pretty;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  padding: 6px 12px;
  border: 1px solid var(--card-chip);
  border-radius: 999px;
  white-space: nowrap;
}

/* How we work */

.principles {
  padding-top: 120px;
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.section-head { display: flex; flex-direction: column; gap: 20px; }

.principles .h2 { text-wrap: wrap; }

.principles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

/* Literal black boxes, under a heading that promises none. */
.principle {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 28px 32px;
  background: #000;
  border-top: 2px solid var(--green);
}

.principle h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.1;
}

.principle p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .82);
  text-wrap: pretty;
}

/* About */

.about {
  border-top: 1px solid rgba(255, 255, 255, .1);
  scroll-margin-top: 60px;
}

.about__inner {
  padding-top: 120px;
  padding-bottom: 120px;
}

.about__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

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

.photo {
  position: relative;
  flex: none;
  width: 128px;
  margin-right: 8px;
  aspect-ratio: 4 / 5;
}

.photo__shadow {
  position: absolute;
  inset: 0;
  transform: translate(8px, 8px);
  background: var(--indigo);
}

.photo img,
.photo__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.photo img { object-fit: cover; display: block; }

.photo__placeholder {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #3c3c3c;
  border: 1.5px dashed rgba(255, 255, 255, .35);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  color: rgba(255, 255, 255, .75);
}

.about__copy { display: flex; flex-direction: column; gap: 24px; max-width: 760px; }

.about__copy p {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .88);
  text-wrap: pretty;
}

/* Procurement */

.procurement { background: var(--indigo); scroll-margin-top: 60px; }

.procurement__inner {
  padding-top: 120px;
  padding-bottom: 120px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 64px;
}

.procurement__head {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
}

.procurement__head .btn { align-self: start; }

.facts {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-size: 16px;
}

.facts__row {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, .2);
}

.facts__row:last-child { border-bottom: 1px solid rgba(255, 255, 255, .2); }

.facts dt {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
  padding-top: 2px;
}

.facts dd { margin: 0; }

.mono { font-family: var(--mono); }
.mono--list { line-height: 1.7; }
.muted { color: rgba(255, 255, 255, .85); }

/* Contact */

.contact { scroll-margin-top: 60px; }

.contact__inner {
  padding-top: 140px;
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact__email {
  font-family: var(--serif);
  font-size: clamp(40px, 7.4vw, 112px);
  line-height: 1;
  letter-spacing: -.02em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 12px;
  overflow-wrap: anywhere;
}

.contact__meta {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  font-size: 18px;
  color: rgba(255, 255, 255, .85);
}

/* Footer */

.site-footer { border-top: 1px solid rgba(255, 255, 255, .1); }

.site-footer__inner {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer__brand { display: flex; align-items: center; gap: 14px; }

.site-footer__mark { width: 88px; height: auto; display: block; }

.site-footer__wordmark {
  font-family: var(--serif);
  font-size: 26px;
  line-height: .95;
  text-align: right;
}

.site-footer__legal { font-size: 14px; color: rgba(255, 255, 255, .6); }

/* Phones: tighter gutters and spacing, denser sections. */

@media (max-width: 640px) {
  .container { padding-left: 20px; padding-right: 20px; }

  .h2 { font-size: 36px; }
  .h2--lg { font-size: 40px; }

  .site-header__inner { padding: 10px 20px; gap: 12px; }
  .brand { gap: 10px; }
  .brand__mark { width: 44px; }
  .brand__name { font-size: 20px; }
  .site-header__cta { padding: 8px 14px; font-size: 14px; }

  .hero { padding-top: 32px; padding-bottom: 56px; gap: 32px; }
  .hero__brand { --lockup: min(88px, calc((100vw - 40px) / 3.4)); }
  .hero__copy { gap: 24px; }
  .hero__lede { font-size: 18px; }

  .proof__inner { padding-top: 20px; padding-bottom: 24px; }
  .proof__logos { grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }
  .proof__logo { height: 36px; }
  .logo--toronto { max-height: 28px; }
  .logo--hubspot { max-height: 24px; }
  .logo--salesforce { max-height: 36px; }
  .logo--yc { max-height: 26px; }

  .case__inner { padding-top: 64px; padding-bottom: 64px; gap: 32px; }
  .case__body { gap: 32px; }
  .case__copy p { font-size: 17px; }
  .stat { padding: 16px 14px; gap: 6px; }
  .stat__num { font-size: 36px; }
  .stat__label { font-size: 13px; line-height: 1.35; }

  .services { padding-top: 64px; padding-bottom: 64px; gap: 12px; }
  .services__intro { padding: 24px; gap: 24px; }
  .card { padding: 24px; gap: 20px; }
  .card__title { font-size: 34px; }
  .card--indigo .card__title { font-size: 40px; }
  .card__body p { font-size: 16px; }
  .card__deco { font-size: 160px; top: -20px; }

  .principles { padding-top: 64px; padding-bottom: 64px; gap: 32px; }
  .principles__grid { gap: 12px; }
  .principle { padding: 20px 20px 24px; gap: 8px; }
  .principle h3 { font-size: 28px; }
  .principle p { font-size: 16px; }

  .about__inner { padding-top: 64px; padding-bottom: 64px; }
  .about__title { gap: 16px; }
  .about__head { gap: 16px; }
  .photo { width: 88px; }
  .about__copy { gap: 20px; }
  .about__copy p { font-size: 17px; }

  .procurement__inner { padding-top: 56px; padding-bottom: 56px; gap: 32px; }
  .procurement__head { gap: 16px; }
  .facts { font-size: 15px; }
  .facts__row { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
  .facts dt { font-size: 11px; padding-top: 0; }
  .facts dd.mono { font-size: 14px; }
  .mono--list { line-height: 1.5; }

  .contact__inner { padding-top: 72px; padding-bottom: 64px; gap: 24px; }
  .contact__email { font-size: clamp(28px, 8.2vw, 40px); text-underline-offset: 8px; }
  .contact__meta { gap: 12px 32px; font-size: 16px; }

  .site-footer__inner { padding-top: 32px; padding-bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
