/* ═══════════════════════════════════════════════════════════
   Júnior Morasco — Portfolio
   Editorial · Dark · Lime · Asymmetric
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --bg:        #181613;
  --bg-2:      #201E1A;
  --bg-3:      #2A2722;
  --fg:        #EDEAE3;
  --fg-dim:    #8A8A85;
  --fg-faint:  #4A4A47;
  --line:      rgba(237, 234, 227, 0.08);
  --line-2:    rgba(237, 234, 227, 0.14);

  /* Accent — tweakable */
  --accent:    #EA5A2D;
  --accent-ink:#181613;

  --serif:  "Instrument Serif", "Times New Roman", serif;
  --sans:   "Instrument Sans", "Söhne", system-ui, sans-serif;
  --mono:   "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --pad-x: clamp(20px, 4vw, 56px);
}

html { scroll-behavior: smooth; background: var(--bg); }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--accent-ink); }

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

img { display: block; max-width: 100%; }

/* ─── Utility ───────────────────────────────────────────── */
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.mono-sm { font-size: 10px; letter-spacing: 0.12em; }
.serif { font-family: var(--serif); font-weight: 400; font-style: normal; letter-spacing: -0.025em; }

.rule { height: 1px; background: var(--line); width: 100%; }

/* ─── Top chrome ─────────────────────────────────────────── */
.tc {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px var(--pad-x);
  transition: background .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
  mix-blend-mode: difference;
}
.tc.solid {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  mix-blend-mode: normal;
}
.tc-l, .tc-c, .tc-r { display: flex; align-items: center; gap: 28px; }
.tc-c { justify-self: center; }
.tc-r { justify-self: end; }
.tc-mark {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.tc-mark em { font-style: italic; color: var(--accent); }
.tc-link {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  transition: color .2s;
  position: relative;
}
.tc-link:hover, .tc-link.active { color: var(--fg); }
.tc-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: var(--accent);
}
.tc-avail {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
}
.tc-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); }
  50%     { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); }
}

/* ─── Reveal ─────────────────────────────────────────────── */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .08s; }
.rv.d2 { transition-delay: .16s; }
.rv.d3 { transition-delay: .24s; }
.rv.d4 { transition-delay: .32s; }
.rv.d5 { transition-delay: .40s; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 14px 22px;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  color: var(--fg);
  background: transparent;
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-solid {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-solid:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

/* ─── Footer ─────────────────────────────────────────────── */
.ft {
  border-top: 1px solid var(--line);
  padding: 72px var(--pad-x) 36px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.ft-brand .serif { font-size: clamp(44px, 6vw, 88px); line-height: 0.9; letter-spacing: -0.03em; }
.ft-brand em { color: var(--accent); font-style: italic; }
.ft-brand .mono { margin-top: 18px; max-width: 300px; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--fg-dim); }
.ft-col-h { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 14px; }
.ft-col a { display: block; padding: 6px 0; color: var(--fg-dim); font-size: 13px; transition: color .2s, transform .2s; }
.ft-col a:hover { color: var(--accent); transform: translateX(3px); }
.ft-bot {
  grid-column: 1/-1;
  border-top: 1px solid var(--line);
  margin-top: 40px; padding-top: 24px;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-faint);
}

/* ─── Placeholders (monospace striped) ───────────────────── */
.ph {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(237,234,227,0.025) 0 12px,
      rgba(237,234,227,0.05) 12px 13px
    ),
    var(--bg-2);
  border: 1px solid var(--line);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ph-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}

/* ─── Image upload slots (matches .ph aesthetic) ──────────── */
image-slot.cs-slot {
  display: block;
  width: 100%;
  height: 100%;
  vertical-align: top;
  color: var(--fg-faint);
  font-family: var(--mono);
}
image-slot.cs-slot::part(frame) {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(237,234,227,0.025) 0 12px,
      rgba(237,234,227,0.05) 12px 13px
    ),
    var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}
