/*
Theme Name: Matti Snellman Photography
Theme URI: https://mattisnellman.com
Author: Matti Snellman
Description: A modern, sleek photography portfolio theme with masonry grid, lightbox, and Customizer controls.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: matti-portfolio
Tags: photography, portfolio, dark, one-page, full-width
*/

/* =============================================================
   CUSTOM PROPERTIES
   ============================================================= */
:root {
  --bg:           #0b0b0b;
  --bg-2:         #141414;
  --bg-3:         #1c1c1c;
  --text:         #e8e4df;
  --text-muted:   #7a7570;
  --accent:       #c8a97e;
  --accent-dim:   rgba(200,169,126,.15);
  --border:       rgba(255,255,255,.07);
  --gap:          1.5rem;
  --max-w:        1400px;
  --nav-h:        72px;
  --ease:         cubic-bezier(.4,0,.2,1);
  --fast:         180ms;
  --med:          320ms;
  --slow:         500ms;
}

/* =============================================================
   RESET
   ============================================================= */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html  { scroll-behavior:smooth; }
body  {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img,video { display:block; max-width:100%; height:auto; }
a   { color:inherit; text-decoration:none; }
ul,ol { list-style:none; }
button { cursor:pointer; border:none; background:none; font:inherit; color:inherit; }
input,textarea,select { font:inherit; }

/* =============================================================
   TYPOGRAPHY
   ============================================================= */
h1,h2,h3,h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.7rem); }

/* =============================================================
   UTILITIES
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}
.sr-only {
  position:absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.section-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}
.section-title { color: var(--text); margin-bottom: 3.5rem; }
section { padding: clamp(5rem, 10vh, 9rem) 0; }

/* =============================================================
   NAVIGATION
   ============================================================= */
.site-header {
  position: fixed;
  top:0; left:0; right:0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background var(--med) var(--ease), backdrop-filter var(--med) var(--ease);
}
.site-header.scrolled {
  background: rgba(11,11,11,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color var(--fast);
  white-space: nowrap;
}
.site-logo:hover { color: var(--accent); }
@media (max-width: 600px) {
  .site-logo {
    font-size: .78rem;
    letter-spacing: .08em;
  }
}
@media (max-width: 380px) {
  .site-logo {
    font-size: .68rem;
    letter-spacing: .05em;
  }
}

.primary-nav { display:flex; gap:2.5rem; align-items:center; }
.primary-nav ul { display:flex; gap:2.5rem; }
.primary-nav a {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--fast);
  position: relative;
  padding-bottom: 2px;
}
.primary-nav a::after {
  content:'';
  position:absolute; bottom:0; left:0; right:0;
  height:1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--fast) var(--ease);
}
.primary-nav a:hover,
.primary-nav a.current-menu-item { color:var(--text); }
.primary-nav a:hover::after,
.primary-nav a.current-menu-item::after { transform:scaleX(1); }

/* Hamburger */
.nav-toggle {
  display:none;
  flex-direction:column;
  gap:5px;
  padding:8px;
}
.nav-toggle span {
  display:block; width:24px; height:1.5px;
  background:var(--text);
  transition: transform var(--med) var(--ease), opacity var(--fast);
}
.nav-toggle.open span:nth-child(1) { transform:translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity:0; }
.nav-toggle.open span:nth-child(3) { transform:translateY(-6.5px) rotate(-45deg); }

/* Mobile overlay nav */
.mobile-nav {
  display:none;
  position:fixed; inset:0; z-index:90;
  background:var(--bg);
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2.5rem;
}
.mobile-nav.open { display:flex; }
.mobile-nav ul { display:flex; flex-direction:column; align-items:center; gap:2.5rem; }
.mobile-nav a {
  font-family:'Playfair Display', Georgia, serif;
  font-size:2.5rem;
  font-weight: 400;
  font-style: normal;
  color:var(--text-muted);
  transition:color var(--fast);
}
.mobile-nav a:hover { color:var(--text); }

