/* BASE */

:root {
  /* Colors */
  --bebby-silk: #f3d6ce;
  --bebby-fawn: #d6b771;
  --bebby-mauve: #8f758e;
  --bebby-black: #211f1d;
  --bebby-white: #fafaf8;

  /* Layout */
  --content-width: 1100px;
  --section-padding: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-width: 320px;
  /* max-width: 1140px; */
  margin: 0 auto;
  font-family: 'Questrial', sans-serif;
  color: var(--bebby-mauve);
  background-color: var(--bebby-white);

}

h1,
h2 {
  font-family: 'Libre Baskerville', serif;
}

h2 {
  width: 200px;
  margin-inline: auto;
  font-size: 24px;
  text-align: center;
}

p {
  width: 70%;

  line-height: 1.5;
  font-size: 1.1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

.highlight {
  color: var(--bebby-fawn);
}

ul {
  list-style: none;
}

html {
  scroll-behavior: smooth;
}

.wrapper {
  max-width: 1140px;
  margin: 0 auto;
}


/* ACCESSIBILITY */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* SHARED LAYOUT */
.section {
  padding: var(--section-padding) 0;
}

.section--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}


/* HERO */

#jenn-portfolio {
  margin: 0 auto;
}

#jenn-portfolio .hero {
  position: relative;
  height: 50vh;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-content {
  position: relative;

  width: clamp(500px, 55vw, 700px);
  height: 100%;
  margin-inline: auto;

  flex: 1;
}

.hero-image {
  position: absolute;
  left: -60px;
  top: -80px;
  z-index: 0;
}

.hero-image img {
  display: block;
  width: auto;
}

.hero-copy {
  position: absolute;
  z-index: 1;
  width: 100%;
  padding: 0 2rem;
  text-align: left;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: flex-start;
}

.hero-copy h1 {
  width: 200px;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.6;
}

.hero-copy h1 span {
  display: block;
}

.hero-scroll {
  margin-top: 10px;
  margin-left: 50px;
  display: inline-block;
  font-size: 2.5rem;
  animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll {
    animation: none;
  }
}

/* NAV */

.nav {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: max(20px, env(safe-area-inset-top)) 16px 25px;
}

.nav .logo {
  font-family: 'Libre Baskerville', serif;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
}

.logo-nav {
  display: none;
}

.nav-toggle {
  position: fixed;
  right: 20px;
  z-index: 20;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle i {
  font-size: 1.25rem;
  color: var(--bebby-mauve)
}

#nav-menu {
  position: fixed;
  inset: 0;
  z-index: 10;

  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;

  background-color: var(--bebby-silk);
  font-size: 2.75rem;
}

#nav-menu.is-open {
  display: flex;
}

#nav-menu ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

#nav-menu a {
  display: block;
  text-align: center;
}

#nav-menu a:hover,
#nav-menu a:focus {
  opacity: 70%;
}

body.menu-open {
  overflow: hidden;
}


/* PERSONAL STATEMENT */
.personal-statement {
  background-color: var(--bebby-black);
}

.statement-container {
  padding: var(--section-padding) 0;


  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.personal-statement p {
  color: var(--bebby-white);
  /* font-size: 0.875rem; */
  text-align: center;
  margin: inherit;
}


/* BRANDS */
#brands {
  background-color: var(--bebby-white);
}

#brands .brand-cards-container {
  display: grid;
  /* grid-template-columns: repeat(auto-fit, 125px); */
    grid-template-columns: repeat(auto-fit, minmax(max(125px, calc(100% / 6 - 16px)), 1fr)); 
  gap: 16px;

  margin: 0 auto;
  padding: 40px 20px 0;

  justify-content: center;
  justify-items: center;
}

#brands .brand-cards-container > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
}

#brands .card {
  width: 125px;
  height: 100px;

  display: flex;
  align-items: center;
  justify-content: center;
}

#brands .card img {
  max-width: 110px;
  max-height: 75px;
}

#brands .card img.desserts-artisanaux {
  max-width: 125px;
  max-height: 100px;
}


