/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
  /* adjust colors here */
  --color-text: #000;
  --color-page-bg: #fff;                 /* page and white sections */
  --color-section-light: #f4f4f3;        /* light portfolio sections */
  --color-fx: #dad7db;                   /* grey intro and footer (pattern colors are in .section--fx) */
  --color-panel: #f4f4f3;                /* About text box */
  --color-input-bg: #fafafa;
  --color-muted: #6b6b6b;                /* "(required)" labels */
  --color-button-bg: #000;
  --color-button-text: #fff;
  --color-arrow-bg: rgba(0, 0, 0, 0.7);  /* carousel arrow circles */
  --color-arrow-icon: #fff;
  --color-divider: #000;                 /* section edge lines */

  /* adjust fonts here (the Squarespace site used Aktiv Grotesk from Adobe Fonts) */
  --font-main: "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* adjust font sizes here */
  --fs-site-title: clamp(1.25rem, 1.03rem + 0.93vw, 1.9rem);
  --fs-section-title: clamp(1.25rem, 1.03rem + 0.93vw, 1.9rem);
  --fs-marquee: clamp(1.05rem, 0.8rem + 0.7vw, 1.4rem);
  --fs-question: clamp(1.05rem, 0.95rem + 0.35vw, 1.3rem);
  --fs-footer-title: clamp(1.05rem, 0.95rem + 0.35vw, 1.3rem);
  --fs-body: 0.95rem;
  --fs-nav: 0.95rem;
  --fs-caption: 0.79rem;
  --fs-button: 0.875rem;
  --lh-body: 1.7;

  /* adjust spacing here */
  --gutter: 3vw;                         /* page side margins */
  --header-h: 70px;
  --section-pad-y: 3.3vmax;              /* default top/bottom padding of sections */
  --slide-gap: 60px;                     /* space between carousel images */
  --slides-visible: 3.15;                /* images per view; the fraction lets the next one peek in */
  --arrow-size: 60px;
  --stroke-width: 2px;                   /* section edge line thickness */

  /* adjust motion here */
  --marquee-duration: 70s;               /* one loop of the skills ticker */
  --fx-duration: 120s;                   /* one loop of the background pattern drift */
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

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

img {
  max-width: 100%;
}

p {
  margin: 0 0 0.9em;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 300;
  padding: 0.5rem 1rem;
  background: var(--color-button-bg);
  color: var(--color-button-text);
}

.skip-link:focus {
  top: 1rem;
}

.noscript {
  padding: calc(var(--header-h) + 2rem) var(--gutter);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  box-shadow: 0 8px 14px -6px rgba(0, 0, 0, 0.28); /* adjust header shadow here */
}

.header-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  height: 100%;
  padding: 0 var(--gutter);
}

.site-title {
  margin-right: auto;
  font-size: var(--fs-site-title);
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 1.1rem; /* adjust space between menu links here */
}

.site-nav a,
.mobile-menu__nav a {
  padding-bottom: 1px;
  font-size: var(--fs-nav);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.2s ease;
}

.site-nav a[aria-current="page"],
.site-nav a:hover,
.mobile-menu__nav a[aria-current="page"] {
  background-size: 100% 1px;
}

.header-social,
.mobile-menu__social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-social {
  margin-left: 0.4rem;
}

