:root {
  --bg: #f4f1ea;
  --ink: #0b0b0b;
  --dim: rgba(11, 11, 11, 0.62);
  --line: rgba(11, 11, 11, 0.14);
  --panel: #ebe6dc;
  --media: #e3ded2;
  --shade: rgba(244, 241, 234, 0.25);
  --grain: 0.05;
  --dev-ink: rgba(11, 11, 11, 0.3);
  --dev-hover: rgba(11, 11, 11, 0.6);
  --accent: #ff5a36;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
[data-theme="dark"] {
  --bg: #0b0b0b;
  --ink: #f4f1ea;
  --dim: rgba(244, 241, 234, 0.6);
  --line: rgba(244, 241, 234, 0.15);
  --panel: #101010;
  --media: #181818;
  --shade: rgba(11, 11, 11, 0.2);
  --grain: 0.07;
  --dev-ink: rgba(255, 255, 255, 0.3);
  --dev-hover: rgba(255, 255, 255, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #000; }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 100;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.6s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -1%); }
  100% { transform: translate(0, 0); }
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--accent);
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 200;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease);
  display: none;
}
.cursor.is-big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
  .has-cursor, .has-cursor * { cursor: none !important; }
  .has-cursor input, .has-cursor textarea { cursor: text !important; }
}
.dev {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 3;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--dev-ink);
  opacity: 0;
  pointer-events: none;
  animation: devFade 1s 1.2s ease forwards;
}
.dev a {
  color: var(--dev-ink);
  text-decoration: none;
  pointer-events: auto;
  transition: color 0.3s ease;
}
.dev a:hover { color: var(--dev-hover); }
@keyframes devFade { to { opacity: 1; } }

/* nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
}
.nav {
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav__logo img { height: 36px; width: auto; }
.nav__links { display: flex; gap: 28px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; mix-blend-mode: difference; }
.nav__links a { position: relative; }
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cart {
  background: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: inherit;
}
.nav__theme {
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  color: inherit;
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
  margin-right: 10px;
  transition: transform 0.4s var(--ease);
}
.nav__theme:hover { transform: rotate(20deg); }
.nav__actions { display: flex; align-items: center; color: #fff; mix-blend-mode: difference; }
.nav__cart span {
  display: inline-block;
  min-width: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  text-align: center;
}

/* hero */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}
.hero__video.portrait { display: none; }
@media (max-width: 768px) {
  .hero__video.landscape { display: none; }
  .hero__video.portrait { display: block; }
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, var(--shade) 55%, rgba(0, 0, 0, 0.3) 100%);
}
.hero__inner { position: relative; z-index: 2; padding: 0 32px 120px; width: 100%; }
.hero__title {
  font-size: clamp(36px, min(11.5vw, 22vh), 230px);
  line-height: 0.85;
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #fff;
  mix-blend-mode: difference;
}
.hero__title span { display: inline-block; transition: transform 0.6s var(--ease); }
.hero__sub {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  background: var(--accent);
  color: #000;
}
.marquee__track {
  display: inline-flex;
  gap: 48px;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  animation: marquee 22s linear infinite;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* sections */
section { padding: 140px 32px; position: relative; }
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.h2 {
  font-size: clamp(44px, 8vw, 128px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.9;
  text-transform: uppercase;
}

/* collection grid */
.collection__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 80px; }
.collection__hint { color: var(--dim); max-width: 320px; font-size: 15px; line-height: 1.5; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 56px 24px; }
.card { position: relative; grid-column: span 4; cursor: pointer; }
.card:nth-child(1) { grid-column: 1 / span 6; }
.card:nth-child(2) { grid-column: 8 / span 5; margin-top: 180px; }
.card:nth-child(3) { grid-column: 2 / span 4; margin-top: 60px; }
.card:nth-child(4) { grid-column: 7 / span 4; margin-top: 200px; }
.card:nth-child(5) { grid-column: 4 / span 6; margin-top: 40px; }
.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--media);
  border-radius: 2px;
}
.card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s var(--ease), transform 1.2s var(--ease);
}
.card__media img.alt { opacity: 0; }
.card:hover .card__media img.alt { opacity: 1; }
.card:hover .card__media img { transform: scale(1.04); }
.card__num {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  font-size: 12px;
  letter-spacing: 0.1em;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
}
.card__info { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 18px; }
.card__name { font-size: clamp(24px, 3vw, 40px); font-weight: 700; letter-spacing: -0.02em; text-transform: uppercase; }
.card__price { font-size: 16px; color: var(--dim); white-space: nowrap; }
.card__short { margin-top: 8px; color: var(--dim); font-size: 14px; line-height: 1.5; max-width: 420px; }

