/*
 * Theme Name:  Sotomayor Photo
 * Description: Custom child theme for sotomayorphoto.com
 * Author:      Built by Danny | builtbydanny.com
 * Template:    generatepress
 * Version:     1.0.0
 */

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --page-bg:       #ddd6c8;
  --paper:         #f4efe6;
  --paper-bright:  #faf7f2;
  --paper-mid:     #e8e0d0;
  --paper-deep:    #d8cdb8;

  --ink:           #1c1814;
  --ink-mid:       #3d3328;
  --ink-soft:      #7a6e60;
  --ink-ghost:     rgba(28, 24, 20, 0.12);

  --accent:        #c17f3a;
  --mark-red:      #b5311f;
  --mark-green:    #2a6b35;
  --mark-blue:     #1c3f72;

  --font-sans:     'DM Sans', system-ui, sans-serif;
  --font-display:  'Syne', sans-serif;
  --font-mono:     'DM Mono', monospace;
  --font-hand:     'Caveat', cursive;

  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.77, 0, 0.175, 1);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* Kill all GP wrappers */
.site-header,
.main-navigation,
.nav-above-header,
.nav-below-header,
.site-logo-container,
#site-footer,
.site-footer,
.generate-back-to-top { display: none !important; }

/* Kill GP's ghost hamburger */
.menu-toggle,
button.menu-toggle,
.main-navigation .menu-toggle { display: none !important; }

/* ============================================================
   GRAIN
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ============================================================
   NAV TRIGGER -- div so GP menu JS cannot intercept
   ============================================================ */
.sp-nav-trigger {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.sp-nav-trigger span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.4s var(--ease-out), opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}
.sp-nav-trigger span:nth-child(1) { width: 24px; }
.sp-nav-trigger span:nth-child(2) { width: 16px; }
.sp-nav-trigger span:nth-child(3) { width: 24px; }

.sp-nav-open .sp-nav-trigger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); width: 24px; }
.sp-nav-open .sp-nav-trigger span:nth-child(2) { opacity: 0; width: 0; }
.sp-nav-open .sp-nav-trigger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   NAV OVERLAY
   ============================================================ */
.sp-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: var(--ink);
  display: flex;
  align-items: center;
  padding: 0 10vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out);
}

.sp-nav-open .sp-nav-overlay { opacity: 1; pointer-events: all; }

.sp-nav-overlay nav ul { list-style: none; }
.sp-nav-overlay nav ul li { overflow: hidden; }

.sp-nav-overlay nav ul li a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  color: var(--paper);
  line-height: 1;
  padding: 0.1em 0;
  letter-spacing: -0.03em;
  transform: translateY(110%);
  transition: transform 0.55s var(--ease-out), color 0.2s ease;
}

.sp-nav-open .sp-nav-overlay nav ul li a { transform: translateY(0); }
.sp-nav-open .sp-nav-overlay nav ul li:nth-child(1) a { transition-delay: 0.03s; }
.sp-nav-open .sp-nav-overlay nav ul li:nth-child(2) a { transition-delay: 0.07s; }
.sp-nav-open .sp-nav-overlay nav ul li:nth-child(3) a { transition-delay: 0.11s; }
.sp-nav-open .sp-nav-overlay nav ul li:nth-child(4) a { transition-delay: 0.15s; }
.sp-nav-open .sp-nav-overlay nav ul li a:hover { color: var(--accent); }

.sp-nav-foot {
  position: absolute;
  bottom: 36px;
  left: 10vw;
  right: 10vw;
  display: flex;
  justify-content: space-between;
}