.social-link {
  font-size: 1rem;      /* adjust social icon size here */
  font-weight: 700;
  letter-spacing: -0.02em;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.menu-toggle__bar {
  position: absolute;
  left: 6px;
  right: 6px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s ease;
}

.menu-toggle__bar--top {
  top: 14px;
}

.menu-toggle__bar--bottom {
  top: 21px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar--top {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar--bottom {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  background: var(--color-page-bg); /* adjust mobile menu background here */
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.mobile-menu__nav a {
  font-size: 1.6rem; /* adjust mobile menu link size here */
}

/* ==========================================================================
   Sections and edges
   ========================================================================== */

.section {
  position: relative;
  padding:
    calc(var(--pad-top, var(--section-pad-y)) + var(--divider-above, 0px))
    var(--gutter)
    calc(var(--pad-bottom, var(--section-pad-y)) + var(--divider-h, 0px));
  background-color: var(--section-bg, var(--color-page-bg));
}

.section:not(:first-child),
.site-footer {
  margin-top: calc(-1 * var(--divider-above, 0px));
}

.section--light {
  --section-bg: var(--color-section-light);
}

.section--white {
  --section-bg: var(--color-page-bg);
}

/* Grey sections with a slowly drifting isometric pattern.
   adjust pattern colors in the SVG below: top faces, left faces, right faces */
.section--fx {
  --section-bg: var(--color-fx);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='156' height='270' viewBox='0 0 156 270'%3E%3Cg fill='%23dfdce0'%3E%3Cpolygon points='78,0 156,45 78,90 0,45'/%3E%3Cpolygon points='0,135 78,180 0,225 -78,180'/%3E%3Cpolygon points='156,135 234,180 156,225 78,180'/%3E%3C/g%3E%3Cg fill='%23dad7db'%3E%3Cpolygon points='0,45 78,90 78,180 0,135'/%3E%3Cpolygon points='78,180 156,225 156,315 78,270'/%3E%3Cpolygon points='-78,-90 0,-45 0,45 -78,0'/%3E%3Cpolygon points='78,-90 156,-45 156,45 78,0'/%3E%3C/g%3E%3Cg fill='%23d5d2d6'%3E%3Cpolygon points='156,45 78,90 78,180 156,135'/%3E%3Cpolygon points='78,180 0,225 0,315 78,270'/%3E%3Cpolygon points='78,-90 0,-45 0,45 78,0'/%3E%3Cpolygon points='234,-90 156,-45 156,45 234,0'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 312px 540px; /* adjust pattern scale here (keep in sync with the keyframes) */
  animation: fx-drift var(--fx-duration) linear infinite;
}

@keyframes fx-drift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 312px 540px;
  }
}

.divider-stroke {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  overflow: visible;
  pointer-events: none;
}

.divider-stroke polyline {
  fill: none;
  stroke: var(--color-divider);
  stroke-width: var(--stroke-width);
  vector-effect: non-scaling-stroke;
}

/* ==========================================================================
   Portfolio page
   ========================================================================== */

.section--intro {
  --pad-top: calc(var(--header-h) + 1.4rem);
  --pad-bottom: 2.4rem;
}

.marquee {
  margin: 0 calc(-1 * var(--gutter)) 0.7rem;
  overflow: hidden;
  font-size: var(--fs-marquee);
  line-height: 2.6;
  white-space: nowrap;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee var(--marquee-duration) linear infinite;
}

.marquee__group {
  display: flex;
  align-items: center;
}

.marquee__sep {
  margin: 0 1.5em; /* adjust space around the ticker bullets here */
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.intro-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 9vw;       /* adjust space between intro columns here */
  padding: 0 4vw;
}

.intro-text p {
  margin: 0;
  text-align: justify;
}

.section-title {
  margin-bottom: clamp(1.5rem, 4.5vw, 3.2rem); /* adjust space below carousel titles here */
  font-size: var(--fs-section-title);
  line-height: 1.5;
  text-align: center;
}

.section--carousel {
  padding-left: 0;
  padding-right: 0;
}

.carousel {
  position: relative;
  container-type: inline-size;
}

.carousel__viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.carousel__viewport::-webkit-scrollbar {
  display: none;
}

.carousel__track {
  box-sizing: content-box;
  display: flex;
  align-items: flex-start;
  gap: var(--slide-gap);
  width: max-content;
  margin: 0;
  padding: 0 var(--gutter);
  list-style: none;
}

.carousel__slide {
  flex: 0 0 auto;
  width: calc((100cqw - 2 * var(--gutter) - 2 * var(--slide-gap)) / var(--slides-visible));
  scroll-snap-align: start;
}

.carousel__slide figure {
  margin: 0;
}

.carousel__slide img,
.carousel__slide video {
  display: block;
  width: 100%;
  height: auto;
}

.carousel__slide video {
  background: #fff; /* keeps the box light while a video loads */
}

.carousel__caption {
  margin-top: 3px;
  font-size: var(--fs-caption);
  line-height: 2.05;
  text-align: center;
}

.carousel__caption a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.carousel__arrow {
  position: absolute;
  top: var(--arrow-top, 40%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--arrow-size);
  height: var(--arrow-size);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-arrow-bg);
  color: var(--color-arrow-icon);
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity 0.2s ease;
}

.carousel__arrow:hover {
  opacity: 0.85;
}

.carousel__arrow--prev {
  left: var(--gutter);
}

.carousel__arrow--next {
  right: var(--gutter);
}

.carousel__arrow svg {
  width: 60%;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.carousel.is-static .carousel__arrow {
  display: none;
}

.section--home-contact {
  --pad-top: 2.2rem;
  --pad-bottom: 3.2rem;
}

/* ==========================================================================
   Contact form
   ========================================================================== */

.contact-form {
  display: grid;
  gap: 1.1rem;
}

.contact-form__heading {
  margin: 0 0 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
}

.field__required {
  margin-left: 0.2em;
  font-size: 0.8em;
  color: var(--color-muted);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-text);
  border-radius: 0;
  background: var(--color-input-bg);
  color: inherit;
  font: inherit;
}

.field input {
  height: 48px;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.button {
  justify-self: start;
  margin-top: 0.4rem;
  padding: 21px 35px; /* adjust button size here */
  border: 0;
  border-radius: 0;
  background: var(--color-button-bg);
  color: var(--color-button-text);
  font: inherit;
  font-size: var(--fs-button);
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.form-status:empty {
  display: none;
}

/* spam trap for Web3Forms: must stay invisible to real visitors */
.spam-trap {
  display: none !important;
}

/* ==========================================================================
   Grid pages (FAQs, Contact, About, Services)
   ========================================================================== */

/* 24 columns between two gutter columns, like the Squarespace layout */
.section--grid {
  padding-left: 0;
  padding-right: 0;
}

.grid {
  display: grid;
  grid-template-columns: var(--gutter) repeat(24, minmax(0, 1fr)) var(--gutter);
}

.page-title {
  font-size: var(--fs-section-title);
  line-height: 1.45;
}

.section--faqs {
  --pad-top: calc(var(--header-h) + 4.25rem);
  --pad-bottom: 4.25rem;
}

.faqs__title {
  grid-column: 5 / 13;
}

.faqs__list {
  grid-column: 13 / 24;
  padding-left: 5px;
}

.faq__question {
  margin: 0 0 1.75rem;
  font-size: var(--fs-question);
  line-height: 1.48;
}

.faq__question:not(:first-child) {
  margin-top: 4rem; /* adjust space between questions here */
}

.section--contact {
  --pad-top: calc(var(--header-h) + 3.4rem);
  --pad-bottom: 3.5rem;
}

.contact__intro {
  grid-column: 2 / 13;
}

.contact__form {
  grid-column: 15 / 26;
}

.section--about {
  --pad-top: calc(var(--header-h) + 6.2rem);
  --pad-bottom: 14rem;
}

.about {
  align-items: center;
}

.about__text {
  grid-column: 2 / 18;
  grid-row: 1;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(320px, 44vw, 640px);
  padding: 3rem 7.5vw;
  background: var(--color-panel);
}

.about__text p {
  text-align: justify;
}

.about__text p:last-child {
  margin-bottom: 0;
}

.about__photo {
  grid-column: 16 / 26;
  grid-row: 1;
  margin: 0;
}

.about__photo img {
  display: block;
  width: 100%;
  height: auto;
}

.section--services {
  --pad-top: calc(var(--header-h) + 2.8rem);
  --pad-bottom: 6rem;
}

.services__title {
  grid-column: 2 / 10;
}

.services__text {
  grid-column: 14 / 22;
}

.services__text ul {
  margin: 0 0 1.2rem;
  padding-left: 1.4rem;
}

.services__text li {
  margin: 0.35rem 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  --pad-top: 6.3rem;
  --pad-bottom: 6.3rem;
}

.footer-title {
  margin: 0;
  font-size: var(--fs-footer-title);
  font-weight: 700;
  line-height: 1.48;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 767px) {
  :root {
    --gutter: 6vw;
    --slide-gap: 20px;
    --slides-visible: 1.2;
    --arrow-size: 44px;
  }

  .site-nav,
  .header-social {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .intro-text {
    grid-template-columns: 1fr;
    row-gap: 1rem;
    padding: 0;
  }

  /* justified text leaves gaps in narrow columns */
  .intro-text p,
  .about__text p {
    text-align: left;
  }

  .faqs__title,
  .faqs__list,
  .contact__intro,
  .contact__form,
  .about__text,
  .about__photo,
  .services__title,
  .services__text {
    grid-column: 2 / 26;
  }

  .faqs__title,
  .services__title {
    margin-bottom: 1.5rem;
  }

  .faqs__list {
    padding-left: 0;
  }

  .contact__intro {
    margin-bottom: 2rem;
  }

  .about__text {
    min-height: 0;
    padding: 2rem 1.5rem;
  }

  .about__photo {
    grid-row: 2;
    margin-top: 1.5rem;
  }

  .section--about {
    --pad-bottom: 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track,
  .section--fx {
    animation: none;
  }

  .carousel__viewport {
    scroll-behavior: auto;
  }
}
