/* =================================================================================== */
/*                                    home-v3.css                                      */
/*                                                                                     */
/*           This file is part of the asset suite for the Diagrams website.            */
/*                                https://diagrams.app                                 */
/*                                                                                     */
/*                     Copyright (c) 2017-2022 Structured Path GmbH                    */
/* =================================================================================== */

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

/*** Chevron Link ***/

.link-more {
  margin-top: 40px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.link-more > a {
  display: inline-block;
  position: relative;
  padding: 10px;
  
  text-decoration: none !important;
  color: var(--ci-color-monochrome-darkest);
}

.link-more > a::after {
  content: "";
  
  display: inline-block;
  position: absolute;
  
  width: 10px;
  height: 17px;
  top: 15.5px;
  right: -6px;
  
  background: url(https://assets.diagrams.app/img/home/chevron.svg);
}

/*** Anchors ***/

main a[name] {
  position: absolute;
  top: -180px;
}

/* Phone */
@media only screen and (max-width: 640px) {
  main a[name] {
    top: -20px;
  }
}

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

#home-v3-hero .page-content {
  padding-top: 0;
  padding-bottom: 0;
}

/*** Gradient ***/

#home-v3-hero {
  background: var(--ci-color-teal);
  background-image: linear-gradient(
    to bottom, 
    var(--ci-color-teal) 88px, 
    var(--ci-color-yellow) 80%, 
    var(--ci-color-monochrome-light) 80%
  );
}

/*** Pattern ***/

/* Hide horizontal overflow outside of the body to prevent scrolling. */
#siteWrapper {
  overflow-x: hidden;
}

#home-v3-hero .image-block-wrapper {
  position: relative;
  overflow: visible;
}

#home-v3-hero .image-block-wrapper::before,
#home-v3-hero .image-block-wrapper::after {
  content: "";
  
  position: absolute;
  top: 0;
  bottom: 210px;
  width: 400px;
  height: auto;
  
  opacity: 0.9;
  background-image: url(https://assets.diagrams.app/img/home/hero-pattern-side.svg);
  background-repeat: no-repeat;
  background-position: bottom right;
}

#home-v3-hero .image-block-wrapper::before {
  left: -320px;
}

#home-v3-hero .image-block-wrapper::after {
  right: -320px;
  transform: scaleX(-1);
}

/* Tablet Large */
@media only screen and (max-width: 1024px) {
  #home-v3-hero .image-block-wrapper::before,
  #home-v3-hero .image-block-wrapper::after {
  	display: none;
  }
}

/*** Title (App Icon + Headings) ***/

#home-v3-hero .hero-title {
  margin-top: 40px;
  margin-bottom: 20px;
  
  display: flex;
  flex-direction: row;
  justify-content: center;
  column-gap: 30px;
}

#home-v3-hero .hero-title-icon {
  max-width: 180px;
  max-height: 180px;
}

#home-v3-hero .hero-title-headings {
  display: flex;
  flex-direction: column;
  justify-content: center;
  row-gap: 6px;
}

#home-v3-hero .hero-title-headings h1,
#home-v3-hero .hero-title-headings p {
  margin: 0;
  color: white !important;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.20);
}

#home-v3-hero .hero-title-headings h1 {
  line-height: 1;
  
  /* Vertically align the leading 'D' character with the subheading. */
  margin-left: -3px;
}

#home-v3-hero .hero-title-headings h1 span:first-child {
  font-size: 60px;
}

#home-v3-hero .hero-title-headings h1 span:last-child {
  font-size: 35px;
  font-weight: normal;
  text-transform: none;
}

#home-v3-hero .hero-title-headings p {
  font-size: 24px;
  font-weight: 500 !important;
  opacity: 0.8;
}

/* Tablet */
@media only screen and (max-width: 768px) {
  #home-v3-hero .hero-title {
    column-gap: 20px;
  }
  
  #home-v3-hero .hero-title-icon {
    max-width: 160px;
    max-height: 160px;
  }
  
  #home-v3-hero .hero-title-headings {
    row-gap: 4px;
  }
  
  #home-v3-hero .hero-title-headings h1 span:first-child {
    font-size: 55px;
  }
  
  #home-v3-hero .hero-title-headings h1 span:last-child {
    font-size: 30px;
  }
  
  #home-v3-hero .hero-title-headings p {
    font-size: 22px;
  }
}