/* CONTENT STATMENT */
#content {
  background-color: var(--bebby-black);
}

#content p {
  width: 230px;
  color: var(--bebby-white);
}


/* SERVICES */

#services {
  margin: 0;
}

.services-container {
  position: relative;
  overflow: hidden;

  max-height: 270px;
  padding-bottom: 55px;

  transition: max-height 0.4s ease;
}

.service-card-container {
  margin-top: 25px;
  margin-bottom: 20px;

  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.service-card {
  width: 40%;
  height: 100px;
  margin: 10px;
  padding: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 2px solid var(--bebby-mauve);
  box-shadow: 2px 2px 2px var(--bebby-black);
}

.service-card p {
  width: 200px;
  text-align: center;
  line-height: 1.1rem;
}


/* FADE */

.services-container::after {
  content: "";

  position: absolute;
  inset-inline: 0;
  bottom: 0;

  height: 90px;

  background: linear-gradient(
    to bottom,
    transparent,
    var(--bebby-white)
  );

  pointer-events: none;
}


/* TOGGLE */

.services-toggle {
  position: absolute;
  z-index: 2;

  bottom: 0px;
  left: 50%;

  width: 45px;
  height: 45px;

  transform: translateX(-50%);

  display: flex;
  align-items: center;
  justify-content: center;

  border: 2px solid var(--bebby-mauve);
  border-radius: 50%;

  background: var(--bebby-white);
  color: var(--bebby-black);

  cursor: pointer;

  transition: transform 0.3s ease;
}

.services-toggle i {
  font-size: 1rem;
}


/* EXPANDED */

.services-container.is-expanded {
  max-height: 2000px;
}

.services-container.is-expanded::after {
  display: none;
}

.services-container.is-expanded .services-toggle {
  transform: translateX(-50%) rotate(180deg);
}


/* CONTENT PORTFOLIO */
#content-portfolio {
  background-color: var(--bebby-silk);
}

.video-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  max-width: 90vw;
  max-height: 90vh;
}

.video-container video {
  display: block;
  width: auto;
  max-width: 90vw;
  max-height: 90vh;
  aspect-ratio: 9 / 16;
  object-fit: contain;
}

.video-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;

  transform: translate(-50%, -50%);

  color: var(--bebby-white);
  font-size: 2rem;
}

.video-loader i {
  animation: video-spin 1s linear infinite;
}

@keyframes video-spin {
  to {
    transform: rotate(360deg);
  }
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 1rem;

  background: rgb(33 31 29 / 90%);
}

.video-modal[hidden] {
  display: none;
}

.video-modal video {
  display: block;

  width: auto;
  max-width: 90vw;
  max-height: 90vh;

  aspect-ratio: 9 / 16;
  object-fit: contain;
}

.video-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;

  border: 0;
  background: transparent;

  color: var(--bebby-white);
  font-size: 2rem;
  line-height: 1;

  cursor: pointer;
}

.video-error {
  color: var(--bebby-white);
  font-family: "Questrial", sans-serif;
  font-size: 1rem;
  text-align: center;
}

.portfolio-grid {
  padding: 40px 30px 0;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  
}

#content-portfolio .second-header {
  margin-top: 50px;
}

.portfolio-thumbnail {
  position: relative;
  display: block;

  width: 150px;
  height: 270px;
  box-shadow: 5px 5px 5px rgb(from var(--bebby-black) r g b / 60%);


  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: pointer;
}

.portfolio-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;

  background: rgb(33 31 29 / 0%);

  transition: background-color 0.25s ease;
}

.portfolio-title {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 20px;

  color: var(--bebby-white);
  font-family: "Libre Baskerville", serif;
  font-size: 0.85rem;
  line-height: 1.3;
  text-align: center;

  opacity: 0;

  transition: opacity 0.25s ease;
}

.portfolio-thumbnail:hover .portfolio-overlay,
.portfolio-thumbnail:focus-visible .portfolio-overlay {
  background: rgb(33 31 29 / 60%);
}

