@font-face {
  font-family: "Boldonse";
  src: url("assets/Boldonse-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("assets/barlow/Barlow-SemiBold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  margin: 0;

  --font-stack: "Boldonse", "Helvetica", sans-serif;
  --font-paragraph-stack: "Barlow", "Helvetica", sans-serif;
  --background-light: #fff0cb;
  --background-dark: #00bad1;
  --text-dark: #000000;
  --text-light: #fff0cb;
  --yellow: #ffb500;
  /* --pink: #e50054;
  --pink-dark: #c20047; */
  --pink: #e50054;
  --pink-dark: #c20047;
  --white: #ffffff;

  font-family: var(--font-stack);
  background-color: var(--background-light);
  color: var(--text-dark);
}

html {
  scroll-behavior: smooth;
}

/* keeps section titles from hiding under the sticky header */
#home,
#about,
#process,
#team {
  scroll-margin-top: 80px;
}

h1 {
  font-size: 2rem;
  line-height: 1.3;
}
h2 {
  font-size: 1.5rem;
}
p {
  font-size: 0.9rem;
  line-height: 1.8;
}

header {
  display: flex;
  flex-direction: row;
  position: sticky;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  padding: 0.5% 2%;
  background-color: var(--background-dark);
  top: 0;
  z-index: 1000;
}
header img {
  width: 15vw;
  height: auto;
}
header div {
  display: flex;
  flex-direction: row;
  gap: 5vw;
}
header a {
  color: var(--text-light);
}

#home {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin: 5% 5%;
  gap: 5%;
}
#home img {
  height: 70vh;
  width: auto;
  object-fit: contain;
  flex: 1;
}
#home div {
  flex: 1;
}
#home button {
  background-color: var(--pink);
  font-family: var(--font-stack);
  font-size: 100%;
  color: var(--text-light);
  padding: 1em;
  border-width: 0;
  border-radius: 10%;
  margin-top: 1em;
}

#about {
  background-color: var(--background-dark);
  align-self: stretch;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1em 5%;
  padding: 5% 5%;
}
#about h2 {
  color: var(--text-light);
}
#about p {
  background-color: var(--background-light);
  padding: 1em 1.25em;
  border-radius: 1em;
  font-family: var(--font-paragraph-stack);
  font-size: 1.3rem;
  line-height: 1.1;
}
#about > div {
  flex: 1;
}
/* lets the homescreen column shrink below the image's natural width */
#about > #homescreen {
  min-width: 0;
}
#homescreen img {
  /* tall phone screenshot (1272x2505): cap the height in rem so it stays
     close to the about text no matter the page's font size */
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 27.5rem;
  margin: 0 auto;
  border: 4px solid var(--background-light);
  border-radius: 1.5em;
  box-sizing: border-box; /* border stays inside the size limits */
}

/* concept video opens (from the button under the about text) below the about text and homescreen */
/* "#about > #videos" beats the "#about > div { flex: 1 }" rule above,
   so the video takes a full row of its own */
#about > #videos {
  flex: 0 0 100%;
  align-self: stretch;
  text-align: center;
  scroll-margin-top: 80px; /* stays clear of the sticky header */
}
#video-toggle {
  margin-top: 1em;
  border-width: 0;
  background-color: var(--pink);
  font-family: var(--font-stack);
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 0.5em 0.9em;
  border-radius: 0.6em;
}
#video-toggle::after {
  content: "\25BE"; /* small down triangle */
  display: inline-block;
  margin-left: 0.5em;
  transition: rotate 0.2s ease;
}
#video-toggle[aria-expanded="true"]::after {
  rotate: 180deg;
}
.video-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  margin-top: 0.75em;
}
#videos video {
  height: 80vh;
  width: auto;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 1.5em;
}
.video-buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1em;
}
#videos button {
  background-color: var(--pink);
  font-family: var(--font-stack);
  color: var(--text-light);
  padding: 1em;
  border-width: 0;
  border-radius: 10%;
}

#process {
  display: flex;
  align-self: stretch;
  flex-direction: column;
  padding: 5% 5%;
}
#processH2 {
  color: var(--background-dark);
}
#card-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5em;
}
.card {
  background-color: var(--background-dark);
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  padding: 15px;
  border-radius: 20px;
}
.card div {
  background-color: var(--white);
  color: var(--text-dark);
  border-radius: 12px;
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card h2 {
  margin: 0 0 10px 0;
  padding: 10px;

  font-family: var(--font-paragraph-stack);
  font-size: 1.5rem;
  line-height: 1;
}
.card a {
  color: var(--text-dark);
  padding: 4px 10px;

  font-family: var(--font-paragraph-stack);
  font-size: 1.2rem;
  line-height: 1;
}
.card a:last-child {
  padding-bottom: 15px;
}

/* cards for deliverables that are not finished yet */
.coming-soon {
  position: relative;
  filter: grayscale(100%);
  pointer-events: none;
}
.coming-soon::after {
  content: "Coming soon";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--text-dark);
  color: var(--white);
  padding: 3em;
  border-radius: 10px;
  font-size: 0.9rem;
  white-space: nowrap;
}