/* Phone */
@media only screen and (max-width: 640px) {
  #home-v3-hero .hero-title {
    margin-top: 15px;
    margin-bottom: 15px;
    
    flex-direction: column;
    align-content: center;
  }
  
  #home-v3-hero .hero-title-icon,
  #home-v3-hero .hero-title-headings {
    margin: auto;
  }
  
  #home-v3-hero .hero-title-headings {
    row-gap: 12px;
  }
  
  #home-v3-hero .hero-title-headings h1 {
    display: flex;
    flex-direction: column;
    align-content: center;
  }
  
  #home-v3-hero .hero-title-headings h1 span {
    margin: auto;
  }
  
  #home-v3-hero .hero-title-headings h1 span:first-child {
    line-height: 1.2;
    font-weight: 500 !important;
  }
  
  #home-v3-hero .hero-title-headings p {
    text-align: center;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 300 !important;
  }
}

/*** CTA ***/

#home-v3-hero .hero-cta {
  margin-bottom: 20px;
}

#home-v3-hero .hero-cta-buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  column-gap: 10px;
  row-gap: 10px;
}

#home-v3-hero .cta-button {
  display: block;
  
  /* Ignore Live Text I-beam cursor and enforce the hand pointer cursor. */
  cursor: pointer;
}

#home-v3-hero .cta-button img {
  transition: .1s opacity linear;
}

#home-v3-hero .cta-button img:hover {
  opacity: 0.8;
}

#home-v3-hero .cta-button img {
  display: block;
  margin: auto;
}

/* Tablet */
@media only screen and (max-width: 768px) {
  #home-v3-hero .hero-cta {
    margin-bottom: 10px;
  }
  
  #home-v3-hero .cta-button {
    height: 55px;
  }
  
  #home-v3-hero .cta-button img {
    height: 100%;
  }
}

/* Phone */
@media only screen and (max-width: 640px) {
  #home-v3-hero .hero-cta-buttons {
    flex-direction: column;
    align-content: center;
  }
}

/*** Footnote ***/

#home-v3-hero .hero-cta-footnote {
  margin-top: 15px;
  font-size: 14px;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.20);
  line-height: 1.2;
}

#home-v3-hero .hero-cta-footnote p {
  margin-top: 4px;
  margin-bottom: 4px;
}

#home-v3-hero .hero-cta-footnote p,
#home-v3-hero .hero-cta-footnote a {
  color: white;
}

/* ----------------------------------------------------------------------------------- */
/* Testimonials (Top)                                                                  */
/* ----------------------------------------------------------------------------------- */

#home-v3-testimonials-top {
  background: var(--ci-color-monochrome-light);
}

/* Testimonial Logos */
#home-v3-testimonials-top img {
  height: 60px;
}

#home-v3-testimonials-top figcaption {
  padding-top: 0;
}

/* More styling inherited from bottom testimonial section */

/* ----------------------------------------------------------------------------------- */
/* Video                                                                               */
/* ----------------------------------------------------------------------------------- */

#home-v3-video {
  position: relative;
}

#home-v3-video::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 50%;
  
  background: var(--ci-color-monochrome-light);
}

#home-v3-video .page-content {
  padding-top: 0;
  padding-bottom: 0;
}

#home-v3-video .native-video-player {
  background-color: var(--ci-color-monochrome-darkest);
  box-shadow: 0 1px 4px 0 rgba(0,0,0,0.30), 0 4px 8px 0 rgba(0,0,0,0.20);
}

/* ----------------------------------------------------------------------------------- */
/* What's New                                                                          */
/* ----------------------------------------------------------------------------------- */

/*** Heading ***/

#home-v3-whats-new h1>em {
  font-weight: 100;
}

/*** Grid ***/

#home-v3-whats-new {
  --cell-spacing: 25px;
}

#home-v3-whats-new .grid {
  display: flex;
  flex-direction: column;
}

#home-v3-whats-new .row:not(:last-child) {
  padding-bottom: var(--cell-spacing);
}

#home-v3-whats-new .cell:not(:last-child) {
  margin-right: var(--cell-spacing);
}

/*** Rows ***/

#home-v3-whats-new .row {
  display: flex;
  flex-direction: row;
}

#home-v3-whats-new .cell {
  flex-basis: 0;
  flex-grow: 1;
  flex-shrink: 1;
}

/* Phone */
@media only screen and (max-width: 640px) {
  #home-v3-whats-new .row {
    flex-direction: column;
  }
  
  #home-v3-whats-new .cell {
    flex-basis: auto;
  }
  
  #home-v3-whats-new .cell:not(:last-child) {
    margin-right: 0;
    margin-bottom: var(--cell-spacing);
  }
}