@media (max-width:768px) {
  .primary-nav { display:none; }
  .nav-toggle   { display:flex; }
}

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position:relative;
  height:100svh;
  min-height:600px;
  display:flex;
  align-items:center;
  overflow:hidden;
}
.hero-bg {
  position:absolute; inset:0;
  background-size:cover;
  background-position:center;
  transition:transform 8s var(--ease);
}
.hero:hover .hero-bg { transform:scale(1.03); }
.hero-overlay {
  position:absolute; inset:0;
  background: linear-gradient(
    to top,
    rgba(11,11,11,.88) 0%,
    rgba(11,11,11,.25) 50%,
    rgba(11,11,11,.1)  100%
  );
}
.hero-content {
  position:relative;
  margin-top: 8vh; /* halfway between previous -15vh and old bottom position */
}
.hero-eyebrow {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size:.72rem;
  font-weight: 400;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:var(--accent);
  margin-bottom:1rem;
}
/* Title sized so "Matti Snellman" right edge aligns with nav right edge */
.hero-title {
  font-size: clamp(2.97rem, 4.97vw, 4.75rem);
  color:var(--text);
  margin-bottom:1.5rem;
  white-space: nowrap;
}
.hero-subtitle {
  font-size: clamp(.9rem,1.5vw,1.1rem);
  font-weight: 400;
  color:rgba(232,228,223,.55);
  max-width:44ch;
  margin-bottom:2.5rem;
  letter-spacing: .01em;
}
.hero-cta {
  display:inline-flex;
  align-items:center;
  gap:.75rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size:.75rem;
  font-weight: 500;
  letter-spacing:.18em;
  text-transform:uppercase;
  border:1px solid rgba(255,255,255,.22);
  padding:.9rem 2rem;
  transition:border-color var(--fast), background var(--fast), color var(--fast);
}
.hero-cta:hover {
  border-color:var(--accent);
  background:var(--accent-dim);
  color:var(--accent);
}
.hero-cta svg { transition:transform var(--fast); }
.hero-cta:hover svg { transform:translateX(4px); }

/* Scroll indicator */
.scroll-hint {
  position:absolute;
  bottom:2rem; right:clamp(1.25rem,4vw,3rem);
  display:flex; flex-direction:column; align-items:center; gap:.5rem;
  font-size:.63rem; letter-spacing:.15em; text-transform:uppercase;
  color:var(--text-muted);
  writing-mode:vertical-rl;
}
.scroll-hint::before {
  content:'';
  width:1px; height:40px;
  background:linear-gradient(to bottom,var(--accent),transparent);
  animation:scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform:scaleY(0); transform-origin:top; }
  50%  { transform:scaleY(1); transform-origin:top; }
  51%  { transform:scaleY(1); transform-origin:bottom; }
  100% { transform:scaleY(0); transform-origin:bottom; }
}

/* =============================================================
   PORTFOLIO GRID
   ============================================================= */
.portfolio-section { background:var(--bg); }

/* Filter tabs */
.filter-bar {
  display:flex;
  flex-wrap:wrap;
  gap:.5rem 1.5rem;
  margin-bottom:3rem;
  border-bottom:1px solid var(--border);
  padding-bottom:1rem;
}
.filter-btn {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size:.72rem;
  font-weight: 400;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--text-muted);
  padding:.35rem 0;
  border-bottom:2px solid transparent;
  margin-bottom:-1px;
  transition:color var(--fast), border-color var(--fast);
}
.filter-btn:hover { color:var(--text); }
.filter-btn.active {
  color:var(--text);
  border-bottom-color:var(--accent);
}

/* Masonry-style columns */
.portfolio-grid {
  columns:3 280px;
  column-gap:var(--gap);
}
.portfolio-item {
  break-inside:avoid;
  margin-bottom:var(--gap);
  position:relative;
  overflow:hidden;
  cursor:pointer;
}
.portfolio-item img {
  width:100%; display:block;
  transition:transform var(--slow) var(--ease);
}
.portfolio-item-overlay {
  position:absolute; inset:0;
  background:linear-gradient(to top, rgba(11,11,11,.78) 0%, transparent 55%);
  opacity:0;
  transition:opacity var(--med) var(--ease);
  display:flex; flex-direction:column; justify-content:flex-end;
  padding:1.25rem;
}
.portfolio-item:hover img { transform:scale(1.04); }
.portfolio-item:hover .portfolio-item-overlay { opacity:1; }
.portfolio-item-title {
  font-family:'Playfair Display', Georgia, serif;
  font-size:1.05rem;
  font-weight: 400;
  font-style: normal;
  color:var(--text);
  line-height:1.2;
}
.portfolio-item-cat {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size:.6rem;
  font-weight: 400;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--accent);
  margin-bottom:.25rem;
}
.portfolio-item.hidden { display:none; }

/* =============================================================
   LIGHTBOX
   ============================================================= */