.sp-nav-foot span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(244, 239, 230, 0.3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============================================================
   HERO PAGE -- desk surface
   ============================================================ */
.sp-hero-page {
  width: 100%;
  height: 100vh;
  background: var(--page-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

/* ============================================================
   THE SHEET -- physical document object
   ============================================================ */
.sp-sheet {
  background: var(--paper-bright);
  border: 1px solid rgba(28, 24, 20, 0.18);
  box-shadow:
    0 2px 4px rgba(28, 24, 20, 0.07),
    0 8px 24px rgba(28, 24, 20, 0.11),
    0 24px 64px rgba(28, 24, 20, 0.09);
  width: 100%;
  max-width: 1400px;
  height: calc(100vh - 48px);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* ---- Sheet header: name, url, hamburger all on one line ---- */
.sp-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(28, 24, 20, 0.12);
  flex-shrink: 0;
}

.sp-sheet-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}

.sp-sheet-url {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--ink-soft);
  letter-spacing: 0.12em;
}

/* Trigger inside sheet header -- not fixed */
.sp-sheet-header .sp-nav-trigger {
  position: relative;
  top: auto;
  right: auto;
}

/* ---- 6x4 fixed grid ---- */
.sp-cs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(28, 24, 20, 0.14);
  border-left: 1px solid rgba(28, 24, 20, 0.14);
  flex: 1;
  min-height: 0;
}

/* ---- Individual frame ---- */
.sp-cs-cell {
  position: relative;
  border-right: 1px solid rgba(28, 24, 20, 0.14);
  border-bottom: 1px solid rgba(28, 24, 20, 0.14);
  background: var(--paper-mid);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sp-cs-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--paper-mid);
  flex: 1;
  min-height: 0;
}

.sp-cs-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: saturate(0.65) contrast(1.07);
  transition: filter 0.3s ease;
}

.sp-cs-cell:hover .sp-cs-img-wrap img {
  filter: saturate(0.85) contrast(1.04) brightness(1.04);
}

.sp-cs-img-wrap.empty {
  background: var(--paper-mid);
  cursor: default;
}

/* Felt tip markup SVG */
.sp-markup {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}

/* ---- Frame number strip ---- */
.sp-cs-label {
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 4px;
  background: var(--paper-bright);
  border-top: 1px solid rgba(28, 24, 20, 0.08);
}

.sp-cs-num {
  font-family: var(--font-mono);
  font-size: 0.38rem;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  line-height: 1;
  pointer-events: none;
}

/* ============================================================
   LIGHTBOX -- standard, full image, no cropping
   ============================================================ */
.sp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(20, 16, 12, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.sp-lightbox.open { opacity: 1; pointer-events: all; }

.sp-lightbox img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  transform: scale(0.94);
  transition: transform 0.45s var(--ease-out);
  box-shadow: 0 8px 48px rgba(20, 16, 12, 0.5);
}

.sp-lightbox.open img { transform: scale(1); }

.sp-lb-close {
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.4);
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 10;
  user-select: none;
}

.sp-lb-close:hover { color: var(--paper-bright); }

/* ============================================================
   INNER PAGE SHEET VARIANTS
   ============================================================ */
.sp-hero-page--auto {
  height: auto;
  min-height: 100vh;
  align-items: flex-start;
  padding: 32px 24px 40px;
}

.sp-sheet--page {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.sp-sheet-content {
  padding: 32px 24px 40px;
}

/* ============================================================
   ABOUT -- two column split inside the sheet
   ============================================================ */
.sp-sheet-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid rgba(28, 24, 20, 0.1);
}

.sp-sheet-about-img {
  position: relative;
  overflow: hidden;
  background: var(--paper-mid);
  border-right: 1px solid rgba(28, 24, 20, 0.1);
  max-height: 600px;
  align-self: start;
}

.sp-sheet-about-img img {
  width: 100%;
  height: 100%;
  max-height: 600px;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.78) contrast(1.05);
  display: block;
}

