@font-face {
  font-family: 'Inter Tight';
  src: url('/fonts/inter-tight.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --ground: #0f0e0c;
  --ink: #f2eee6;
  --soft: #a39c91;
  --desc: #e2ddd3;
  --sans: 'Inter Tight', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

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

body {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-height: 100dvh;
  padding: 28px 40px 40px;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.mark {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.label {
  font: 500 12px/16px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

/* The statement on the left, the cards filling the rest. */
.main {
  display: flex;
  flex: 1;
  gap: 48px;
  min-height: 0;
}

.statement {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  width: 408px;
  padding-top: 24px;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

h1 {
  font-weight: 600;
  font-size: 42px;
  line-height: 44px;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lead {
  max-width: 340px;
  font-size: 17px;
  line-height: 26px;
  color: var(--soft);
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact a {
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
}

/* Cards: one is open at a time; cards.js moves data-open on hover, focus and tap. */
.products {
  display: flex;
  flex: 1;
  gap: 12px;
  min-width: 0;
  min-height: 600px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 0.7;
  min-width: 0;
  padding: 24px 22px 28px;
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  transition:
    flex 600ms var(--ease),
    padding 600ms var(--ease);
}

.card[data-open] {
  flex: 2.6;
  padding-inline: 28px;
}

.card picture,
.card img:not(.title) {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos-closed) center;
  transition: object-position 600ms var(--ease);
}

.card[data-open] img:not(.title) {
  object-position: var(--pos) center;
}

.card:nth-child(1) {
  --pos: 30%;
  --pos-closed: 18%;
}
.card:nth-child(2) {
  --pos: 55%;
  --pos-closed: 58%;
}
.card:nth-child(3) {
  --pos: 52%;
  --pos-closed: 52%;
}

/* Closed cards carry a light shade; the open one a deeper one behind its words. */
.card::before,
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: opacity 600ms var(--ease);
}

.card::before {
  background: linear-gradient(180deg, #0f0e0c66 0%, #0f0e0c00 25%, #0f0e0c00 55%, #0f0e0ccc 100%);
}

.card::after {
  background: linear-gradient(
    180deg,
    #0f0e0c66 0%,
    #0f0e0c00 20%,
    #0f0e0c00 45%,
    #0f0e0cd1 66%,
    #0f0e0cf7 100%
  );
  opacity: 0;
}

.card[data-open]::after {
  opacity: 1;
}

.arrow {
  position: absolute;
  top: 24px;
  right: 22px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0f0e0c66 url('/img/arrow.svg') center / 20px no-repeat;
  transition: background-color 200ms ease;
}

.card:hover .arrow {
  background-color: #0f0e0ccc;
}

.details {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 440px;
  transition: gap 600ms var(--ease);
}

.card[data-open] .details {
  gap: 20px;
}

/* Wordmark heights match the design: With Love at 26/44px, Snowleaf at 20/38px of type, Note4's mark 23/32px tall. */
.title {
  align-self: flex-start;
  width: auto;
  height: var(--closed);
  transition: height 600ms var(--ease);
}

.card[data-open] .title {
  height: var(--open);
}

.withlove {
  --closed: 19px;
  --open: 32px;
}
.snowleaf {
  --closed: 15px;
  --open: 28px;
}
.note4 {
  --closed: 23px;
  --open: 32px;
}

.desc {
  display: block;
  font-size: 17px;
  line-height: 25px;
  color: var(--desc);
  max-height: 0;
  opacity: 0;
  translate: 0 8px;
  transition:
    opacity 150ms ease,
    translate 150ms ease,
    max-height 0ms 150ms;
}

.card[data-open] .desc {
  max-height: 120px;
  opacity: 1;
  translate: 0 0;
  transition:
    opacity 300ms 380ms ease,
    translate 300ms 380ms var(--ease),
    max-height 0ms 380ms;
}

/* Phone: the cards stack as rows; a closed row shows its mark and arrow along the bottom. */
@media (max-width: 720px) {
  body {
    gap: 36px;
    padding: 20px 16px 32px;
  }

  .brand {
    gap: 9px;
    font-size: 16px;
  }

  .main {
    flex-direction: column;
    gap: 36px;
  }

  .statement {
    display: contents;
  }

  .intro {
    gap: 16px;
    padding-top: 12px;
  }

  .label {
    font-size: 11px;
  }

  h1 {
    font-size: 32px;
    line-height: 34px;
  }

  .lead {
    max-width: none;
    font-size: 16px;
    line-height: 24px;
  }

  .contact {
    order: 1;
    padding-top: 8px;
  }

  .products {
    flex-direction: column;
    gap: 10px;
    min-height: 0;
  }

  .card,
  .card[data-open] {
    flex: none;
    height: 120px;
    padding: 16px 20px 18px;
    transition: height 600ms var(--ease);
  }

  .card[data-open] {
    height: 440px;
    padding-bottom: 22px;
  }

  .card img:not(.title),
  .card[data-open] img:not(.title) {
    object-position: center 40%;
  }

  .card:nth-child(1)[data-open] img:not(.title) {
    object-position: 24% center;
  }

  .card::before {
    background: linear-gradient(90deg, #0f0e0cb3 0%, #0f0e0c33 60%, #0f0e0c00 100%);
  }

  .arrow {
    top: auto;
    right: 20px;
    bottom: 18px;
    width: 32px;
    height: 32px;
    background-size: 18px;
  }

  .card[data-open] .arrow {
    top: 18px;
    bottom: auto;
  }

  .card[data-open] .details {
    gap: 16px;
  }

  .details {
    max-width: none;
    padding-right: 44px;
  }

  .card[data-open] .details {
    padding-right: 0;
  }

  .withlove {
    --closed: 18px;
    --open: 26px;
  }

  .desc {
    font-size: 16px;
    line-height: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
  }
}