image-slot.cs-slot::part(ring) {
  border-color: rgba(237,234,227,0.10);
  border-radius: 4px;
}
image-slot.cs-slot::part(empty) {
  color: var(--fg-faint);
  font-family: var(--mono);
  letter-spacing: 0.06em;
}
image-slot.cs-slot::part(image) {
  border-radius: 4px;
}
/* Aspect-ratio variants for the three slot shapes used in case pages */
image-slot.cs-slot.duo   { aspect-ratio: 4 / 5; }
image-slot.cs-slot.slab  { aspect-ratio: 16 / 9; }
image-slot.cs-slot.hero  { aspect-ratio: 16 / 9; }
/* Transparent variant — sits inside cs-hero-rich behind overlay */
image-slot.cs-slot.transparent::part(frame) {
  background: transparent;
  border: none;
  border-radius: 0;
}
image-slot.cs-slot.transparent::part(ring) {
  display: none;
}
/* About page portrait */
image-slot.ab-portrait-slot {
  display: block;
  width: 100%;
  height: 100%;
}
image-slot.ab-portrait-slot::part(frame) {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(237,234,227,0.025) 0 12px,
      rgba(237,234,227,0.05) 12px 13px
    ),
    var(--bg-2);
  border-radius: 0;
}
image-slot.ab-portrait-slot::part(ring) { display: none; }
image-slot.ab-portrait-slot::part(empty) {
  color: var(--fg-faint);
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

/* ═══════════ CASE — RICH HERO ═══════════
   Reusable visual hero block for every case page.
   Drop-in replacement for `.cs-hero-img`. */

.cs-hero-rich {
  margin: 24px var(--pad-x) 0;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 21 / 10;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
}
.cs-hero-rich.tall { aspect-ratio: 16 / 11; }
.cs-hero-rich.full { grid-template-columns: 1fr; }

/* MAIN VISUAL PANEL ------------------------------------------ */
.cs-hero-rich .hr-main {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 80% 20%, color-mix(in oklch, var(--accent) 18%, transparent) 0%, transparent 55%),
    radial-gradient(80% 60% at 10% 90%, rgba(237,234,227,0.04) 0%, transparent 60%),
    var(--bg-2);
}
.cs-hero-rich.full .hr-main { border-right: none; }
.cs-hero-rich .hr-main::before {
  /* hairline grid */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(237,234,227,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(237,234,227,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 50%, black 60%, transparent 100%);
}

/* Stripe diagonal accent band */
.cs-hero-rich .hr-main::after {
  content: "";
  position: absolute;
  inset: -20% -20% auto auto;
  width: 70%; height: 140%;
  background: repeating-linear-gradient(
    -28deg,
    color-mix(in oklch, var(--accent) 22%, transparent) 0 10px,
    transparent 10px 22px
  );
  transform: rotate(0);
  opacity: 0.45;
  pointer-events: none;
  mask-image: linear-gradient(to bottom left, black, transparent);
}

/* Hero image slot — when an <img> is provided */
.cs-hero-rich .hr-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cs-hero-rich .hr-img + .hr-main-overlay { display: block; }

/* OVERLAY — title + meta on top of the visual */
.cs-hero-rich .hr-overlay {
  position: relative;
  z-index: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
  color: var(--fg);
}
.cs-hero-rich .hr-tag {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  backdrop-filter: blur(8px);
  color: var(--fg);
}
.cs-hero-rich .hr-tag .dot { color: var(--accent); margin-right: 8px; }

.cs-hero-rich .hr-marker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--fg-faint);
  text-transform: uppercase;
  display: flex; gap: 24px; align-items: center;
}
.cs-hero-rich .hr-marker em {
  color: var(--accent);
  font-style: normal;
}

/* Index dial */
.cs-hero-rich .hr-dial {
  font-family: var(--serif);
  font-size: clamp(72px, 12vw, 180px);
  line-height: 0.85;
  letter-spacing: -0.035em;
  color: var(--fg-dim);
}
.cs-hero-rich .hr-dial em {
  font-style: italic;
  color: var(--accent);
  }