.sp-sheet-about-text {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ============================================================
   CONTACT inside the sheet
   ============================================================ */
.sp-sheet-contact {
  max-width: 560px;
  border-top: 1px solid rgba(28, 24, 20, 0.1);
  padding-top: 32px;
}

.sp-sheet-contact-intro {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ============================================================
   BLOG LIST inside the sheet
   ============================================================ */
.sp-sheet-blog {
  border-top: 1px solid rgba(28, 24, 20, 0.1);
}

.sp-sheet-blog-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid rgba(28, 24, 20, 0.08);
  text-decoration: none;
  transition: background 0.2s ease;
}

.sp-sheet-blog-item:hover { background: rgba(28, 24, 20, 0.02); }

.sp-sheet-blog-thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--paper-mid);
  flex-shrink: 0;
}

.sp-sheet-blog-thumb-empty {
  width: 100%;
  height: 100%;
  background: var(--paper-mid);
}

.sp-sheet-blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72);
  transition: filter 0.4s ease, transform 0.5s var(--ease-out);
  display: block;
}

.sp-sheet-blog-item:hover .sp-sheet-blog-thumb img {
  filter: saturate(1);
  transform: scale(1.04);
}

.sp-sheet-blog-date {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--ink-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sp-sheet-blog-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.sp-sheet-blog-item:hover .sp-sheet-blog-title { color: var(--accent); }

.sp-sheet-blog-excerpt {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.sp-sheet-empty {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  padding: 32px 0;
  letter-spacing: 0.1em;
}

.sp-sheet-pagination {
  padding: 24px 0 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.sp-sheet-pagination .nav-links a,
.sp-sheet-pagination .nav-links span {
  color: var(--ink-soft);
  margin-right: 12px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.sp-sheet-pagination .nav-links a:hover,
.sp-sheet-pagination .nav-links .current {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.sp-sheet-text {
  border-top: 1px solid rgba(28, 24, 20, 0.1);
  padding-top: 32px;
}

/* ============================================================
   SHARED PAGE BODY STYLES
   ============================================================ */
.sp-page-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.sp-page-divider {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 32px;
}

.sp-page-body { max-width: 680px; }

.sp-page-body p {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-mid);
  margin-bottom: 1.4em;
}

.sp-page-body p:first-child {
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.65;
}

.sp-page-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 2em 0 0.5em;
}

.sp-page-body a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  transition: opacity 0.2s ease;
}

.sp-page-body a:hover { opacity: 0.7; }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.sp-form { max-width: 560px; }
.sp-field { margin-bottom: 28px; }

.sp-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.sp-field input,
.sp-field textarea,
.sp-field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink-ghost);
  border-radius: 0;
  padding: 10px 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.3s ease;
  appearance: none;
}

.sp-field input:focus,
.sp-field textarea:focus { border-bottom-color: var(--accent); }
.sp-field textarea { resize: vertical; min-height: 120px; }

.sp-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-bright);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 13px 36px;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.3s ease, color 0.3s ease;
}

.sp-btn:hover { background: transparent; color: var(--ink); }

/* Mobile trigger -- hidden on desktop */
.sp-nav-trigger--mobile { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {

  .sp-nav-trigger--mobile {
    display: flex;
    position: fixed;
    top: 20px;
    right: 16px;
    z-index: 900;
  }

  .sp-sheet-header .sp-nav-trigger { display: none; }

  .sp-hero-page {
    height: auto;
    min-height: 100vh;
    padding: 52px 12px 12px;
    align-items: flex-start;
  }

  .sp-hero-page--auto { padding: 52px 12px 24px; }

  .sp-sheet {
    height: auto;
    min-height: 0;
    width: 100%;
    padding: 12px;
  }

  .sp-cs-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: none;
    height: auto;
  }

  .sp-cs-img-wrap { height: 28vw !important; }

  .sp-sheet-about { grid-template-columns: 1fr; }
  .sp-sheet-about-img {
    max-height: 50vw;
    border-right: none;
    border-bottom: 1px solid rgba(28,24,20,0.1);
  }
  .sp-sheet-about-text { padding: 32px 20px; }
  .sp-sheet-blog-item { grid-template-columns: 120px 1fr; gap: 16px; }
  .sp-sheet-content { padding: 20px 16px 32px; }
  .sp-sheet-contact { padding-top: 24px; }
}