/*** Cells ***/

#home-v3-whats-new .cell {
  border-radius: 20px;
  overflow: hidden;
}

#home-v3-whats-new .cell-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-content: center;
}

#home-v3-whats-new .cell-left,
#home-v3-whats-new .cell-right {
  flex-grow: 1;
}

#home-v3-whats-new .cell-text {
  padding: 40px;
}

#home-v3-whats-new .cell-text p:last-child {
  margin-bottom: 0;
}

#home-v3-whats-new .cell h3 {
  font-size: 1.2em;
  text-transform: none;
}

#home-v3-whats-new img {
  /* Disable dragging */
  user-drag: none;
  -webkit-user-drag: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

#home-v3-whats-new .cell-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

#home-v3-whats-new .cell-image-wrapper img {
  position: absolute;
  display: block;
  max-width: unset;
}

/* Phone */
@media only screen and (max-width: 640px) {
  #home-v3-whats-new .cell-container {
    flex-direction: column;
  }
  
  #home-v3-whats-new .cell-text {
    padding: 25px;
    text-align: center;
  }
}

/*** Cell: Shortcuts ***/

#home-v3-whats-new .cell-shortcuts {
  min-height: 320px;
  
  background-color: var(--ci-color-monochrome-light);
}

#home-v3-whats-new .cell-shortcuts .cell-left {
  flex-basis: 390px;
  flex-grow: 0;
}

#home-v3-whats-new .cell-shortcuts .cell-image-wrapper img {
  height: 115%;
  left: 5%;
  bottom: -20%;
}

/* Desktop */
@media only screen and (max-width: 1024px) {
  #home-v3-whats-new .cell-shortcuts .cell-image-wrapper img {
  	height: 90%;
  	left: 5%;
  	bottom: 48%;
  	transform: translate(0, 50%);
  }
}

/* Tablet */
@media only screen and (max-width: 768px) {
  #home-v3-whats-new .cell-shortcuts .cell-image-wrapper img {
  	left: -15%;
  }
}

/* Phone */
@media only screen and (max-width: 640px) {
  #home-v3-whats-new .cell-shortcuts {
    min-height: 0;
  }
  
  #home-v3-whats-new .cell-shortcuts .cell-left {
    flex-basis: 0;
  }
  
  #home-v3-whats-new .cell-shortcuts .cell-right {
  	height: 200px;
  }
  
  #home-v3-whats-new .cell-shortcuts .cell-image-wrapper img {
    height: 110%;
    object-fit: contain;
    
    left: 50%;
    bottom: -10%;
    transform: translate(-52%, 0);
  }
}

/* Phone (Small) */
@media only screen and (max-width: 414px) {
  #home-v3-whats-new .cell-shortcuts .cell-right {
    height: 180px;
  }
  
  #home-v3-whats-new .cell-shortcuts .cell-image-wrapper img {
  	width: 85%;
  	height: auto;
  }
}

/*** Second Row: ***/

#home-v3-whats-new .row-second {
  min-height: 300px;
}

/* Tablet */
@media only screen and (max-width: 768px) {
  #home-v3-whats-new .row-second {
    min-height: unset;
  }
}

/*** Cell: Monterey ***/

#home-v3-whats-new .cell-monterey {
  flex-basis: 40%;
  flex-grow: 0;
  position: relative;
}

#home-v3-whats-new .cell-monterey img {
  position: absolute;
  display: block;
  min-width: 100%;
  min-height: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#home-v3-whats-new .cell-monterey h3 {
  position: absolute;
  display: block;
  margin: 0;
  top: 50%;
  width: 90%;
  transform: translate(5%, -50%);
  text-align: center;
  
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.40);
}

#home-v3-whats-new .cell-monterey h3 span {
  display: block;
}

#home-v3-whats-new .cell-monterey h3 span:last-child {
  padding-top: 8px;
  font-size: 34px;
  letter-spacing: 1.2px;
  line-height: 1.2em;
}

/* Phone */
@media only screen and (max-width: 640px) {
  #home-v3-whats-new .cell-monterey {
    flex-basis: 0;
    flex-grow: 1;
    min-height: 200px;
  }
}

/*** Cell: Shapes & Heads ***/

#home-v3-whats-new .cell-shapes {
  background-color: var(--ci-color-monochrome-lightest);
}

#home-v3-whats-new .cell-shapes .cell-left {
  flex-basis: 325px;
  flex-grow: 0;
}

