/* Telegraph Renovation Campaign */
/* 2/2026 nate@clixel.com  */

@font-face {
    font-family: 'TT Ramillas';
    src: url('/wp-content/themes/ccs-2015/fonts/TTRamillasTrl-Regular.woff2') format('woff2'),
        url('/wp-content/themes/ccs-2015/fonts/TTRamillasTrl-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TT Ramillas';
    src: url('/wp-content/themes/ccs-2015/fonts/TTRamillasTrl-Bold.woff2') format('woff2'),
        url('/wp-content/themes/ccs-2015/fonts/TTRamillasTrl-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TT Ramillas';
    src: url('/wp-content/themes/ccs-2015/fonts/TTRamillasTrl-It.woff2') format('woff2'),
        url('/wp-content/themes/ccs-2015/fonts/TTRamillasTrl-It.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

:root {
  scroll-behavior: smooth;
  --telegraphP: 18px/1.5 'Raleway', sans-serif;
  --telegraphH2: bold 36px/1.1 'Raleway', sans-serif;
  --telegraphH3: bold 24px/1.1 'Raleway', sans-serif;
  --telegraphH2Serif: 66px/1.025 'TT Ramillas', serif;
  --telegraphBlockPadding: 4em;
}

@media screen and (min-width: 992px) {
  :root {
    --telegraphH2: bold 36px/1.1 'Raleway', sans-serif;
    --telegraphH3: bold 24px/1.1 'Raleway', sans-serif;
    --telegraphH2Serif: 84px/1.025 'TT Ramillas', serif;
  }
}

/* Two column text (this is also represented in editor-style.css) */
.two-column {
  columns: 350px;
  gap: 4em;
}

/* Pill shaped horizontal item list */
ul.horizontal-item-list {
  margin: 20px 0 !important;
  padding: 0;
  text-align: center;
  li {
    display: inline-block;
    background: #EFF7FE;
    padding: 0.5em 1em;
    list-style: none;
    border-radius: 50px;
    margin: 0 15px 15px;
    line-height: 1;
    &::before {
      content: "●";
      font-size: 2em;
      line-height: 25px;
      margin-right: 0.25em;
      color: #4E99CB;
      display: inline-block;
      vertical-align: sub;
    }
  }
}

/* Project updates page */
.container.project-update-block {
  > div {
    border-top: 1px solid #000;
    padding-top: 2em;
  }
}

/* Map legend (points out where Telegraph building is in map) */
.ccs-map-image {
  position: relative;
  .ccs-map-image-legend {
    user-select: none;
    position: absolute;
    display: none;
    top: 33%;
    left: 31%;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
    animation: slide-vertical 5s ease-in-out infinite;
    div {
      background: #F6DF80;
      aspect-ratio: 1;
      padding: 20px;
      text-align: center;
      font: bold 18px/1.1 'Raleway', sans-serif;
      clip-path: polygon( 2.105% 1.087%,98.947% 1.087%,98.947% 42.935%,61.053% 42.935%,73.158% 59.783%,62.632% 74.457%,67.368% 98.913%,55.263% 76.087%,64.737% 59.239%,48.421% 43.478%,1.053% 43.478%,2.105% 1.087% );
    }
  }
}
@media screen and (min-width: 790px) {
  .ccs-map-image .ccs-map-image-legend {
    display: block;
  }
}
@media screen and (min-width: 992px) {
  .ccs-map-image .ccs-map-image-legend {
    top: 37%;
    left: 33%;
  }
}

/* Telegraph Renovation Campaign page (or child page) */
body.parent-page-telegraph,
body.page-telegraph {

  /* Base SVG styles (for ring graphics) */
  svg {
    display: inline-block;
    max-width: 100%;
    height: auto;
  }

  /* Remove header elements */
  .top-trim-lg {
    border: none;
  }
  #masthead,
  .navbar--subnav {
    display: none;
  }

  /* Default telegraph type styles */
  .post {
    h2 {
      font: bold 36px/1.1 'Raleway', sans-serif;
      text-transform: none;
    }
    h3 {
      font: var(--telegraphH3);
      text-transform: none;
    }
    h2.serif-header {
      font: var(--telegraphH2Serif);
      letter-spacing: -0.02em;
      text-transform: none;
      margin: 0 0 0.25em;

    }
    ul,
    h2,
    h3,
    p {
      margin: 0 0 3rem;
    }
    li,
    p {
      font: var(--telegraphP);
      color: #000;
      a {
        text-decoration: underline;
      }
    }
    .entry > .wp-block-group {
      padding-bottom: var(--telegraphBlockPadding);
      + .wp-block-group {
        padding-top: var(--telegraphBlockPadding);
      }
    }
  }

  /* Large budget list  */
  ul.budget-list-large {
    strong {
      --underlineColor: #F296AC;
      background-size: 100% 100%;
      background-position: 0% 100%;
      color: #fff;
      text-shadow: -1px 2px #000;
      padding: 5px 15px;
      line-height: 1.4;
    }
    list-style-type: none;
    margin: 20px 0 30px;
    padding: 0;
    li {
      font: bold 30px/1.2 'Raleway', sans-serif !important;
      + li {
        margin-top: 0.35em;
      }
    }
  }
  @media screen and (max-width: 500px) {
    ul.budget-list-large {
      strong {
        display: inline-block;
        text-align: center;
      }
    }
  }

  /* SVG budget chart */
  svg#budget-chart {
    width: 100%;
    height: auto;
    #budget-chart-slice {
      transition: all 0.2s ease-in-out;
    }
    &.-active {
      #budget-chart-slice {
        transition: all 1.5s ease-in;
        transform: translate(-25px, -25px);
        animation: slide-diagonal 3s ease-out infinite;
        animation-delay: 1.5s;
      }
    }
  }

  /* SVG chart labels */
  ul.budget-chart-labels {
    margin: 0;
    padding: 0;
    li {
      font: 20px/1 'Raleway', sans-serif;
      white-space: nowrap;
      list-style: none;
      &:nth-child(1)::before,
      &:nth-child(2)::before,
      &:nth-child(3)::before,
      &:nth-child(4)::before {
        content: "●";
        font-size: 2em;
        line-height: 32px;
        margin-right: 0.25em;
        color: #45828E;
        display: inline-block;
        vertical-align: sub;
      }
      &:nth-child(2)::before { color: #0C9A88; }
      &:nth-child(3)::before { color: #FED967; }
      &:nth-child(4)::before { color: #F296AC; }
    }
  }

  /* Gallery captions */
  .tb-gallery .tb-gallery__caption {
    position: relative;
    margin-top: 0.5em;
    background: none;
    width: auto;
    padding: 0;
    text-align: left;
    font-size: 14px;
  }

}

@keyframes slide-diagonal {
  0% {
    transform: translate(-25px, -25px);
  }
  50% {
    transform: translate(-35px, -35px);
  }
  100% {
    transform: translate(-25px, -25px);
  }
}

@keyframes slide-vertical {
  0% {
    transform: translate(-50%, -53%);
  }
  50% {
    transform: translate(-50%, -56%);
  }
  100% {
    transform: translate(-50%, -53%);
  }
}

/* Main header */
.telegraph-renovation-header {
  h3 {
    text-transform: none;
    text-wrap: balance;
  }
  .tb-gallery {
    img {
      width: 100%;
      aspect-ratio: 4/3 !important;
      object-fit: cover;
    }
  }
}
/* Mobile only styles */
@media screen and (max-width: 600px) {
  .telegraph-renovation-header {
    /* Center header copy */
    text-align: center;
    .tb-button {
      text-align: center !important;
    }
  }
}
@media screen and (min-width: 790px) {
  .telegraph-renovation-header {
    /* Floating Donate button */
    .container {
      position: relative;
    }
    .tb-button__link {
      position: absolute;
      top: 2em;
      right: 2em;
    }
  }
}

/* About block */
.telegraph-renovation-about {
  /* Li'l rings graphic that spreads out on scroll */
  svg.rings {
    width: 120px;
    height: auto;
    margin-top: 20px;
    path {
      stroke-width: 2px;
      stroke: #ff5757;
      fill: none;
    }
    path:nth-child(1) {
      fill: #ff5757;
    }
  }
}

/* Donate buttons */
.pill-button .tb-button__link {
  --pillButtonBgColor: #F5FF74;
  --pillButtonTextColor: #000;
  --pillButtonHoverTextColor: #000;
  --pillButtonBorderColor: #000;
  padding: 0.75em 3em;
  border-radius: 50px;
  background: var(--pillButtonBgColor);
  border: 2px solid var(--pillButtonBorderColor);
  color: var(--pillButtonTextColor) !important;
  transition-duration: 0.2s;
  &:hover {
    background: color-mix(in srgb, var(--pillButtonBgColor), black 15%);
  }
}

/* Red button variant */
.pill-button--red .tb-button__link {
  --pillButtonBgColor: #ff5757;
  --pillButtonTextColor: #E9E8E9;
}

/* Rainbow button variant (Our Mission links) */
.pill-button--download,
.pill-button--rainbow {
  .tb-button__link {
    padding: 0.75em 2em;
    background: #fff;
    --pillButtonBorderColor: #FD8489;
    &:hover {
      background: var(--pillButtonBorderColor);
      &::after {
        background-color: #fff;
        transform: translateX(20px);
      }
    }
    &::after {
      content: "";
      display: inline-block;
      vertical-align: middle;
      transition: background-color 0.5s ease-out, transform 0.25s ease-in-out;
      transform: translateX(10px);
      width: 30px;
      height: 30px;
      background-color: var(--pillButtonBorderColor);
      mask-size: contain;
      mask-repeat: no-repeat;
      mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cline%20x1%3D%225%22%20y1%3D%2212%22%20x2%3D%2219%22%20y2%3D%2212%22%2F%3E%3Cpolyline%20points%3D%2213%206%2019%2012%2013%2018%22%2F%3E%3C%2Fsvg%3E");
    }
  }
}
.pill-button--rainbow {
  /* Rotate colors of buttons */
  &:nth-child(6n + 1) .tb-button__link {
    --pillButtonBorderColor: #FD8489;
  }
  &:nth-child(6n + 2) .tb-button__link {
    --pillButtonBorderColor: #B1A0D9;
  }
  &:nth-child(6n + 3) .tb-button__link {
    --pillButtonBorderColor: #8DC2E0;
  }
  &:nth-child(6n + 4) .tb-button__link {
    --pillButtonBorderColor: #A4E882;
  }
  &:nth-child(6n + 5) .tb-button__link {
    --pillButtonBorderColor: #FEAA73;
  }
  &:nth-child(6n + 6) .tb-button__link {
    --pillButtonBorderColor: #FFEE6E;
  }
}


/* Download button variant (media pdfs) */
.pill-button--download {
  .tb-button__link {
    min-width: 350px;
    --pillButtonBorderColor: #FFBE04;
    &:hover {
      &::after {
        transform: translate(10px, 5px);
      }
    }
    &::after {
      mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203v13M5%2013l7%207%207-7M4%2021h16%22%2F%3E%3C%2Fsvg%3E");
    }
  }
  &:nth-child(2) .tb-button__link {
    --pillButtonBorderColor: #15B3BD;
  }
}

.telegraph-our-mission {
  position: relative;
  /* Another rings graphic that spreads out on scroll */
  svg.rings-diagonal {
    position: absolute;
    top: 0;
    right: 5vw;
    width: 400px;
    height: auto;
    z-index: 10;
    transform: translateY(-50%);
    path {
      stroke-width: 1px;
      stroke: #FFBE04;
      fill: none;
    }
    path:nth-child(2) {
      stroke: #FFCE43;
    }
    path:nth-child(3) {
      stroke: #FFDE81;
    }
  }
}


/* Big ol stats */
.fat-stats {
  display: grid;
  /* Set fixed columns grid */
  grid-template-columns: 1fr 2fr !important;
  gap: 2em;
  /* First column */
  >:nth-child(2n - 1) {
    align-self: self-start;
    text-align: right;
    font: bold 50px/1 'Raleway', sans-serif !important;
    letter-spacing: -0.025em;
  }
  /* Second column */
  >:nth-child(2n) {
    strong:first-of-type {
      display: block;
      font: 24px/1.025 'TT Ramillas', serif;
      padding-bottom: 0.25em;
      + br {
        display: none;
      }
    }
  }
}
/* Mobile only styles */
@media screen and (max-width: 768px) {
  .fat-stats {
    grid-template-columns: 1fr !important;
    gap: 1em;
    p {
      margin: 0 !important;
    }
    >:nth-child(2n - 1) {
      text-align: left;
    }
    >:nth-child(2n) {
      padding-bottom: 1em;
    }
  }
}


/* Less fat stats ("Mar 2026" looked weird being too large) */
.fat-stats--medium {
  >:nth-child(2n - 1) {
    font: bold 30px/1 'Raleway', sans-serif !important;
  }
}
/* Desktop styles */
@media screen and (min-width: 768px) {
  .fat-stats:not(.fat-stats--medium) {
    >:nth-child(2n - 1) {
      font: bold 64px/1 'Raleway', sans-serif !important;
    }
  }
}


/* Grid of buttons (e.g. footer nav) */
.button-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 1em;
  .tb-button__link {
    width: 100%;
  }
}
@media screen and (min-width: 768px) {
  .button-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}


/* Overly complex marker underline effect that isn't quite right */

.marker-underline-bold strong {
  --underlineColor: #FFFFB9;
  display: inline;
  box-decoration-break: clone;
  background-repeat: no-repeat;
  background-image: linear-gradient(to bottom, var(--underlineColor), var(--underlineColor)); /* Creates a solid background for the underline */
  background-size: 100% 50%; /* Sets the height of the underline */
  background-position: 10% 90%; /* Positions the underline vertically centered in the text */
  border-radius: 3px; /* Rounds the ends of the underline */
}


/* Image reveals */
.-reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: transform 1.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 1.25s cubic-bezier(0.165, 0.84, 0.44, 1);
  will-change: transform, opacity, color;

  /* Only reveals by opacity */
  &.-opacity {
    transition-duration: 3s !important;
    transform: translate3d(0, 0, 0);
  }

  /* Delayed animation (to avoid two elements animating in sync which looks janky) */
  &.-delay1 {
    transition: transform 1.5s 0.25s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 1.5s 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
  }
  &.-delay2 {
    transition: transform 1.5s 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 1.5s 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  }

  &.-active {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

}

@media screen and (min-width: 992px) {
  h2.serif-header {
    transform: translate3d(0, 30px, 0);

    &.-delay {
      transition: transform 1.5s 0.05s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 1.5s 0.05s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
  }
}