.reveal { opacity: 0; transform: translateY(60px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* about */
.about { border-top: 1px solid var(--line); }
.about__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: center; margin-top: 60px; }
.about__text { font-size: clamp(20px, 2.2vw, 30px); line-height: 1.45; font-weight: 300; }
.about__text strong { font-weight: 700; }
.about__text p + p { margin-top: 1.2em; color: var(--dim); }
.about__visual { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
.about__visual img { width: 100%; height: 100%; object-fit: cover; }
.about__stamp {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.06em;
  animation: spin 16s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* contact */
.contact { border-top: 1px solid var(--line); }
.contact__links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 56px; }
.contact__links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 15px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.contact__links a:hover { background: var(--ink); color: #000; border-color: var(--ink); }
.footer { padding: 40px 32px; display: flex; justify-content: space-between; color: var(--dim); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); }

/* product page */
.product { padding: 140px 32px 100px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; min-height: 100vh; align-items: start; }
.product__gallery { display: grid; grid-template-columns: 90px 1fr; gap: 16px; position: sticky; top: 100px; }
.product__thumbs { display: flex; flex-direction: column; gap: 10px; max-height: 80vh; overflow-y: auto; }
.product__thumbs button { border: 0; padding: 0; background: none; cursor: pointer; opacity: 0.45; transition: opacity 0.3s; }
.product__thumbs button.is-active, .product__thumbs button:hover { opacity: 1; }
.product__thumbs img { width: 90px; height: 112px; object-fit: cover; }
.product__main { position: relative; aspect-ratio: 4 / 5; background: var(--media); overflow: hidden; cursor: zoom-in; }
.product__main img { width: 100%; height: 100%; object-fit: cover; animation: fadeIn 0.6s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.product__info { padding-top: 40px; }
.product__back { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.product__back:hover { color: var(--ink); }
.product__title { font-size: clamp(56px, 9vw, 140px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.88; text-transform: uppercase; margin: 24px 0; }
.product__kind { color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; font-size: 13px; }
.product__price { font-size: 32px; font-weight: 700; margin: 28px 0; }
.product__text { color: var(--dim); line-height: 1.7; font-size: 16px; max-width: 520px; }
.product__meta { margin: 36px 0; border-top: 1px solid var(--line); }
.product__meta div { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.product__meta span:first-child { color: var(--dim); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 32px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.btn:hover { background: var(--ink); color: #000; transform: translateY(-2px); }
.btn--solid { background: var(--accent); border-color: var(--accent); color: #000; width: 100%; }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.link { background: none; border: 0; cursor: pointer; text-decoration: underline; color: var(--dim); }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__close { position: absolute; top: 20px; right: 24px; background: none; border: 0; font-size: 36px; cursor: pointer; }

/* cart drawer */
.drawer { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.drawer.is-open { pointer-events: auto; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.4s; }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100%);
  background: var(--panel);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.6s var(--ease);
  display: flex;
  flex-direction: column;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 24px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 22px; text-transform: uppercase; letter-spacing: -0.01em; }
#cartItems { flex: 1; overflow-y: auto; padding: 8px 24px; }
.cart-empty { color: var(--dim); padding: 40px 0; text-align: center; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 72px; height: 90px; object-fit: cover; }
.cart-item__name { text-transform: uppercase; font-weight: 700; letter-spacing: -0.01em; }
.cart-item__price { color: var(--dim); font-size: 14px; margin-top: 4px; }
.cart-item__remove { background: none; border: 0; color: var(--dim); cursor: pointer; text-decoration: underline; font-size: 13px; margin-top: 6px; }
.drawer__foot { padding: 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.drawer__total { display: flex; justify-content: space-between; font-size: 18px; }
.drawer__total strong { font-size: 22px; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form input, .form textarea {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 14px 16px;
  outline: none;
  resize: vertical;
}
.form input:focus, .form textarea:focus { border-color: var(--accent); }
.form__status { font-size: 14px; color: var(--dim); min-height: 20px; }

/* responsive */
@media (max-width: 900px) {
  .nav { padding: 14px 18px; }
  .nav__links { display: none; }
  section { padding: 90px 20px; }
  .hero__inner { padding: 0 20px 90px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 40px 14px; }
  .card, .card:nth-child(n) { grid-column: span 1; margin-top: 0; }
  .card:nth-child(even) { margin-top: 70px; }
  .about__grid { grid-template-columns: 1fr; gap: 50px; }
  .about__stamp { right: 12px; bottom: -22px; width: 120px; height: 120px; }
  .product { grid-template-columns: 1fr; padding: 110px 18px 60px; gap: 32px; }
  .product__gallery { grid-template-columns: 1fr; position: static; }
  .product__thumbs { flex-direction: row; order: 2; max-height: none; }
  .product__thumbs img { width: 70px; height: 88px; }
  .product__info { padding-top: 0; }
}
@media (max-width: 560px) {
  .nav__logo img { height: 28px; }
  .nav__theme { width: 32px; height: 32px; margin-right: 8px; }
  .nav__cart { padding: 7px 12px; font-size: 12px; }
  .hero__sub { font-size: 12px; gap: 8px; }
  .hero__inner { padding: 0 18px 70px; }
  .grid { grid-template-columns: 1fr; }
  .card:nth-child(even) { margin-top: 0; }
  .card__info { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