/* SIDE PANEL ------------------------------------------------- */
.cs-hero-rich .hr-side {
  padding: 40px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  background: var(--bg);
  position: relative;
}
.cs-hero-rich .hr-side .hr-side-k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.cs-hero-rich .hr-side .hr-side-h {
  font-family: var(--serif);
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.cs-hero-rich .hr-side .hr-side-h em { font-style: italic; color: var(--accent); }
.cs-hero-rich .hr-side .hr-side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}
.cs-hero-rich .hr-side .hr-stat .k {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  display: block;
  margin-bottom: 6px;
}
.cs-hero-rich .hr-side .hr-stat .v {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--fg);
}
.cs-hero-rich .hr-side .hr-stat .v em { font-style: italic; color: var(--accent); }

.cs-hero-rich .hr-side .hr-side-foot {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  display: flex; justify-content: space-between; gap: 16px;
}
.cs-hero-rich .hr-side .hr-side-foot em { color: var(--accent); font-style: normal; }

@media (max-width: 920px) {
  .cs-hero-rich {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
  }
  .cs-hero-rich .hr-main {
    aspect-ratio: 4/3;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .cs-hero-rich .hr-overlay { padding: 24px; gap: 20px; }
  .cs-hero-rich .hr-dial { font-size: clamp(64px, 18vw, 120px); }
  .cs-hero-rich .hr-side { padding: 24px; }
  .cs-hero-rich .hr-side .hr-side-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ─── Mobile menu ────────────────────────────────────────── */
.tc-burger {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
}
.tc-burger span {
  position: absolute; left: 11px; right: 11px; height: 1.5px;
  background: currentColor; border-radius: 1px;
  transition: transform .3s cubic-bezier(.6,.05,.05,1),
              opacity .2s ease,
              top .3s cubic-bezier(.6,.05,.05,1);
}
.tc-burger span:nth-child(1) { top: 14px; }
.tc-burger span:nth-child(2) { top: 19px; }
.tc-burger span:nth-child(3) { top: 24px; }
body.menu-open .tc-burger span:nth-child(1) { top: 19px; transform: rotate(45deg); }
body.menu-open .tc-burger span:nth-child(2) { opacity: 0; transform: translateX(-6px); }
body.menu-open .tc-burger span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.tc-drawer {
  position: fixed; inset: 0; z-index: 88;
  background: var(--bg);
  padding: 88px var(--pad-x) 32px;
  display: flex; flex-direction: column;
  transform: translateY(-100%);
  transition: transform .5s cubic-bezier(.6,.05,.05,1),
              visibility 0s linear .5s;
  visibility: hidden;
  overflow-y: auto;
}
body.menu-open .tc-drawer {
  transform: none;
  visibility: visible;
  transition: transform .5s cubic-bezier(.6,.05,.05,1),
              visibility 0s linear 0s;
}
body.menu-open { overflow: hidden; }

.tc-drawer-nav { display: flex; flex-direction: column; }
.tc-drawer-link {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--serif);
  font-size: clamp(40px, 13vw, 84px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--fg);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color .2s, padding-left .25s ease;
}
.tc-drawer-link:hover, .tc-drawer-link.active { color: var(--accent); padding-left: 8px; }
.tc-drawer-link em { font-style: italic; color: var(--accent); }
.tc-drawer-link .n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.tc-drawer-foot {
  margin-top: auto;
  padding-top: 32px;
  display: flex; flex-direction: column; gap: 14px;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-dim);
}
.tc-drawer-foot .row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.tc-drawer-foot .row:last-child { border-bottom: 0; }
.tc-drawer-foot .row a, .tc-drawer-foot .row .v { color: var(--fg); text-decoration: none; }
.tc-drawer-foot .v .tc-dot { display: inline-block; margin-right: 8px; vertical-align: middle; animation: none; }

/* Mobile */
@media (max-width: 920px) {
  .tc { grid-template-columns: 1fr auto; }
  .tc-c { display: none; }
  .tc-r { gap: 12px; }
  .tc-avail { display: none; }
  .tc-burger { display: block; }
  .ft { grid-template-columns: 1fr 1fr; }
  .ft-brand { grid-column: 1/-1; }
  .ft-bot { flex-direction: column; gap: 10px; text-align: center; }
}
@media (min-width: 921px) {
  .tc-drawer { display: none !important; }
}