#home-v3-whats-new .cell-shapes .cell-text {
  /* Decrease standard padding around text */
  padding-right: 20px;
}

#home-v3-whats-new .cell-shapes .cell-image-wrapper img {
  width: 500px;
  max-width: 220%;
  
  right: 0;
  bottom: 50%;
  transform: translate(0, 50%);
}

/* Tablet */
@media only screen and (max-width: 768px) {
  #home-v3-whats-new .cell-shapes .cell-right {
    display: none;
  }
  
  #home-v3-whats-new .cell-shapes .cell-left {
    flex-basis: auto;
  }
  
  #home-v3-whats-new .cell-shapes .cell-left .cell-text {
    padding-right: 40px;
  }
}

/* Phone */
@media only screen and (max-width: 640px) {
  #home-v3-whats-new .cell-shapes .cell-right {
    display: block;
    height: 180px;
  }
  
  #home-v3-whats-new .cell-shapes .cell-image-wrapper img {
    width: auto;
    height: 180%;
    
    bottom: 0;
    right: 50%;
    transform: translate(50%, 0) rotate(90deg);
  }
}

/* ----------------------------------------------------------------------------------- */
/* Use Cases                                                                           */
/* ----------------------------------------------------------------------------------- */

#home-v3-use-cases {
  background-color: var(--ci-color-monochrome-light);
}

/*** Custom Headings & Styling ***/

#home-v3-use-cases h2 {
  font-size: 2em;
  text-align: center;
  text-transform: uppercase;
}

#home-v3-use-cases h3 {
  font-size: 1.2em;
  text-transform: none;
}

/*** Images ***/

#home-v3-use-cases .image-block-wrapper {
  height: 200px;
}

#home-v3-use-cases .image-block .sqs-image-shape-container-element {
  height: 100% !important;
  padding: 0 !important;
}

#home-v3-use-cases img {
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  object-fit: contain !important;
  
  border-radius: 10px;
  background: white;
}

/* ----------------------------------------------------------------------------------- */
/* Features                                                                            */
/* ----------------------------------------------------------------------------------- */

#home-v3-features {
  --color-title: white;
  --color-description: rgba(255, 255, 255, 0.5);
}

#home-v3-features {
  background-color: var(--ci-color-monochrome-dark);
}

/* Reduce padding of the spacers that span the whole width.  */
#home-v3-features .sqs-col-12 > .spacer-block > div {
  padding: 0 !important;
}

#home-v3-features .html-block {
  padding-top: 4px;
}

#home-v3-features h3 {
  color: var(--color-title) !important;
  text-transform: none;
}

#home-v3-features p {
  color: var(--color-description) !important;
  font-size: 0.9em;
  line-height: 1.5em;
}

/* The SVG icons are wrapped in a code block. */
#home-v3-features .code-block {
  padding: 0;
}

#home-v3-features .code-block img {
  display: block;
  height: 48px;
  margin: 17px auto;
}

/* Phone */
@media only screen and (max-width: 640px) {
  #home-v3-features .html-block {
    padding-top: inherit;
  }
  
  #home-v3-features p {
    margin: 0 auto;
    max-width: 320px;
  }
}

/* ----------------------------------------------------------------------------------- */
/* Pricing                                                                             */
/* ----------------------------------------------------------------------------------- */

#home-v3-pricing h2 {
  display: none;
}

#home-v3-pricing h3 {
  text-transform: none;
  font-size: 26px;
  letter-spacing: 1.1px;
}

#home-v3-pricing .plans {
  display: flex;
  flex-direction: row;
  justify-content: center;
  column-gap: 40px;
}

#home-v3-pricing .plan {
  width: 380px;
  text-align: center;
}

#home-v3-pricing .plan-body {
  height: 388px;
  padding: 32px;
  
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  
  background-color: var(--ci-color-monochrome-lightest);
  border-radius: 16px;
}

#home-v3-pricing .plan-price p {
  margin: 0;
}

#home-v3-pricing .plan-price-amount {
  padding-right: 10px;
}

#home-v3-pricing .plan-price-amount {
  letter-spacing: -1.5px;
  line-height: 1.1;
  font-size: 50px;
  font-weight: 500;
  color: var(--ci-color-monochrome-darkest);
}

#home-v3-pricing .plan-price-amount span {
  letter-spacing: 2px;
  font-size: 22px;
  vertical-align: super;
}