.portfolio-thumbnail:hover .portfolio-title,
.portfolio-thumbnail:focus-visible .portfolio-title {
  opacity: 1;
}

.portfolio-thumbnail:focus-visible {
  outline: 3px solid var(--bebby-white);
  outline-offset: -3px;
}

.portfolio-play {
  position: absolute;
  top: 50%;
  left: 50%;

  display: grid;
  place-items: center;

  width: 3rem;
  height: 3rem;

  transform: translate(-50%, -50%);

  border-radius: 50%;
  background: rgb(33 31 29 / 70%);
  color: var(--bebby-white);

  pointer-events: none;
}

.portfolio-play i {
  margin-left: 0.15rem;
  font-size: 0.9rem;
}


/* ABOUT */
#about {
  background-color: var(--bebby-black);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-bottom: 40px;
}

#about .about-image-container {
  width: 200px;
  height: 200px;
  margin-top: 20px;
  
  border: 1px solid var(--bebby-silk);
  border-radius: 50%;
  overflow: hidden;

  display: flex;
  justify-content: center;
  align-items: center;
}

#about img {
  /* object-fit: cover; */
  scale: calc(25%);
  padding-bottom: 150px;
  /* object-position: 50% 100%; */
}

.about-container {
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;

  margin-top: 20px;
  padding-bottom: 55px;

  max-height: 400px;
  transition: max-height 0.4s ease;
}

#about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#about p {
  width: 85%;
  color: var(--bebby-white);
  text-align: left;
}

#about a {
  text-decoration: underline;
}

#about a:hover,
#about a:focus {
  color: var(--bebby-mauve);
  text-decoration: none;
}

/* Fade */
.about-container::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 100px;

  background: linear-gradient(
    to bottom,
    transparent,
    var(--bebby-black)
  );

  pointer-events: none;
}

/* Toggle */
.about-toggle {
  position: absolute;
  z-index: 2;
  bottom: 10px;
  left: 50%;

  width: 45px;
  height: 45px;

  transform: translateX(-50%);

  display: flex;
  align-items: center;
  justify-content: center;

  border: 2px solid var(--bebby-silk);
  border-radius: 50%;

  background-color: var(--bebby-black);
  color: var(--bebby-white);

  cursor: pointer;

  transition: transform 0.3s ease;
}

.about-toggle i {
  font-size: 1rem;
}

/* Expanded */
.about-container.is-expanded {
  max-height: 2000px;
  padding-bottom: 80px;
}

.about-container.is-expanded::after {
  display: none;
}

.about-container.is-expanded .about-toggle {
  bottom: 10px;
  transform: translateX(-50%) rotate(180deg);
}


/* CONTACT */
#contact {
  background-color: var(--bebby-white);
}

#contact p {
  width: 230px;
  font-size: 0.9rem;
}

.portfolio-form {
  width: 100%;
  padding: 20px 30px 0;
}

.form-group {
  position: relative;
  margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 10px;

  border: 0;
  border-radius: 6px;

  font-family: 'Libre Baskerville', serif;
  font-size: .9rem;
  color: var(--bebby-black);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--bebby-mauve);
  outline-offset: 2px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--bebby-black);
  opacity: .9; 
}

.form-group textarea {
  padding: 15px 10px;
  resize: vertical;

  background-color: hsl(
    from var(--bebby-mauve) h s l / 0.8
  );
}

.form-group:nth-of-type(1) input {
  background-color: hsl(
    from var(--bebby-mauve) h s l / 0.4
  );
}

.form-group:nth-of-type(2) input {
  background-color: hsl(
    from var(--bebby-mauve) h s l / 0.6
  );
}

.form-group label {
  position: absolute;

  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);

  white-space: nowrap;
  border: 0;
}

