@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --paper: #f4f6f3;
  --ink: #1c2827;
  --muted: #64716e;
  --green: #1c5148;
  --mint: #b9e4d4;
  --lime: #d4ed74;
  --orange: #e77850;
  --line: #dce4df;
  --serif: 'Space Grotesk', 'Arial', sans-serif;
  --sans: 'DM Sans', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.announcement {
  padding: 10px 18px;
  background: var(--green);
  color: #fff;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 max(30px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid var(--line);
  background: #f4f6f3ed;
  backdrop-filter: blur(12px);
}

.logo {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -1.5px;
}

.logo > span:first-child {
  margin: 0 3px;
  color: var(--green);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.logo .logo-dot {
  color: var(--orange);
  font-size: 23px;
}

.main-nav {
  display: flex;
  gap: 27px;
  color: #485651;
  font-size: 11px;
}

.main-nav a:hover,
.footer-links a:hover {
  color: var(--orange);
}

.bag-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

.bag-count {
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-left: 5px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 10px;
}

.menu-toggle {
  display: none;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 65px;
  width: min(1160px, calc(100% - 64px));
  margin: 0 auto;
  padding: 68px 0 84px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.6;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(52px, 6vw, 76px);
  font-weight: 600;
  letter-spacing: -4px;
  line-height: 0.99;
}

.hero h1 span {
  color: var(--green);
}

.hero-description {
  max-width: 390px;
  margin: 22px 0 25px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 600;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-dark {
  background: var(--green);
  color: #fff;
}

.button-dark:hover {
  background: #153f37;
}

.button-light {
  background: var(--paper);
  color: var(--ink);
}

.button-light:hover {
  background: #fff;
}

.hero-footnote {
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.hero-art {
  position: relative;
  display: grid;
  min-height: 410px;
  overflow: hidden;
  place-items: center;
  background: #dfeae4;
  isolation: isolate;
}

.hero-grid-pattern {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(#47736719 1px, transparent 1px),
    linear-gradient(90deg, #47736719 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-glow {
  position: absolute;
  z-index: -1;
  top: 50px;
  right: 75px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--lime);
}

.chip {
  display: grid;
  place-items: center;
  border: 2px solid #d0dcda;
  background: #263b3b;
  color: var(--lime);
  font-family: var(--serif);
  font-weight: 700;
  box-shadow: 0 18px 30px #17312d35;
}

.chip-main {
  z-index: 2;
  width: 150px;
  height: 150px;
  font-size: 28px;
  transform: rotate(-8deg);
}

.chip-main::before,
.chip-main::after {
  position: absolute;
  z-index: -1;
  width: 183px;
  height: 183px;
  border: 1px solid #426b61;
  content: '';
}

.chip-main::after {
  width: 209px;
  height: 209px;
  border-color: #689387;
}

.chip-small {
  position: absolute;
  z-index: 2;
  right: 25%;
  bottom: 23%;
  width: 48px;
  height: 48px;
  font-size: 26px;
  transform: rotate(9deg);
}

.circuit-line {
  position: absolute;
  z-index: -1;
  width: 100px;
  height: 1px;
  background: #438172;
}

.circuit-line::after {
  position: absolute;
  top: -4px;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  content: '';
}

.line-one {
  top: 29%;
  left: 14%;
  transform: rotate(28deg);
}

.line-two {
  right: 12%;
  bottom: 35%;
  transform: rotate(-20deg);
}

.line-three {
  bottom: 22%;
  left: 20%;
  width: 80px;
  transform: rotate(-34deg);
}

.hero-art-label {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 8px 10px;
  background: var(--paper);
  font-size: 8px;
  letter-spacing: 0.1em;
}

/* Category cards */

.category-section,
.shop-section,
.about-section {
  width: min(1160px, calc(100% - 64px));
  margin: 0 auto;
}

.category-section {
  padding: 35px 0 78px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading h2,
.project-copy h2,
.about-copy h2,
.newsletter-section h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -1.6px;
  line-height: 1.12;
}

.section-intro {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.category-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
}

.category-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 16px;
  border: 0;
  text-align: left;
  transition: transform 180ms ease;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-boards {
  background: #dce9e2;
}

.category-sensors {
  background: #e7e7d5;
}

.category-motors {
  background: #e9dcd3;
}

.category-tools {
  background: #dce5e7;
}

.category-symbol {
  align-self: center;
  margin: auto;
  color: var(--green);
  font-family: var(--serif);
  font-size: 67px;
  font-weight: 600;
  line-height: 1;
}

.category-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}

.category-caption {
  margin-top: 6px;
  color: #68736e;
  font-size: 9px;
}

/* Product section */

.shop-section {
  padding: 68px 0 74px;
  border-top: 1px solid var(--line);
}

.shop-heading {
  margin-bottom: 18px;
}

.search-box input {
  width: 220px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: #fafbf9;
  font-size: 10px;
}

.search-box input:focus,
.newsletter-form input:focus {
  border-color: var(--green);
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 21px;
}

.filter-button {
  padding: 8px 12px;
  border: 1px solid #d4dfd8;
  border-radius: 30px;
  background: transparent;
  color: #53605b;
  font-size: 9px;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.product-card {
  position: relative;
  padding-bottom: 13px;
  background: #fbfcfa;
}

.product-image {
  display: grid;
  height: 205px;
  place-items: center;
  background: var(--product-bg, #dfeae4);
}

.product-emoji {
  font-size: 75px;
  filter: drop-shadow(0 10px 7px #1c282729);
  transition: transform 180ms ease;
}

.product-card:hover .product-emoji {
  transform: translateY(-5px) rotate(-4deg);
}

.product-label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 7px 8px;
  background: #f4f6f3;
  color: var(--green);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.product-details {
  padding: 12px 11px 0;
}

.product-type {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-name {
  margin: 6px 0 10px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-price {
  font-size: 10px;
  font-weight: 700;
}

.add-to-bag {
  padding: 7px 8px;
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green);
  font-size: 8px;
}

.add-to-bag:hover {
  background: var(--green);
  color: white;
}

.no-products {
  grid-column: 1 / -1;
  padding: 40px 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.sample-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 9px;
}

/* Project feature */

.project-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(1160px, calc(100% - 64px));
  min-height: 310px;
  margin: 0 auto 78px;
  background: var(--green);
}

.project-copy {
  align-self: center;
  padding: 40px 48px;
  color: white;
}

.project-copy .eyebrow {
  color: var(--lime);
}

.project-copy p:not(.eyebrow) {
  max-width: 350px;
  margin: 15px 0 21px;
  color: #d8e6df;
  font-size: 10px;
  line-height: 1.9;
}

.project-art {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  background: #c5e3d5;
  background-image:
    linear-gradient(#59857816 1px, transparent 1px),
    linear-gradient(90deg, #59857816 1px, transparent 1px);
  background-size: 26px 26px;
}

.project-board {
  position: relative;
  width: 185px;
  height: 116px;
  border: 3px solid #48775f;
  border-radius: 8px;
  background: #65a87f;
  box-shadow: 0 18px 28px #15332a36;
  transform: rotate(-8deg);
}

.project-board::before,
.project-board::after {
  position: absolute;
  top: -12px;
  left: 20px;
  width: 6px;
  height: 12px;
  background: #d8bf72;
  box-shadow:
    15px 0 #d8bf72,
    30px 0 #d8bf72,
    45px 0 #d8bf72,
    60px 0 #d8bf72,
    75px 0 #d8bf72,
    90px 0 #d8bf72,
    105px 0 #d8bf72,
    120px 0 #d8bf72;
  content: '';
}

.project-board::after {
  top: auto;
  bottom: -12px;
}

.board-chip {
  position: absolute;
  top: 27px;
  left: 62px;
  width: 57px;
  height: 48px;
  border: 3px solid #aab7a4;
  background: #273d37;
}

.board-chip::after {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 20px;
  height: 14px;
  background: #d5e86e;
  content: '';
}

.board-pin {
  position: absolute;
  top: 33px;
  left: 20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e8d892;
  box-shadow: 0 15px #e8d892, 0 30px #e8d892;
}

.pin-two {
  right: 18px;
  left: auto;
  background: #e77850;
  box-shadow: 0 15px #e77850, 0 30px #e77850;
}

.pin-three,
.pin-four {
  top: auto;
  bottom: -23px;
  left: 21px;
}

.pin-four {
  right: 19px;
  left: auto;
}

.board-led {
  position: absolute;
  top: 12px;
  right: 23px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
}

.project-plus {
  position: absolute;
  color: var(--green);
  font-family: var(--serif);
  font-size: 34px;
}

.plus-one {
  top: 38px;
  left: 20%;
}

.plus-two {
  right: 19%;
  bottom: 30px;
}

/* About */

.about-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 68px;
  padding: 0 0 80px;
}

.about-art {
  display: flex;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  background: #e4e8d9;
  color: var(--green);
  font-family: var(--serif);
  font-size: 80px;
  font-weight: 600;
}

.about-slash {
  color: var(--orange);
  transform: rotate(10deg);
}

.about-copy h2 {
  margin-bottom: 16px;
}

.about-copy > p:not(.eyebrow) {
  max-width: 450px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
}

/* Newsletter and footer */

.newsletter-section {
  padding: 45px 20px 50px;
  background: #e5ebe5;
  text-align: center;
}

.newsletter-section .eyebrow {
  margin-bottom: 8px;
}

.newsletter-section h2 {
  font-size: 28px;
}

.newsletter-section > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 10px;
}

.newsletter-form {
  display: flex;
  width: min(390px, 100%);
  margin: 17px auto 0;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d2ddd4;
  outline: none;
  background: #fafbf9;
  font-size: 10px;
}

.newsletter-form .button {
  flex-shrink: 0;
}

.site-footer {
  padding: 40px max(30px, calc((100vw - 1160px) / 2)) 19px;
  background: #203d36;
  color: #f4f6f3;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1.3fr;
  gap: 38px;
}

.footer-logo .logo-dot {
  color: var(--lime);
}

.footer-main > div:first-child p {
  max-width: 290px;
  color: #cbd9d2;
  font-size: 10px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  color: #d8e2dc;
  font-size: 9px;
}

.footer-links h2 {
  margin: 4px 0 3px;
  color: white;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid #ffffff2b;
  color: #bdccc4;
  font-size: 8px;
}

/* Shopping cart */

.cart-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: #14201bb0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.cart-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel {
  position: fixed;
  z-index: 21;
  top: 0;
  right: 0;
  display: flex;
  width: min(390px, 100%);
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  padding: 22px;
  background: var(--paper);
  transform: translateX(100%);
  transition: transform 250ms ease;
}

.cart-panel.is-open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.cart-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
}

.close-cart {
  border: 0;
  background: transparent;
  font-size: 27px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
}

.empty-cart {
  margin: auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

.cart-line {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line-emoji {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  background: #dfeae4;
  font-size: 25px;
}

.cart-line-name {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
}

.cart-line-price {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.remove-item {
  border: 0;
  background: transparent;
  color: #a2553d;
  font-size: 9px;
}

.cart-footer {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
  font-size: 12px;
  font-weight: 700;
}

.cart-footer .button {
  width: 100%;
}

.cart-disclaimer {
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.toast-message {
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: 20px;
  max-width: calc(100% - 40px);
  padding: 12px 16px;
  background: var(--green);
  color: white;
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 180ms ease;
}

.toast-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Tablet */

@media (max-width: 850px) {
  .hero {
    gap: 34px;
  }

  .hero-art {
    min-height: 340px;
  }

  .category-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-image {
    height: 225px;
  }

  .about-section {
    gap: 34px;
  }

  .main-nav {
    gap: 15px;
  }
}

/* Mobile */

@media (max-width: 600px) {
  .announcement {
    font-size: 9px;
  }

  .site-header {
    min-height: 66px;
    padding: 0 15px;
  }

  .logo {
    font-size: 20px;
  }

  .logo .logo-dot {
    font-size: 20px;
  }

  .menu-toggle {
    display: flex;
    width: 28px;
    height: 30px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    order: -1;
    border: 0;
    background: transparent;
  }

  .menu-toggle span {
    width: 19px;
    height: 1px;
    background: var(--ink);
  }

  .main-nav {
    position: absolute;
    top: 65px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 18px;
    padding: 19px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    width: calc(100% - 34px);
    padding: 42px 0 55px;
  }

  .hero h1 {
    font-size: 54px;
  }

  .hero-description {
    font-size: 11px;
  }

  .hero-art {
    min-height: 285px;
  }

  .chip-main {
    width: 125px;
    height: 125px;
    font-size: 24px;
  }

  .chip-main::before {
    width: 155px;
    height: 155px;
  }

  .chip-main::after {
    width: 180px;
    height: 180px;
  }

  .category-section,
  .shop-section,
  .about-section {
    width: calc(100% - 34px);
  }

  .category-section {
    padding: 20px 0 56px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .section-heading h2,
  .project-copy h2,
  .about-copy h2 {
    font-size: 32px;
  }

  .category-card {
    min-height: 165px;
    padding: 12px;
  }

  .category-symbol {
    font-size: 55px;
  }

  .category-name {
    font-size: 14px;
  }

  .category-caption {
    font-size: 8px;
  }

  .shop-section {
    padding: 53px 0;
  }

  .shop-heading {
    gap: 15px;
  }

  .search-box,
  .search-box input {
    width: 100%;
  }

  .product-grid {
    gap: 10px;
  }

  .product-image {
    height: 160px;
  }

  .product-emoji {
    font-size: 61px;
  }

  .product-details {
    padding: 9px 8px 0;
  }

  .product-name {
    font-size: 12px;
  }

  .add-to-bag {
    padding: 6px;
    font-size: 8px;
  }

  .project-section {
    grid-template-columns: 1fr;
    width: calc(100% - 34px);
    margin-bottom: 55px;
  }

  .project-copy {
    padding: 33px 23px;
  }

  .project-art {
    min-height: 220px;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-bottom: 55px;
  }

  .about-art {
    min-height: 225px;
    font-size: 65px;
  }

  .newsletter-section {
    padding: 40px 16px;
  }

  .newsletter-section h2 {
    font-size: 25px;
  }

  .newsletter-form {
    flex-direction: column;
    gap: 8px;
  }

  .site-footer {
    padding: 34px 17px 18px;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 25px 16px;
  }

  .footer-main > div:first-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    line-height: 1.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}