#home-v3-pricing .plan-price-period {
  font-size: 20px;
  line-height: 1;
}

#home-v3-pricing hr {
  width: 200px;
  border-top: 2px dotted var(--ci-color-monochrome-darkest);
  opacity: 0.2;
  margin-top: 30px;
  margin-bottom: 30px;
}

#home-v3-pricing ul {
  padding: 0;
  list-style-position: inside;
  list-style-image: url(https://assets.diagrams.app/img/home/checkmark.svg);
  font-size: 16px;
  line-height: 2.3;
  letter-spacing: 0;
}

#home-v3-pricing .plan-button {
  display: grid;
  place-content: center;
  height: 48px;
  width: 220px;
  margin: 0 auto;
  
  border-radius: 24px;
  background: var(--ci-color-magenta);
  color: white;
  font-size: 15px;
  letter-spacing: 1.8px;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: .1s opacity linear;
}

#home-v3-pricing .plan-button:hover {
  opacity: 0.8;
}

#home-v3-pricing .plan-footnote {
  font-size: 12px;
  line-height: 1.5;
}

/* Tablet Large */
@media only screen and (max-width: 1024px) {
  #home-v3-pricing .page-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  #home-v3-pricing .plans {
    column-gap: 20px;
  }
  
  #home-v3-pricing .plan-body {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Tablet Small */
@media only screen and (max-width: 768px) {
  #home-v3-pricing .plans {
    flex-direction: column;
    align-items: center;
    row-gap: 20px;
  }
  
  #home-v3-pricing .plan-body {
    height: auto;
    row-gap: 12px;
  }
}

/* Phone */
@media only screen and (max-width: 640px) {
  #home-v3-pricing .page-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  #home-v3-pricing .plan {
    width: 100%;
    max-width: 360px;
  }
}

/* ----------------------------------------------------------------------------------- */
/* Testimonials (Bottom)                                                               */
/* ----------------------------------------------------------------------------------- */

#home-v3-testimonials-bottom {
  background-color: var(--ci-color-monochrome-light);
}

#home-v3-testimonials-bottom blockquote, 
#home-v3-testimonials-top blockquote {
  font-style: normal;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--ci-color-monochrome-darkest);
  letter-spacing: 0.1px;

  padding: 10px 10px 0;
}

#home-v3-testimonials-bottom blockquote::before {
  content: "“";
  display: block;
  font-size: 4em;
  font-style: normal;
  opacity: 0.3;
}

#home-v3-testimonials-bottom figcaption, 
#home-v3-testimonials-top figcaption {
  font-size: 0.875em;
  color: rgba(11,50,50,.5);
  padding-top: 1em;
}

#home-v3-testimonials-bottom figcaption a, 
#home-v3-testimonials-top figcaption a {
  text-decoration: none !important;
}

#home-v3-testimonials-bottom figcaption a:hover, 
#home-v3-testimonials-top figcaption a:hover {
  text-decoration: underline !important;
}

#home-v3-testimonials-bottom img {
  opacity: 0.6;
  filter: grayscale(100%);
  transition: filter 0.2s linear;
}

#home-v3-testimonials-bottom img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* Constrain the maximum width of small testimonial logos (all rows execpt the last one). */
#home-v3-testimonials-bottom .span-12 > .row:not(:last-child) figure {
	max-width: 280px !important;
}

/* Constrain the maximum width of large testimonial logos (last row). */
#home-v3-testimonials-bottom .span-12 > .row:last-child figure {
	max-width: 150px !important;
}

/* Add additional padding between small and large testimonal logos. */
#home-v3-testimonials-bottom .span-12 > .row:last-child {
	padding-top: 15px;
}

/* ----------------------------------------------------------------------------------- */
/* Newsletter                                                                          */
/* ----------------------------------------------------------------------------------- */

#home-v3-newsletter {
  background-color: var(--ci-color-monochrome-dark);
}

#home-v3-newsletter .newsletter-block p,
#home-v3-newsletter .newsletter-block a {
  color: white;
}

#home-v3-newsletter .newsletter-block .newsletter-form-body .field-element {
  color: white;
  background: none;
  border: none;
  border-bottom: 1px solid white;
}

#home-v3-newsletter .newsletter-block .newsletter-form-body .field-element:focus {
  color: white;
  background: none;
  border: none;
  border-bottom: 1px solid var(--ci-color-magenta);
}

#home-v3-newsletter .newsletter-block .newsletter-form-body .field-element::placeholder {
  color: white;
  opacity: 0.5;
}
