/* ============ Allan Eido — Illustration Portfolio ============ */
:root {
  --bg: #0e0d12;
  --bg-2: #15131b;
  --panel: #1b1823;
  --line: #2a2635;
  --text: #ece7dc;
  --muted: #a49dae;
  --accent: #ff8a3d;
  --accent-2: #7fd4c1;
  --green: #5c9a6e;
  --green-deep: #4a8259;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #ffa96b; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 13, 18, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
  color: var(--text); letter-spacing: 0.02em;
}
.brand em { color: var(--accent); font-style: normal; }
.nav-links { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted); font-size: 0.88rem; text-transform: uppercase;
  letter-spacing: 0.09em; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.cta {
  color: #10130f; background: var(--green); padding: 7px 16px;
  border-radius: 999px; font-weight: 600;
}
.nav-links a.cta:hover { background: var(--green-deep); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); font-size: 1.2rem; padding: 4px 12px; border-radius: 8px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-img { width: 100%; height: min(78vh, 720px); object-fit: cover; object-position: center 30%; }
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,13,18,0.3) 0%, rgba(14,13,18,0.15) 35%, rgba(14,13,18,0.82) 62%, rgba(14,13,18,0.97) 100%);
}
.hero-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 24px 48px; max-width: 1200px; margin: 0 auto; }
.hero-copy h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem); line-height: 1.08; max-width: 16ch;
}
.hero-copy p { color: var(--muted); max-width: 52ch; margin-top: 14px; font-size: 1.05rem; }
.hero-actions { margin-top: 24px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; transition: transform 0.15s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  position: relative; overflow: hidden; isolation: isolate;
  background-color: var(--green);
  background-image: url('../assets/ui/green-wash.jpg');
  background-size: 230% 230%; background-position: 0% 40%;
  color: #10130f; text-shadow: 0 1px 0 rgba(255,255,255,0.18);
  animation: washDrift 17s ease-in-out infinite alternate;
}
/* the watercolor slowly flows inside the button */
@keyframes washDrift {
  0%   { background-position: 0% 35%; }
  50%  { background-position: 100% 65%; }
  100% { background-position: 25% 100%; }
}
/* soft light sweep on hover */
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: -70%; z-index: -1;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-18deg); transition: left 0.65s ease; pointer-events: none;
}
.btn-primary:hover::before { left: 140%; }
.btn-primary:hover { background-color: var(--green-deep); color: #10130f; filter: brightness(1.07) saturate(1.05); }
.btn-primary:active { filter: brightness(0.97); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--green); color: var(--text); }

/* ---------- Artist statement (handwritten) ---------- */
.statement { padding: 64px 0 8px; }
.statement img {
  display: block; max-width: 860px; width: 100%; margin: 0 auto;
  mix-blend-mode: screen; opacity: 0.94;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker {
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.78rem; font-weight: 600; margin-bottom: 10px;
}
.section h2 { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 600; margin-bottom: 12px; }
.section .lede { color: var(--muted); max-width: 62ch; margin-bottom: 40px; }

/* ---------- Featured pieces (home) ---------- */
.feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: 42px; align-items: center; margin-bottom: 84px; }
.feature:nth-child(even) .feature-art { order: 2; }
.feature-art { cursor: zoom-in; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,0.45); }
.feature-art img { transition: transform 0.5s ease; width: 100%; }
.feature-art:hover img { transform: scale(1.025); }
.feature h3 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; line-height: 1.2; }
.feature .year { color: var(--accent-2); font-size: 0.85rem; letter-spacing: 0.1em; margin: 6px 0 14px; }
.feature .story { color: var(--muted); font-style: italic; white-space: pre-line; }

/* ---------- Collection cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.card {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); aspect-ratio: 4 / 5; display: block;
}
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover img { transform: scale(1.06); }
.card .card-label {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(10,9,14,0.92));
  color: var(--text); font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
}
.card .card-label small { display: block; font-family: var(--sans); color: var(--muted); font-size: 0.78rem; font-weight: 400; margin-top: 2px; }

/* ---------- Masonry gallery ---------- */
.masonry { columns: 3 300px; column-gap: 20px; }
.masonry figure {
  break-inside: avoid; margin: 0 0 20px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel); cursor: zoom-in;
  transition: transform 0.2s, border-color 0.2s;
}
.masonry figure:hover { transform: translateY(-3px); border-color: #453e57; }
.masonry figcaption { padding: 12px 14px; font-size: 0.85rem; color: var(--muted); }
.masonry figcaption strong { color: var(--text); font-weight: 600; display: block; font-family: var(--serif); font-size: 0.98rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(8, 7, 11, 0.96); flex-direction: column;
  align-items: center; justify-content: center; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 78vh; object-fit: contain; border-radius: 6px; }
.lb-caption { margin-top: 16px; text-align: center; max-width: 70ch; }
.lb-caption strong { font-family: var(--serif); font-size: 1.1rem; display: block; }
.lb-caption span { color: var(--muted); font-size: 0.9rem; font-style: italic; white-space: pre-line; }
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(27,24,35,0.8); color: var(--text); border: 1px solid var(--line);
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.2rem; cursor: pointer;
}
.lb-btn:hover { border-color: var(--accent); color: var(--accent); }
.lb-prev { left: 18px; } .lb-next { right: 18px; }
.lb-close { position: absolute; top: 18px; right: 22px; transform: none; }