#team {
  align-self: stretch;
  padding: 5% 5%;
  background-color: var(--background-dark);
  color: var(--text-light);
}
#team-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5em;
}
.teammate {
  flex: 1 1 200px;
  text-align: center;
}
.teammate img {
  width: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 4px solid var(--background-light);
  border-radius: 50%;
  background-color: var(--yellow);
}
.teammate h2 {
  font-size: 1rem;
  margin-bottom: 0;
  font-family: var(--font-stack);
  font-size: 1.5rem;
  line-height: 1;
}
.teammate p {
  font-size: 1rem;
  margin-bottom: 0;
  font-family: var(--font-paragraph-stack);
  font-size: 1.5rem;
  line-height: 0.5;
}

footer {
  align-self: stretch;
  text-align: center;
  background-color: var(--pink);
  color: var(--text-light);
}
footer p {
  font-family: var(--font-paragraph-stack);
  font-size: 1rem;
  line-height: 0.5;
}

/* phones and small tablets */
@media (max-width: 800px) {
  header img {
    width: 30vw;
  }
  header div {
    gap: 3vw;
    font-size: 0.7rem;
  }

  #home,
  #about {
    flex-direction: column;
  }
  #about > #videos {
    flex-basis: auto;
  }
  /* mobile only: unwrap the about text box so the "View concept video"
     button can be reordered to sit below the homescreen image */
  #about > div:first-child {
    display: contents;
  }
  #about h2,
  #about p {
    align-self: stretch;
    margin: 0;
  }
  #about > #homescreen {
    order: 1;
    flex: none;
    align-self: stretch;
  }
  #video-toggle {
    order: 2;
    margin-top: 0;
  }
  #about > #videos {
    order: 3;
  }
  /* on narrow screens a 80vh-tall video would be mostly black bars */
  #videos video {
    height: auto;
    width: 100%;
  }
  #home a {
    display: block;
    text-align: center;
  }
  #home img {
    height: auto;
    width: 50%;
    margin-top: 2em;
    margin-bottom: 2em; /* room under the logo so it isn't cut off */
    flex: none; /* full natural height instead of a squeezed flex share */
  }

  h1 {
    font-size: 1.4rem;
  }
}

/* custom cursor drawn by the page (only on devices with a mouse):
   pink arrow with a light yellow outline, pointing hand over links */
body.custom-cursor,
body.custom-cursor * {
  cursor: none;
}
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  /* arrow: 26x26 viewBox drawn at 36px; tip sits at (4px, 3px) */
  width: 36px;
  height: 36px;
  margin: -3px 0 0 -4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M3 2v19l5-4.6 3.6 7.8 3.4-1.6-3.6-7.6H18z' fill='%23e50054' stroke='%23fff0cb' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat center / contain;
  pointer-events: none;
  z-index: 2000;
  opacity: 0;
}
#cursor.pointer {
  /* hand: 25x29 viewBox at the same scale; fingertip sits at (15px, 2px) */
  width: 35px;
  height: 40px;
  margin: -2px 0 0 -15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-1 -1 25 29'%3E%3Cpath d='M8 2.5a1.75 1.75 0 0 1 3.5 0V11a1.75 1.75 0 0 1 3.5 0v1a1.75 1.75 0 0 1 3.5 0v1a1.75 1.75 0 0 1 3.5 0v6c0 4-3 7-7 7h-2c-3 0-4.5-1.5-6-3.5L1.5 17c-1-1.5.5-3 2-2L8 18z' fill='%23e50054' stroke='%23fff0cb' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M11.5 11v4.5M15 12v3.5M18.5 13v2.5' stroke='%23fff0cb' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* logo hover: smooth, slight expand */
header img,
#home img,
#homescreen img {
  transition: scale 0.25s ease-out;
}
header img:hover {
  scale: 1.08;
}
#home img:hover,
#homescreen img:hover {
  scale: 1.05;
}

/* buttons get slightly darker on hover */
#home button,
#videos button,
#video-toggle {
  transition: background-color 0.2s ease;
}
#home button:hover,
#videos button:hover,
#video-toggle:hover {
  background-color: var(--pink-dark);
}

/* process cards pop in when scrolled into view (script.js adds .pop, then .show) */
.card.pop {
  opacity: 0;
  scale: 0.85;
  transition:
    opacity 0.4s ease-out,
    scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card.pop.show {
  opacity: 1;
  scale: 1;
}

@media (prefers-reduced-motion: reduce) {
  header img,
  #home img,
  #homescreen img,
  #home button,
  #videos button,
  #video-toggle,
  #video-toggle::after {
    transition: none;
  }
}

/* cards grow slightly on hover */
.card {
  transition: scale 0.25s ease-out;
}
.card:hover,
.card.pop.show:hover {
  scale: 1.04;
}

@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .card.pop.show:hover {
    scale: 1;
  }
}
