/* ---------- Global Styles ---------- */
html {
  font-size: var(--root-font-size);
}
body {
  background-color: var(--bg-page);
  font-family: var(--font-fam);
}
.touch-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
}
p {
  font-size: var(--f-sz-p);
  line-height: var(--lh-copy);
}
p.small {
  font-size: var(--f-sz-p-small);
}
p.large {
  font-size: var(--f-sz-p-large);
}
p.caption {
  font-size: var(--f-sz-p-caption);
}
a {
  opacity: var(--btn-default-op);
  text-decoration: none;
  line-height: var(--lh-label);
  font-size: var(--f-sz-p-small);
}
a:hover {
  opacity: var(--btn-hover-op);
}
a:active {
  opacity: var(--btn-active-op);
}
a:focus-visible {
  opacity: var(--btn-focus-op);
}
em {
  color: var(--text-hl-color);
}
strong {
  font-weight: 700;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  /* heading reset*/
  font-size: var(--text-16);
  line-height: var(--lh-heading);
  font-weight: var(--wt-bold);
}
.h-hero {
  font-size: var(--text-72);
  line-height: var(--lh-heading);
  font-weight: var(--wt-bold);
}
.h-page {
  font-size: var(--text-64);
  line-height: var(--lh-heading);
  font-weight: var(--wt-bold);
}
.h-page-sub {
  font-size: var(--text-24);
  line-height: var(--lh-copy);
  font-weight: var(--wt-medium);
}
.h-page-sub em {
  font-weight: var(--wt-bold);
}
.h-page-metadata {
  font-size: var(--text-16);
  line-height: var(--lh-heading);
  font-weight: var(--wt-bold);
}
.h-section {
  font-size: var(--text-40);
  line-height: var(--lh-heading);
  font-weight: var(--wt-medium);
  color: var(--text-title-main-color);
}
.h-card {
  font-size: var(--text-28);
  line-height: var(--lh-heading);
  font-weight: var(--wt-medium);
}
.h-card-sub {
  font-size: var(--text-16);
  line-height: var(--lh-heading);
  font-weight: var(--wt-medium);
}
.h-card-small {
  font-size: var(--text-24);
  line-height: var(--lh-heading);
  font-weight: var(--wt-medium);
}

/* ---------- GLOBAL PAGE STRUCTURE ---------- */
/* TOP NAV */
nav.top-bar {
  width: 100vw;
  height: var(--height-nav);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--gap-top-bar-items);
  padding: var(--pad-top-bar-nav-item);
  box-sizing: border-box;
}
nav.top-bar .nav-item {
  display: flex;
  align-items: center;
  gap: var(--gap-sp-4);
  color: var(--text-1-color);
  gap: var(--gap-top-bar-item);
}
/* HERO */
.page-segment.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-segment .hero-content {
  /* flex: 1; */
}
/* SEGMENTS */
/* MAIN STRUCTURAL SECTIONS OF A PAGE / Full-width & large gaps */
.page-segment {
  margin-bottom: var(--gap-page-segments);
  width: 100%;
}
/* No margin on last page segment */
.page-segment:last-of-type {
  margin-bottom: 0px;
}
/* Inner page segment, no spacing but allows for horizontal stripes of color within page segments. Should have extra classes for specificity. */
.inner-segment {
  padding: var(--gap-sp-24) 0;
}
.inner-segment.image {
  /* background-color: #ffffff; I think replacing this with something else would be good */
}
/* CASE STUDY HEADER */
/* .inner-segment.head {
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
} */

.inner-segment.title {
  padding: var(--gap-sp-24) 0px;
}
.inner-segment.title.impact {
  background: var(--bg-reverse);
  color: var(--text-rev-color);
}
/* Centers content within segments */
.segment-content {
  padding: 0px var(--pad-section);
  max-width: 1440px;
  margin: 0 auto;
}
/* chunks of actual content with space between*/
.flow-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap-p-break);
}
/* inner chunks of content that have a relationship (e.g. head/subhead) */
.flow-section .chunk {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap-line-break);
}
.flow-section a.solid-button,
.flow-section a.ghost-button {
  align-self: flex-start;
}

/* ---------- COMPONENTS ---------- */
/* ATOMS */
.tag {
  background: var(--ui-hl);
  display: inline-block;
  border-radius: var(--br-round);
  color: var(--text-rev-color);
  padding: var(--gap-sp-8) var(--gap-sp-16);
}
.tag p {
  line-height: var(--lh-label);
  font-size: var(--text-12);
}
blockquote:before {
}
blockquote {
  font-size: var(--f-sz-blockquote);
  line-height: var(--lh-copy);
  color: var(--text-1-color);
  font-style: italic;
  padding: var(--gap-sp-24) var(--gap-sp-24) var(--gap-sp-24)
    calc(var(--gap-sp-24) * 2);
  background: url(../images/quote-icon.svg) no-repeat 10px 15px;
  overflow: visible;
}

/* BUTTONS */
a.ghost-button {
  display: inline-block;
  line-height: var(--lh-label);
  padding: calc(var(--l-sp-16) + 1px) var(--l-sp-28) calc(var(--l-sp-16) - 1px)
    var(--l-sp-28);
  border: 3px var(--btn-primary-default) solid;
  color: var(--btn-primary-default);
  border-radius: var(--br-16);
  font-weight: var(--wt-bold);
}
a.solid-button {
  display: inline-block;
  line-height: var(--lh-label);
  padding: calc(var(--l-sp-16) + 1px) var(--l-sp-28) calc(var(--l-sp-16) - 1px)
    var(--l-sp-28);
  border: 3px var(--btn-primary-default) solid;
  background-color: var(--btn-primary-default);
  color: var(--text-rev-color);
  border-radius: var(--br-16);
  font-weight: var(--wt-bold);
}
/* ---------- CARDS ---------- */
/* GEN. CARD */
.card {
  background: var(--bg-card);
  padding: var(--pad-sp-24);
  border-radius: var(--br-16);
  display: flex;
  gap: var(--gap-sp-20);
}
.card.full-width {
  border-radius: 0px;
}
/* WORK EXAMPLE CARD */
.card.work-example-card.vert {
  flex-direction: column;
  justify-content: center;
}
.example-content {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sp-20);
}