.lightbox {
  position:fixed; inset:0; z-index:200;
  background:#0b0b0b;
  display:flex; align-items:center; justify-content:center;
  opacity:0; visibility:hidden;
  transition:opacity var(--med) var(--ease), visibility var(--med);
}
.lightbox.open { opacity:1; visibility:visible; }
.lightbox-inner {
  position:relative;
  display:flex; align-items:center; justify-content:center;
}
.lightbox-img {
  max-width:88vw; max-height:86vh;
  object-fit:contain;
  box-shadow:0 30px 80px rgba(0,0,0,.6);
}
.lightbox-close {
  position:absolute; top:-3rem; right:0;
  font-size:.7rem; letter-spacing:.15em; text-transform:uppercase;
  color:var(--text-muted);
  transition:color var(--fast);
}
.lightbox-close:hover { color:var(--text); }
.lightbox-nav {
  position:fixed;
  top:0; bottom:0;
  width: 25vw;
  max-width: 220px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2.5rem;
  color:var(--text-muted);
  background:transparent;
  transition:color var(--fast), background var(--fast);
  z-index: 210;
}
.lightbox-nav span {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:3.5rem; height:3.5rem;
  border-radius:50%;
  transition: background var(--fast);
}
.lightbox-nav:hover { color:var(--text); }
.lightbox-nav:hover span { background: rgba(255,255,255,.06); }
.lightbox-prev { left:0; justify-content:flex-start; padding-left:1.5rem; }
.lightbox-next { right:0; justify-content:flex-end;  padding-right:1.5rem; }
.lightbox-caption {
  position:absolute; bottom:-3rem;
  left:0; right:0; text-align:center;
  font-size:.73rem; letter-spacing:.1em;
  color:var(--text-muted);
}
@media (max-width:640px) {
  .lightbox-nav { width: 22vw; }
  .lightbox-prev { padding-left:.5rem; }
  .lightbox-next { padding-right:.5rem; }
  /* Fixed, larger close button anchored to the screen corner on mobile */
  .lightbox-close {
    position: fixed;
    top: 1rem; right: 1rem;
    font-size: .9rem;
    padding: .6rem .9rem;
    background: rgba(0,0,0,.4);
    border-radius: 4px;
    z-index: 220;
  }
  /* Hint text below the image on mobile */
  .lightbox-caption::after {
    content: ' · Tap image to close';
    color: rgba(232,228,223,.35);
  }
}

/* =============================================================
   ABOUT
   ============================================================= */
.about-section { background:var(--bg-2); overflow-x:hidden; }
.about-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:clamp(3rem,6vw,7rem);
  align-items:center;
}
.about-image-wrap {
  position:relative;
  aspect-ratio:3/4;
  overflow:hidden;
}
.about-image-wrap img {
  width:100%; height:100%;
  object-fit:cover;
  transition:transform var(--slow) var(--ease);
}
.about-image-wrap:hover img { transform:scale(1.03); }
.about-image-wrap::after {
  content:'';
  position:absolute; inset:16px;
  border:1px solid rgba(200,169,126,.4);
  transform:translate(16px,16px);
  pointer-events:none;
  transition:transform var(--med) var(--ease);
}
.about-image-wrap::after {
  content:'';
  position:absolute; inset:16px;
  border:1px solid rgba(200,169,126,.4);
  transform:translate(12px,12px);
  pointer-events:none;
  transition:transform var(--med) var(--ease);
}
.about-image-wrap:hover::after { transform:translate(6px,6px); }
@media (max-width:768px) {
  .about-grid { grid-template-columns:1fr; }
  .about-image-wrap { aspect-ratio:4/3; }
  /* hide decorative frame on mobile — it causes horizontal overflow */
  .about-image-wrap::after { display:none; }
  .about-text { padding: 0; }
  .about-stats { gap:1.5rem; flex-wrap:wrap; }
}
.about-lead {
  font-family: 'Playfair Display', Georgia, serif;
  font-size:clamp(1.05rem,2vw,1.35rem);
  font-weight: 400;
  font-style: italic;
  color:var(--text-muted);
  line-height:1.7;
  margin-bottom:1.5rem;
}
.about-body {
  font-size:.95rem;
  color:var(--text-muted);
  line-height:1.85;
  margin-bottom:2.5rem;
}
.about-stats {
  display:flex; gap:2.5rem;
  margin-bottom:2.5rem;
  padding-top:1.5rem;
  border-top:1px solid var(--border);
}
.stat-num {
  font-family:'Playfair Display', Georgia, serif;
  font-size:2.5rem;
  font-weight: 400;
  font-style: normal;
  color:var(--accent);
  line-height:1;
  margin-bottom:.3rem;
}
.stat-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size:.65rem;
  font-weight: 400;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--text-muted);
}

/* =============================================================
   CONTACT
   ============================================================= */