/* ---------- Commission strip ---------- */
.commission-strip {
  border: 1px solid var(--line); border-radius: 16px; padding: 44px;
  background: radial-gradient(ellipse at top left, rgba(255,138,61,0.09), transparent 55%), var(--panel);
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.commission-strip h2 { margin-bottom: 6px; }
.commission-strip p { color: var(--muted); max-width: 48ch; }

/* ---------- Services / process ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 26px; }
.tile h3 { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 8px; }
.tile p { color: var(--muted); font-size: 0.93rem; }
.tile .num { color: var(--accent); font-family: var(--serif); font-size: 1.6rem; display: block; margin-bottom: 10px; }

/* ---------- Shop ---------- */
.shop-heading { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin-bottom: 24px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.product {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.product:hover { transform: translateY(-4px); border-color: #453e57; box-shadow: 0 18px 44px rgba(0,0,0,0.4); }
.product-img { display: block; position: relative; aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product:hover .product-img img { transform: scale(1.05); }
.product-info { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.product-info h4 { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; }
.product-info p { color: var(--muted); font-size: 0.86rem; margin: 5px 0 14px; }
.product-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { color: var(--accent-2); font-size: 0.82rem; letter-spacing: 0.04em; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.size-select {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 8px; font-family: var(--sans); font-size: 0.85rem;
}
.size-select:focus { outline: none; border-color: var(--accent); }
.product.original .price { color: var(--accent); font-family: var(--serif); font-style: italic; }
.browse-label {
  position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(10,9,14,0.9));
  color: var(--text); font-family: var(--serif); font-size: 1rem;
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.about-grid img { border-radius: 12px; border: 1px solid var(--line); }
.about-grid .bio p { margin-bottom: 16px; color: #cfc9d8; }
.about-grid .bio p:first-of-type { font-size: 1.12rem; color: var(--text); }

/* ---------- Poem ---------- */
.poem { font-family: var(--serif); font-style: italic; color: #cfc9d8; white-space: pre-line; border-left: 3px solid var(--accent); padding-left: 24px; margin: 32px 0; line-height: 1.9; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
form label { display: block; font-size: 0.85rem; color: var(--muted); margin: 18px 0 6px; letter-spacing: 0.05em; text-transform: uppercase; }
form input, form textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 12px 14px; font-family: var(--sans); font-size: 0.95rem;
}
form input:focus, form textarea:focus { outline: none; border-color: var(--accent); }
form button { margin-top: 22px; border: none; cursor: pointer; font-family: var(--sans); }
.contact-list { list-style: none; }
.contact-list li { margin-bottom: 14px; color: var(--muted); }
.contact-list a { font-weight: 600; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
footer p { color: var(--muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Motion layer ---------- */
/* Page exit fade (entrance is handled by per-element reveals) */
body { transition: opacity 0.22s ease; }
body.page-exit { opacity: 0; }

/* Reveal animation (staggered; gallery pieces settle with a tiny tilt) */
.reveal { opacity: 0; transform: translateY(26px) rotate(0deg); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: translateY(0) rotate(var(--settle, 0deg)); }
.masonry figure.reveal.in:hover { transform: translateY(-3px) rotate(0deg); }

/* Headline wipe */
h1.wipe, h2.wipe {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.1s;
}
h1.wipe.in, h2.wipe.in { clip-path: inset(0 0 0 0); }
.hero-copy h1.wipe { clip-path: inset(0 0 0 0); animation: heroWipe 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.15s backwards; }
@keyframes heroWipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Hero breathing + parallax + dust */
.hero-img.breathe {
  transform: translateY(var(--para, 0px));
  animation: breathe 18s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes breathe {
  from { scale: 1.02; translate: 0 0; }
  to   { scale: 1.09; translate: -1.2% -0.8%; }
}
.hero-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.hero-copy { z-index: 3; }

/* 3D tilt */
.tilt { transition: transform 0.35s ease; will-change: transform; }
.tilt:hover { transition: transform 0.06s linear; }

/* Magnetic buttons */
.btn { transition: transform 0.25s ease, background 0.2s; }

/* Custom cursor */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 200;
  border-radius: 50%;
}
.cursor-dot { width: 23px; height: 23px; background: url("../assets/ui/cursor-dot-red.png") center / contain no-repeat; }
.cursor-ring {
  width: 46px; height: 46px; border: 1px solid rgba(255,138,61,0.55);
  display: flex; align-items: center; justify-content: center;
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease, border-color 0.25s ease, margin 0.25s ease;
}
.cursor-ring span {
  font-size: 0.55rem; letter-spacing: 0.18em; font-weight: 600; color: var(--bg);
  opacity: 0; transition: opacity 0.2s ease;
}
body.cursor-art .cursor-ring {
  width: 74px; height: 74px; margin: -14px 0 0 -14px;
  background: rgba(255, 138, 61, 0.92); border-color: transparent;
}
body.cursor-art .cursor-ring span { opacity: 1; }
body.cursor-art .cursor-dot { opacity: 0; }
body.cursor-link .cursor-ring { width: 30px; height: 30px; margin: 8px 0 0 8px; border-color: var(--accent-2); }

/* Cat paws — Illustration & Animation pages hunt the dot cursor */
body.paw-page, body.paw-page a, body.paw-page button, body.paw-page select { cursor: none; }
.cat-paw {
  position: fixed; left: 0; top: 0;
  background-image: url('../assets/ui/paw-sprite-v2.png');
  background-repeat: no-repeat;
  transform-origin: 50% 100%; transform: translate(-9999px, -9999px);
  pointer-events: none; opacity: 0; z-index: 160;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
  will-change: transform, opacity, background-position;
}

/* Marquee band */
.marquee {
  overflow: hidden; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 18px 0; background: var(--bg-2);
}
.marquee-track { display: inline-block; animation: marquee 38s linear infinite; }
.marquee span {
  font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--muted);
  padding: 0 28px;
}
.marquee span em { font-style: normal; color: var(--accent); padding-right: 28px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Lightbox entrance */
.lightbox { opacity: 0; transition: opacity 0.3s ease; }
.lightbox.open { opacity: 0; }
.lightbox.open.anim { opacity: 1; }
.lightbox img { transform: scale(0.94); transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.lightbox.anim img { transform: scale(1); }
.lb-caption { opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s; }
.lightbox.anim .lb-caption { opacity: 1; transform: none; }

/* Reduced motion: calm everything */
@media (prefers-reduced-motion: reduce) {
  .reveal, h1.wipe, h2.wipe { opacity: 1; transform: none; clip-path: none; transition: none; animation: none; }
  .hero-img.breathe { animation: none; }
  .marquee-track { animation: none; }
  .btn-primary { animation: none; }
  .btn-primary::before { display: none; }
  .cursor-dot, .cursor-ring { display: none; }
}
@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .feature, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-art { order: 0; }
  .feature { gap: 20px; margin-bottom: 56px; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--bg-2); padding: 20px 24px;
    border-bottom: 1px solid var(--line); align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .section { padding: 52px 0; }
  .commission-strip { padding: 30px; }
}

/* Brush trail — soft red smear canvas behind the cursor */
.brush-trail {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 150;
}
@media (prefers-reduced-motion: reduce) {
  .brush-trail { display: none; }
}

/* Films — click-to-play YouTube facades (no third-party load until pressed) */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.video-card {
  position: relative; display: block; width: 100%; padding: 0;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--panel); cursor: pointer; font: inherit; color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.video-card:hover { transform: translateY(-4px); border-color: #453e57; box-shadow: 0 18px 44px rgba(0,0,0,0.45); }
.video-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; transition: transform 0.5s ease; }
.video-card:hover img { transform: scale(1.04); }
.video-play {
  position: absolute; top: 50%; left: 50%; width: 66px; height: 66px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(92,154,110,0.92); border: 2px solid rgba(255,255,255,0.25);
  transition: background 0.25s ease, transform 0.25s ease;
}
.video-play::after {
  content: ""; position: absolute; top: 50%; left: 56%;
  transform: translate(-50%, -50%);
  border-style: solid; border-width: 13px 0 13px 21px;
  border-color: transparent transparent transparent #10130f;
}
.video-card:hover .video-play { background: var(--green-deep); transform: translate(-50%, -50%) scale(1.08); }
.video-title {
  position: absolute; inset: auto 0 0 0; padding: 44px 18px 16px; text-align: left;
  background: linear-gradient(180deg, transparent, rgba(10,9,14,0.92));
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--text);
}
.video-card iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }

/* Vertical Short — keeps its own frame shape beside the 16:9 films */
.video-short { align-self: start; max-width: 340px; }
.video-short img { aspect-ratio: 1080 / 1110; }
.video-short .video-play { width: 56px; height: 56px; }
.video-title small {
  display: block; font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); margin-top: 3px;
}
