@font-face {
  font-family: Barlow;
  src: url("fonts/barlow-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url("fonts/barlow-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #192027;
  --muted: #4e4c46;
  --paper: #f6f1e5;
  --white: #fffcf4;
  --line: #cbc2b0;
  --lime: #e7ed83;
  --blue: #9ed9e9;
  --lavender: #d0c1f4;
  --coral: #f1a184;
  --ruby: #a52736;
  --sans: Barlow, Arial, sans-serif;
  --cut: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 5% 38%, #eadbc0 0%, transparent 29rem),
    radial-gradient(ellipse at 100% 7%, #e9def4 0%, transparent 24rem),
    radial-gradient(#49402d19 .75px, transparent .75px);
  background-size: auto, auto, 8px 8px;
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #3c41a6; outline-offset: 4px; }
.shell { width: min(100% - 64px, 1184px); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 10;
  inset: 8px auto auto 12px;
  transform: translateY(-150%);
  padding: .55rem 1rem;
  background: var(--white);
}
.skip-link:focus { transform: translateY(0); }

.site-header { padding-block: 28px; }
.nav {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.nav-link {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: 9px 19px;
  min-width: 102px;
  min-height: 46px;
  font-weight: 700;
  text-decoration: none;
}
.nav-link::before, .nav-link::after {
  position: absolute;
  content: "";
  z-index: -1;
}
.nav-link::before {
  inset: 0;
  clip-path: var(--cut);
  background: var(--ink);
}
.nav-link::after {
  inset: 1px;
  clip-path: polygon(0 0, calc(100% - 9.5px) 0, 100% 9.5px, 100% 100%, 9.5px 100%, 0 calc(100% - 9.5px));
  background: var(--white);
}
.nav-home { --nav-color: var(--lime); }
.nav-privacy { --nav-color: var(--blue); }
.nav-service { --nav-color: var(--lavender); }
.nav-contact { --nav-color: var(--coral); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { background: var(--nav-color); }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr minmax(0, .78fr);
  align-items: stretch;
  min-height: 452px;
  border: 1px solid var(--ink);
  background: var(--white);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(26px, 4.7vw, 68px);
}
.company-name {
  font-size: .83rem;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.4;
}
.hero h1 {
  margin-block: 24px 21px;
  font-size: clamp(3.2rem, 7.3vw, 7rem);
  line-height: .89;
  font-weight: 700;
  letter-spacing: -.055em;
}
.hero-intro { font-size: clamp(1.1rem, 2vw, 1.48rem); }

.packaging-graphic {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-left: 1px solid var(--ink);
  background:
    repeating-linear-gradient(90deg, #26221b14 0 1px, transparent 1px 24px),
    repeating-linear-gradient(0deg, #26221b14 0 1px, transparent 1px 24px),
    var(--lime);
}
.paper-sheet {
  position: absolute;
  box-shadow: 8px 9px 0 #201e3822;
}
.paper-sheet--coral {
  inset: -32% 37% 39% -36%;
  transform: rotate(-31deg);
  border: 1px solid var(--ink);
  background: var(--coral);
}
.paper-sheet--lavender {
  inset: 22% -13% -24% 29%;
  transform: rotate(16deg);
  border: 1px solid var(--ink);
  background: var(--lavender);
}
.paper-sheet--blue {
  inset: 44% 41% -34% -16%;
  transform: rotate(24deg);
  border: 1px solid var(--ink);
  background: radial-gradient(#21404759 .75px, transparent .8px) 0 0 / 6px 6px, var(--blue);
}
.dieline {
  position: absolute;
  inset: 50% auto auto 49%;
  display: grid;
  grid-template-columns: .8fr 1.12fr .8fr .46fr;
  grid-template-rows: .53fr 1fr .47fr;
  width: min(72%, 345px);
  aspect-ratio: 1.24;
  transform: translate(-50%, -50%) rotate(-16deg);
  filter: drop-shadow(9px 12px 0 #28234139);
}
.dieline span { position: relative; border: 1px solid var(--ink); }
.carton-lid {
  grid-area: 1 / 2;
  margin-bottom: -1px;
  border-radius: 12px 12px 0 0;
  background: #f1a184;
}
.carton-left {
  grid-area: 2 / 1;
  margin-right: -1px;
  background: #bee4eb;
}
.carton-front {
  grid-area: 2 / 2;
  background: #fffae4;
}
.carton-front::after {
  position: absolute;
  inset: 10%;
  border: 1px dashed #493d3b98;
  background: repeating-linear-gradient(133deg, #f1675d 0 9px, #fa9b83 9px 18px);
  content: "";
}
.carton-side {
  grid-area: 2 / 3;
  margin-left: -1px;
  background: #f5cd69;
}
.carton-tab {
  grid-area: 2 / 4;
  margin: 14% 0 14% -1px;
  border-radius: 0 15px 15px 0;
  background: #a6c390;
}
.carton-base {
  grid-area: 3 / 2;
  margin-top: -1px;
  border-radius: 0 0 12px 12px;
  background: #9ed9e9;
}
.registration-mark {
  position: absolute;
  width: 16px;
  aspect-ratio: 1;
  border: 1px solid;
  border-radius: 50%;
}
.registration-mark::before, .registration-mark::after {
  position: absolute;
  inset: calc(50% - .5px) -5px auto;
  height: 1px;
  background: var(--ink);
  content: "";
}
.registration-mark::after { transform: rotate(90deg); }
.registration-mark--top { top: 24px; right: 28px; }
.registration-mark--bottom { bottom: 24px; left: 28px; }
.print-swatches {
  position: absolute;
  right: 24px;
  bottom: 23px;
  width: 100px;
  height: 15px;
  border: 1px solid var(--ink);
  background: linear-gradient(90deg, #50bbc6 20%, #e27da7 20% 40%, #f5d16f 40% 60%, #282539 60% 80%, var(--white) 80%);
}

.artwork { margin-block: 56px 66px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 22px;
}
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1; letter-spacing: -.035em; }
.gallery {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.gallery li { min-width: 0; border: 1px solid var(--ink); }
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1179 / 2556;
  background: #d6d4c6;
}
.gallery-controls { display: flex; gap: 6px; }
.gallery-controls button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--white);
  font-size: 1.15rem;
  line-height: 1;
}
.gallery-controls button:hover { background: var(--lime); }
.gallery-controls button[aria-disabled="true"] {
  background: transparent;
  border-color: #6b685e;
  color: #6b685e;
  cursor: default;
}

.interior { margin-block: 0 64px; }
.interior > h1, .legal-copy h1 {
  margin: 0 0 28px;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: .98;
  font-weight: 700;
  letter-spacing: -.045em;
}
.legal-copy {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(20px, 5vw, 55px);
  border: 1px solid var(--ink);
  border-top: 8px solid var(--page-accent);
  background: var(--white);
  overflow-wrap: anywhere;
}
.page-privacy { --page-accent: var(--blue); }
.page-service { --page-accent: var(--lavender); }
.legal-copy h2 {
  margin-block: 26px 8px;
  font-size: 1.32rem;
  line-height: 1.24;
}
.legal-copy p + p { margin-top: 12px; }

/* Contact page: a mailing label over a printed carton surface. */
.contact-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(275px, .87fr);
  align-items: center;
  gap: clamp(20px, 4vw, 62px);
  min-height: 365px;
  padding: 43px clamp(24px, 6vw, 80px) 89px;
  border: 1px solid var(--ink);
  background:
    repeating-linear-gradient(90deg, #ffffff13 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, #ffffff13 0 1px, transparent 1px 26px),
    #28233f;
  color: var(--white);
}
.contact-hero::after {
  position: absolute;
  z-index: -1;
  inset: -58% -17% -72% auto;
  width: 52%;
  border-inline: 1px solid var(--ink);
  transform: rotate(32deg);
  background: linear-gradient(90deg, var(--blue) 0 26%, var(--lavender) 26% 60%, var(--coral) 60%);
  box-shadow: -14px 0 0 #191526;
  content: "";
}
.contact-hero h1 {
  font-size: clamp(4.15rem, 9.5vw, 8.25rem);
  line-height: .81;
  font-weight: 700;
  letter-spacing: -.065em;
}
.contact-hero h1 span { display: block; }
.contact-sticker {
  position: relative;
  justify-self: end;
  width: min(100%, 23rem);
  padding: 23px clamp(18px, 3vw, 35px) 26px;
  border: 1px solid var(--ink);
  transform: rotate(5deg);
  background: var(--lime);
  color: var(--ink);
  box-shadow: 8px 9px 0 #1d173879;
}
.contact-sticker::before {
  position: absolute;
  top: -11px;
  left: 29%;
  width: 66px;
  height: 19px;
  border-inline: 1px dotted #38302c8f;
  transform: rotate(-12deg);
  background: #fff1c7d9;
  content: "";
}
.contact-email {
  margin-top: 10px;
  font-size: clamp(1.25rem, 2.15vw, 1.8rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-form {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(88%, 840px);
  margin: -52px 5% 10px auto;
  padding: clamp(22px, 4.5vw, 52px);
  border: 1px solid var(--ink);
  background: var(--white);
  box-shadow: 9px 9px 0 var(--lavender);
}
.contact-form::before {
  display: block;
  height: 10px;
  margin-bottom: 3px;
  background:
    linear-gradient(90deg, #50bbc6 25%, #e27da7 25% 50%, #f5d16f 50% 75%, #282539 75%) right top / 60px 9px no-repeat,
    repeating-linear-gradient(90deg, #826e64 0 5px, transparent 5px 10px) left top / calc(100% - 70px) 1px no-repeat;
  content: "";
}
.contact-form .field {
  display: grid;
  grid-template-columns: minmax(108px, 24%) minmax(0, 1fr);
  align-items: start;
  column-gap: 14px;
  min-width: 0;
}
.contact-form .field--message {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  padding-top: 12px;
  border-top: 1px dashed #b7a992;
}
.contact-form .field:not(.field--message) label { padding-top: 9px; }
.contact-form .field-error { grid-column: -2 / -1; }
.contact-form .field--message label { margin-bottom: 0; }
.field label {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
}
.field input, .field textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid #726957;
  border-radius: 0;
  background: #fffef9;
  color: var(--ink);
  font-size: 1rem;
}
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--ruby); }
.field-error { margin-top: 4px; color: var(--ruby); font-size: .95rem; }
.field-error:empty { margin: 0; }
.contact-form .action-button { justify-self: end; }
.action-button {
  justify-self: start;
  min-height: 46px;
  padding: 9px 21px;
  border: 1px solid var(--ink);
  background: var(--lime);
  font-weight: 700;
}
.action-button:hover { background: #d7e260; }
.action-button:disabled { cursor: default; opacity: .65; }

.success-dialog {
  width: min(340px, 100% - 32px);
  padding: 9px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--lime);
}
.success-dialog::backdrop { background: #19162799; }
.success-inner {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 22px 14px;
  border: 1px solid var(--ink);
  background: var(--white);
}
.success-inner h2 { text-align: center; font-size: 1.55rem; }
.success-inner .action-button { justify-self: center; }
.success-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  background: var(--blue);
}

.site-footer {
  margin-top: auto;
  padding-block: 24px;
  border-top: 1px solid var(--ink);
  background: var(--ink);
  color: #fff8e8;
  font-size: .93rem;
}

@media (max-width: 900px) {
  .shell { width: calc(100% - 48px); }
  .hero { min-height: 360px; }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 32px); }
  .site-header { padding-block: 16px; }
  .nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .nav-link { min-width: 0; min-height: 44px; padding-inline: 2px; font-size: .94rem; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-copy { padding: clamp(20px, 6.5vw, 38px); }
  .hero h1 { margin-block: 15px; font-size: clamp(2.85rem, 10.5vw, 4.8rem); }
  .packaging-graphic { min-height: 170px; height: min(49vw, 240px); border-left: 0; border-top: 1px solid var(--ink); }
  .dieline { width: min(47%, 215px); }
  .registration-mark--top { top: 16px; right: 19px; }
  .registration-mark--bottom { bottom: 16px; left: 19px; }
  .print-swatches { right: 18px; bottom: 17px; width: 60px; height: 11px; }
  .artwork { margin-block: 35px 42px; }
  .section-head { margin-bottom: 15px; }
  .gallery {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }
  .gallery li { scroll-snap-align: start; }
  .interior { margin-bottom: 36px; }
  .site-footer { padding-block: 16px; }
}

@media (max-width: 720px) {
  .contact-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    min-height: 0;
    padding: 26px 20px 62px;
  }
  .contact-hero h1 { font-size: clamp(3.3rem, 10vw, 5.1rem); }
  .contact-hero h1 span { display: inline; }
  .contact-hero::after { inset: -31% -22% -100% auto; width: 63%; }
  .contact-sticker {
    width: min(96%, 22rem);
    padding: 17px 15px 17px 18px;
    margin-right: 5px;
    transform: rotate(3deg);
  }
  .contact-form { width: 92%; margin: -30px auto 8px; padding: 19px 16px; }
  .contact-form .field { grid-template-columns: minmax(0, 1fr); }
  .contact-form .field:not(.field--message) label { padding-top: 0; }
  .contact-form .action-button { justify-self: stretch; }
}
