﻿/* Small layer of custom styles on top of Tailwind. */

:root { --brand: #E8602C; --ink: #BF4A1C; --well: #FDF5F1; --ease: cubic-bezier(.2,.7,.2,1); }

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body { touch-action: manipulation; }
::selection { background: var(--brand); color: #fff; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.on-ink :focus-visible, .on-ink:focus-visible { outline-color: #fff; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 60; background: var(--ink); color: #fff; padding: .75rem 1rem; transition: top .2s ease; }
.skip-link:focus { top: 1rem; }

/* Underline that grows from the left */
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* Buttons: flat, fully round, one fill */
.btn-buy, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 3rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--brand);
  color: #fff;
  transition: background-color .25s ease, transform .2s ease;
}
.btn-buy:hover, .btn-ghost:hover { background: var(--ink); }
.btn-buy:active, .btn-ghost:active { transform: scale(.98); }
.btn-buy .arrow { transition: transform .3s var(--ease); }
.btn-buy:hover .arrow { transform: translateX(3px); }
.btn-buy.is-soon, .btn-ghost.is-soon { background: var(--well); color: var(--ink); box-shadow: inset 0 0 0 1.5px #F3D9CC; cursor: default; }
.btn-buy.is-soon:active, .btn-ghost.is-soon:active { transform: none; }

/* Secondary button: outlined, fills when the model is in the bag */
.btn-line {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3rem; padding: 0 1.5rem; border-radius: 999px;
  font-size: 18px; font-weight: 700; letter-spacing: -0.01em;
  box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--ink);
  transition: background-color .25s ease, color .25s ease, transform .2s ease;
}
.btn-line:hover { background: #F9E4DA; }
.btn-line.is-on { background: var(--ink); color: #fff; box-shadow: none; }
.btn-line:active { transform: scale(.98); }

/* Product page thumbnails */
.thumb { outline: 1.5px solid transparent; outline-offset: 2px; transition: outline-color .25s ease, opacity .25s ease; }
.thumb[aria-pressed="false"] { opacity: .7; }
.thumb[aria-pressed="false"]:hover { opacity: 1; }
.thumb[aria-pressed="true"] { outline-color: var(--brand); }

/* View toggle (Object / At home) */
.view-toggle button { height: 2.75rem; padding: 0 1.25rem; border-radius: 999px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; transition: background-color .25s ease, color .25s ease, transform .2s ease; }
.view-toggle button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.view-toggle button[aria-pressed="false"]:hover { background: #F9E4DA; }
.view-toggle button:active { transform: scale(.97); }

/* Product card images: the object (cutout) and the object at home (photo) */
.card-main, .card-alt { transition: opacity .7s var(--ease), transform 1.2s var(--ease); }
.card-alt { opacity: 0; transform: scale(1.04); }
.view-home .card-main { opacity: 0; }
.view-home .card-alt { opacity: 1; transform: none; }
@media (hover: hover) {
  .card:hover .card-main { opacity: 0; transform: scale(1.04); }
  .card:hover .card-alt { opacity: 1; transform: none; }
  .view-home .card:hover .card-main { opacity: 1; transform: none; }
  .view-home .card:hover .card-alt { opacity: 0; transform: scale(1.04); }
}

/* Tablet, two columns: an odd last card sits centred instead of leaving a hole on the right */
@media (min-width: 640px) and (max-width: 1023.98px) {
  #grid > .card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 20px); }
}
/* Desktop, three columns so a card fits on one screen; a short last row stays centred */
@media (min-width: 1024px) {
  #grid { display: flex; flex-wrap: wrap; justify-content: center; }
  #grid > .card { width: calc((100% - 112px) / 3); }
}

/* Product cutout: contact shadow so the isolated object sits on its surface (part of the photograph) */
.cutout { filter: drop-shadow(0 24px 24px rgba(120, 50, 20, .10)); }

/* Quick-add button: hidden until hover on pointer devices, always visible on touch */
.quick-add { opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s ease, background-color .25s ease, color .25s ease; }
.card:hover .quick-add, .quick-add:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .quick-add { opacity: 1; transform: none; } }

/* Entrances: content is visible without script; with script it rises in once, staggered */
.js [data-reveal] { opacity: 0; transform: translateY(24px); }
.js [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0ms);
}

/* First screen: a pure CSS entrance, so it never waits on script */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
[data-rise] { animation: rise .9s var(--ease) both; animation-delay: var(--d, 0ms); }

/* Hero photograph settles into place */
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
.settle { animation: settle 1.8s var(--ease) both; }

@keyframes bump { 50% { transform: scale(1.35); } }
.bump { animation: bump .35s ease; display: inline-block; }

#bag { overscroll-behavior: contain; }
#bag[aria-hidden="false"] { box-shadow: -24px 0 48px rgba(90, 35, 10, .12); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