/* ---------- EXAMPLE LAYOUTS ---------- */
/* ALL FLEX LAYOUTS & PHONE */
.flex-example {
  display: flex;
  justify-content: center;
  /* align-items: center;  I think this is messing up layouts*/
  flex-direction: column;
  gap: var(--gap-flex-ltr);
}
/* IMPROVE - For left/right layouts this makes the image center in a large chunk of space, can just the text fill up the space? 
*/
.flex-example img {
  width: 100%; /* Images should be full-width */
  height: auto; /* ... and maintain their aspect ratio */
  max-height: 45vh; /* ... but be restricted to 45% of the viewport height to make sure they never grow too tall */
  object-fit: contain;
}
.flex-example video {
  height: 100%;
  max-height: 45vh;
}
.grid-example {
  display: flex;
  gap: var(--gap-flex-ltr);
}
.grid-example img {
  flex: 1 1 auto;
  height: auto;
  min-width: 0;
}
/* TABLET */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Images go left/right on side-by-side templates */
  .flex-example.img-left > *,
  .flex-example.img-right > * {
    min-width: 0;
    flex: 1;
  }
  .flex-example.img-left {
    flex-direction: row;
  }
  .flex-example.img-right {
    flex-direction: row-reverse;
  }
}
@media (min-width: 1025px) and (max-width: 1366px) {
  /* Images go left/right on side-by-side templates */
  .flex-example.img-left > *,
  .flex-example.img-right > * {
    min-width: 0;
  }
  .flex-example.img-left {
    flex-direction: row;
  }
  .flex-example.img-right {
    flex-direction: row-reverse;
  }
  .flex-example.img-right > div,
  .flex-example.img-left > div {
    flex: 1 1 0;
  }
  .flex-example.img-right > img,
  .flex-example.img-left > img {
    flex: 0 0 auto;
    width: auto;
  }
}
/* XL-Desktop: >1366px */
@media (min-width: 1367px) {
  /* Images go left/right on side-by-side templates AND top templates */
  .flex-example.img-left > *,
  .flex-example.img-right > *,
  .flex-example.img-top > * {
    min-width: 0;
  }
  .flex-example.img-left,
  .flex-example.img-top {
    flex-direction: row;
  }
  .flex-example.img-right {
    flex-direction: row-reverse;
  }
  .flex-example.img-right > div,
  .flex-example.img-left > div,
  .flex-example.img-top > div,
  .flex-example.img-top > img {
    flex: 1 1 0;
  }
  .flex-example.img-right > img,
  .flex-example.img-left > img {
    flex: 0 0 auto;
    width: auto;
  }
}

/* IMG TOP - xPhone, xTablet, xDesktop image is on top. XL Desktop is L/R */

/* IMG LEFT/IMG RIGHT - xTablet, xDesktop, XL Desktop is L/R, xPhone is on top */

/*
.flex-example.img-right {
  flex-direction: row-reverse;
}
.flex-example.img-lg-top {
  flex-direction: column;
}
.flex-example > :not(img) {
  flex: 1;
}
.flex-example.img-right img,
.flex-example.img-left img {
  width: auto;
  max-height: 45vh;
  align-self: center;
}

.flex-example.img-lg-top img {
  width: 100%;
  max-width: 75vw;
  height: auto;
}

.flex-example.img-right,
.flex-example.img-left {
  flex-direction: column;
}

.flex-example.img-right img,
.flex-example.img-left img {
  width: 100%;
  height: auto;
}
/*


/* FOOTER NAV  */
.inner-segment.footer {
  padding: 0px var(--gap-sp-24);
}
.more-links {
  display: flex;
  gap: var(--gap-sp-24);
}
.more-links .card {
  flex-direction: column;
  text-align: center;
  flex: 1 1 0;
}
nav.more-links .card > *:not(h5) {
  align-self: center;
}
/* ---------- PER DEVICE THEMING * ---------- */
/* Phone: <768px */
@media (max-width: 767.98px) {
}

/* Tablet: 768–1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  /*
  .flex-example {
    align-items: center;
  }

  .flex-example > img,
  .flex-example > :not(img) {
    flex: 1 1 0;
    min-width: 0;
  }

  .flex-example > img {
    width: 100%;
    height: auto;
    max-width: 100%;
  }*/
}

/* Desktop: 1025–1366px */
@media (min-width: 1025px) and (max-width: 1366px) {
  /*
  .flex-example.img-lg-top:nth-of-type(2n) {
    flex-direction: row;
  }
  .flex-example.img-lg-top:nth-of-type(2n + 1) {
    flex-direction: row-reverse;
  }
  
  .flex-example.img-lg-top img {
    width: 50%;
    max-width: 75vw;
    height: auto;
  }*/
}

/* XL-Desktop: >1366px */
@media (min-width: 1367px) {
  /*.flex-example.img-lg-top:nth-of-type(2n) {
    flex-direction: row;
  }
  .flex-example.img-lg-top:nth-of-type(2n + 1) {
    flex-direction: row-reverse;
  }
  
  .flex-example.img-lg-top img {
    width: 50%;
    max-width: 75vw;
    height: auto;
  }*/
}