.submit-btn {
  width: 200px;
  min-height: 50px;
  margin-top: 10px;

  border: 2px solid var(--bebby-mauve);
  border-radius: 6px;

  background-color: var(--bebby-mauve);
  color: var(--bebby-white);

  font-family: 'Libre Baskerville', serif;
  font-size: .9rem;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.submit-btn:hover {
  background-color: transparent;
  color: var(--bebby-mauve);
}

.submit-btn:focus-visible {
  outline: 2px solid var(--bebby-mauve);
  outline-offset: 3px;
}

.submit-btn:active {
  transform: translateY(1px);
}


/* FOOTER */
.footer {
  height: 60px;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: var(--bebby-mauve);
}

.footer-icons {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-icons a {
  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-icons i {
  color: var(--bebby-white);
  font-size: 1.25rem;

  transition: opacity 0.2s ease;
}

.footer-icons a:hover i,
.footer-icons a:focus-visible i {
  opacity: 0.7;
}

.footer-icons a:focus-visible {
  outline: 2px solid var(--bebby-white);
  outline-offset: 4px;
}


@media (min-width: 525px) {
  .hero-copy br {
    display: none;
  }

}

/* 880px+ */
@media (min-width: 880px) {
  /* GLOBAL */
  h2 {
    width: 600px;
  }


  /* HERO */
  #jenn-portfolio .hero {
    min-height: 600px;
  }

  .hero-content  {
    width: 880px;
    display: flex;

    background-image: url(./images/jenn-hero-tablet.webp);
    background-position: 160% 36%;
    background-repeat: no-repeat;
  }
  .hero-copy {
    display: block;
    position: static;

    width: 50%;
    margin: 150px 0 0 100px;
  }

  .hero-copy  h1 {
    width: 300px;
  }

  .hero-copy h1 span {
    display: inline;
  }

  .hero-image {
    display: none;
  }

  .hero-scroll {
    margin-top: 20px;
    margin-left: 125px;
  }

  /* PERSONAL STATEMENT */
  #content p {
    width: 600px;
  }


  /* ABOUT */
  .about-container {
    max-height: 165px;
  }

  .about-container.is-expanded {
    max-height: max-content;
  }

  /* CONTACT */
  #contact p {
    width: 600px;
    font-size: inherit;
  }
}

/* 1140px+ */

@media (min-width: 1140px) {
  /* GENERAL */
  h2 {
    font-size: 2.3rem;
  }
  p {
    font-size: 1.4rem;
  }

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


  #jenn-portfolio .hero {
    height: 800px;
  }
  .hero-content {
    width: 1140px;
    background-image: url(./images/jenn-hero-desktop.png);
    background-size: 70%;
    background-position: 111% 54%;

  }

  .hero-copy {
    margin: 280px 0 0 50px;
  }

  .hero-copy h1 {
    width: 600px;
    font-size: 2.75rem;
  }

  .hero-scroll {
    display: none;
  }

  /* NAV */
  .logo-solo {
    display: none;
  }

  .logo-nav {
    display: block;
    width: 300px;
  }

  .nav .logo {
    font-size: 1.5rem;
  }

  .nav-toggle {
    display: none;
  }

  #nav-menu {
    height: 100px;

    position: fixed;
    top:0;
    z-index: 30;

    background: linear-gradient(
      to bottom,
      var(--bebby-white),
      var(--bebby-white) 90%,
      transparent
    );

    font-size: 1.2rem;

    display: flex;
    flex-direction: row;
  }

  #nav-menu ul {
    flex-direction: row;
    justify-content: center;
    width: 300px;
  }

  /* BRANDS */
  #brands .brand-cards-container {
    gap: 70px;
    padding-top: 70px;
  }

  #brands .card img {
    max-width: 170px;
    max-height: 100px;
  }

  #brands .card img.desserts-artisanaux {
    max-width: inherit;
    max-height: 162px;
  }

  /* SERVICES */
  .service-card p {
    width: 400px;
    line-height: 1.4rem
  }

  /* ABOUT */
  .about-container {
    max-height: 192px;
  }
  #about p {
    width: 87%;
  }

  /* CONTACT */
  #contact p {
    font-size: 1.4rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 1rem;
  } 

  .submit-btn {
    width: 300px;
    font-size: 1.1rem;
  }
}