.contact-section { background:var(--bg); }
.contact-inner {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:clamp(3rem,6vw,7rem);
  align-items:start;
}
.contact-lead {
  font-size:.95rem;
  color:var(--text-muted);
  line-height:1.85;
  margin-bottom:2rem;
  max-width:40ch;
}
.contact-email {
  font-family: 'Playfair Display', Georgia, serif;
  font-size:clamp(1.1rem,2vw,1.6rem);
  font-weight: 400;
  font-style: normal;
  color:var(--accent);
  transition:opacity var(--fast);
  display:block; margin-bottom:2rem;
}
.contact-email:hover { opacity:.72; }
.social-links { display:flex; gap:1.5rem; flex-wrap:wrap; }
.social-links a {
  font-size:.7rem;
  letter-spacing:.15em;
  text-transform:uppercase;
  color:var(--text-muted);
  transition:color var(--fast);
}
.social-links a:hover { color:var(--text); }

/* Contact form */
.contact-form { display:flex; flex-direction:column; gap:1.25rem; }
.form-group  { display:flex; flex-direction:column; gap:.4rem; }
.form-group label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size:.66rem;
  font-weight: 400;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--text-muted);
}
.form-group input,
.form-group textarea {
  background:var(--bg-2);
  border:1px solid var(--border);
  color:var(--text);
  padding:.85rem 1rem;
  font-size:.95rem;
  outline:none;
  transition:border-color var(--fast), background var(--fast);
  resize:vertical;
  width:100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color:var(--text-muted); }
.form-group input:focus,
.form-group textarea:focus {
  border-color:rgba(200,169,126,.5);
  background:var(--bg-3);
}
.form-group textarea { min-height:130px; }
.btn-submit {
  align-self:flex-start;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size:.75rem;
  font-weight: 600;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--bg);
  background:var(--accent);
  padding:.9rem 2.5rem;
  transition:opacity var(--fast), transform var(--fast);
}
.btn-submit:hover  { opacity:.85; transform:translateY(-1px); }
.btn-submit:active { transform:translateY(0); }
.form-success {
  font-size:.85rem;
  color:var(--accent);
  padding:.75rem 0;
}
@media (max-width:768px) {
  .contact-inner { grid-template-columns:1fr; }
}

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer {
  padding:2.5rem 0;
  border-top:1px solid var(--border);
  background:var(--bg);
}
.footer-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:1rem;
}
.footer-copy {
  font-size:.73rem;
  color:var(--text-muted);
  letter-spacing:.04em;
}
.footer-back-top {
  font-size:.68rem;
  letter-spacing:.15em;
  text-transform:uppercase;
  color:var(--text-muted);
  transition:color var(--fast);
}
.footer-back-top:hover { color:var(--accent); }

/* =============================================================
   BLOG / INDEX
   ============================================================= */
.blog-wrap { padding-top:calc(var(--nav-h) + 4rem); padding-bottom:6rem; }
.post-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:var(--gap);
  margin-top:3rem;
}
.post-card {}
.post-thumb {
  aspect-ratio:16/10;
  overflow:hidden;
  margin-bottom:1.25rem;
  display:block;
}
.post-thumb img {
  width:100%; height:100%;
  object-fit:cover;
  transition:transform var(--slow) var(--ease);
}
.post-card:hover .post-thumb img { transform:scale(1.04); }
.post-meta {
  font-size:.68rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--accent);
  margin-bottom:.5rem;
}
.post-title {
  font-size:1.3rem;
  margin-bottom:.75rem;
  transition:color var(--fast);
}
.post-card:hover .post-title { color:var(--accent); }
.post-excerpt { font-size:.9rem; color:var(--text-muted); }

/* =============================================================
   SINGLE PORTFOLIO
   ============================================================= */
.single-portfolio-wrap { padding-top:var(--nav-h); }
.portfolio-hero-img {
  width:100%;
  max-height:90vh;
  object-fit:contain;
  background:var(--bg-2);
}
.portfolio-info { padding:3rem 0 5rem; }
.portfolio-info h1 { margin-bottom:1rem; }
.portfolio-body {
  font-size:1rem; color:var(--text-muted);
  max-width:60ch; line-height:1.85;
  margin-top:1.25rem;
}
.portfolio-nav-links {
  display:flex;
  justify-content:space-between;
  padding:2rem 0;
  border-top:1px solid var(--border);
  font-size:.73rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}
.portfolio-nav-links a { transition:color var(--fast); }
.portfolio-nav-links a:hover { color:var(--text); }

/* =============================================================
   PAGE TEMPLATE
   ============================================================= */
.page-wrap {
  padding-top:calc(var(--nav-h) + 5rem);
  padding-bottom:6rem;
}
.page-wrap h1 { margin-bottom:2rem; }
.entry-content {
  font-size:1rem;
  color:var(--text-muted);
  max-width:70ch;
  line-height:1.85;
}
.entry-content p  { margin-bottom:1.25rem; }
.entry-content a  { color:var(--accent); }
.entry-content h2,.entry-content h3 { color:var(--text); margin:2rem 0 1rem; }

/* =============================================================
   404
   ============================================================= */
.not-found {
  min-height:80vh;
  display:flex; align-items:center; justify-content:center;
  text-align:center;
  padding-top:var(--nav-h);
}
.not-found-num {
  font-family:'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-style: normal;
  font-size:clamp(6rem,20vw,14rem);
  color:var(--bg-3);
  line-height:1; margin-bottom:.5rem;
}
.not-found h2 { margin-bottom:1rem; }
.not-found p  { color:var(--text-muted); margin-bottom:2rem; }

/* =============================================================
   WP NAVIGATION PAGINATION
   ============================================================= */
.nav-links { display:flex; gap:1rem; justify-content:center; margin-top:3rem; }
.nav-links a, .nav-links span {
  font-size:.73rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--text-muted);
  padding:.5rem 1rem;
  border:1px solid var(--border);
  transition:border-color var(--fast), color var(--fast);
}
.nav-links a:hover { color:var(--text); border-color:rgba(255,255,255,.2); }
.nav-links .current { color:var(--accent); border-color:var(--accent); }

/* =============================================================
   CUSTOM CURSOR
   ============================================================= */
body.custom-cursor-active,
body.custom-cursor-active * { cursor: none !important; }

/* Safety net: never show custom cursor on touch/coarse pointer devices */
@media (hover: none), (pointer: coarse) {
  .cur-dot, .cur-ring { display: none !important; }
  body.custom-cursor-active,
  body.custom-cursor-active * { cursor: auto !important; }
}

.cur-dot,
.cur-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  will-change: transform;
  transition: opacity .3s;
}

/* Small filled dot */
.cur-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  margin-left: -3px;
  margin-top: -3px;
  transition: opacity .3s, width .2s, height .2s, margin .2s, background .2s;
}

/* Larger lagging ring */
.cur-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(200,169,126,.65);
  margin-left: -18px;
  margin-top: -18px;
  transition: opacity .3s, width .25s var(--ease), height .25s var(--ease),
              margin .25s var(--ease), border-color .2s;
}

/* Hover state — dot grows slightly, ring shrinks to wrap the element */
.cur-dot.cur-hover {
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  background: #fff;
}
.cur-ring.cur-hover {
  width: 48px;
  height: 48px;
  margin-left: -24px;
  margin-top: -24px;
  border-color: rgba(200,169,126,.9);
}

/* =============================================================
   CATEGORY GRID  (homepage portfolio section)
   ============================================================= */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
@media (max-width: 900px)  { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .cat-grid { grid-template-columns: 1fr; } }

.cat-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--bg-3);
  text-decoration: none;
}
.cat-card-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform var(--slow) var(--ease);
}
.cat-card-img--empty { background: var(--bg-3); }
.cat-card:hover .cat-card-img { transform: scale(1.06); }

.cat-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(11,11,11,.88) 0%,
    rgba(11,11,11,.15) 60%,
    transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: background var(--med) var(--ease);
}
.cat-card:hover .cat-card-overlay {
  background: linear-gradient(to top,
    rgba(11,11,11,.92) 0%,
    rgba(11,11,11,.3) 65%,
    transparent 100%);
}
.cat-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: .35rem;
  transition: color var(--fast);
}
.cat-card:hover .cat-card-title { color: var(--accent); }
.cat-card-count {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(232,228,223,.5);
}
.cat-card-arrow {
  position: absolute;
  bottom: 1.5rem; right: 1.5rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--med) var(--ease), transform var(--med) var(--ease);
}
.cat-card:hover .cat-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* =============================================================
   CATEGORY HEADER  (gallery pages)
   ============================================================= */
.cat-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}
.cat-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  transition: color var(--fast);
}
.cat-back:hover { color: var(--text); }
.cat-header h1 { margin-bottom: .75rem; }
.cat-desc {
  font-size: .95rem;
  color: var(--text-muted);
  max-width: 55ch;
  line-height: 1.75;
  margin-top: .75rem;
}

/* =============================================================
   VIDEO SECTION
   ============================================================= */
.video-section { background: var(--bg-2); }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: calc(var(--gap) * 1.5);
}
@media (max-width: 600px) {
  .video-grid { grid-template-columns: 1fr; }
}

.video-item {}

/* 16:9 responsive embed wrapper */
.video-embed-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: var(--bg-3);
  overflow: hidden;
}
.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-title {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: .85rem;
}
