/* ============================================
   Rafael Rosado — portfolio site
   Design system: minimal editorial, light throughout
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Work+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root{
  --ink:        #1c1e26;
  --paper:      #ffffff;
  --paper-dim:  #f7f7f8;
  --panel-line: #e8e8ec;

  --accent-gold:   #b98a3e;
  --accent-terra:  #a85644;
  --accent-slate:  #4a6f6d;

  --text-muted: #6c6d78;
  --white:      #ffffff;

  --radius-sm:  8px;
  --radius-md:  14px;

  --max-w:      1120px;
  --gutter:     clamp(1.5rem, 5vw, 3.5rem);
}

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

html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a{ color: inherit; }

.wrap{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Display type ---------- */
.display{
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--ink);
}

h1, h2, h3{
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.55em;
  letter-spacing: -0.01em;
}

p{ margin: 0 0 1.1em; max-width: 62ch; }
.wide p{ max-width: none; }

.text-muted{ color: var(--text-muted); }

/* ---------- Halftone texture (retired) ---------- */
.halftone{ display: none; }

/* ---------- Header / nav ---------- */
.site-header{
  background: var(--paper);
  border-bottom: 1px solid var(--panel-line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  gap: 1rem;
}

.brand{
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
  font-size: 1.3rem;
  text-decoration: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.brand span{ color: var(--accent-terra); }

.nav-toggle{
  display: none;
  background: none;
  border: 1px solid var(--panel-line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
}

.main-nav{
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.main-nav a{
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.93rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.main-nav a:hover{
  background: var(--paper-dim);
  color: var(--ink);
}

.main-nav a.active{
  color: var(--ink);
  font-weight: 600;
}

.main-nav a.cta{
  border: 1px solid var(--ink);
  color: var(--ink);
  font-weight: 600;
}
.main-nav a.cta:hover{
  background: var(--ink);
  color: var(--white);
}

@media (max-width: 760px){
  .nav-toggle{ display: inline-flex; align-items: center; gap: 0.4rem; }
  .main-nav{
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--panel-line);
    flex-direction: column;
    padding: 0.75rem var(--gutter) 1.25rem;
  }
  .main-nav.open{ display: flex; }
  .main-nav a{ width: 100%; }
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.btn:hover{
  opacity: 0.85;
  transform: translateY(-1px);
}
.btn:active{
  transform: translateY(0);
  opacity: 1;
}
.btn-yellow{ background: var(--accent-gold); border-color: var(--accent-gold); color: var(--white); }
.btn-red{ background: var(--accent-terra); border-color: var(--accent-terra); color: var(--white); }
.btn-teal{ background: var(--accent-slate); border-color: var(--accent-slate); color: var(--white); }
.btn-small{ padding: 0.55rem 1rem; font-size: 0.87rem; }

/* ---------- Hero ---------- */
.hero{
  position: relative;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  border-bottom: 1px solid var(--panel-line);
}
.hero .wrap{
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}
@media (max-width: 780px){
  .hero .wrap{ grid-template-columns: 1fr; }
  .hero .hero-photo{ order: -1; max-width: 260px; margin: 0 auto; }
}

.hero-eyebrow{
  display: inline-block;
  color: var(--accent-terra);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1{
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  color: var(--ink);
  line-height: 1.08;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.hero .lede{
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 46ch;
}

.hero-actions{
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.hero-photo{
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,20,30,0.04), 0 20px 48px -24px rgba(20,20,30,0.25);
  background: var(--paper-dim);
}
.hero-photo img{ width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; }

/* ---------- Sections ---------- */
section{ padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-alt{ background: var(--paper-dim); }
.section-navy{ background: var(--paper-dim); color: var(--ink); position: relative; overflow:hidden; border-top: 1px solid var(--panel-line); }
.section-navy h2, .section-navy h3{ color: var(--ink); }
.section-navy .text-muted{ color: var(--text-muted); }

.section-head{ margin-bottom: 2.25rem; max-width: 60ch; }
.section-head .kicker{
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section-navy .section-head .kicker{ color: var(--accent-terra); }
.section-head h2{ font-size: clamp(1.7rem, 3.4vw, 2.4rem); }

/* ---------- Panel card ---------- */
.panel{
  background: var(--white);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(20,20,30,0.03), 0 8px 24px -18px rgba(20,20,30,0.1);
}

/* ---------- Highlight grid (home) ---------- */
.highlight-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 820px){ .highlight-grid{ grid-template-columns: 1fr; } }

.highlight-card{
  background: var(--white);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(20,20,30,0.03), 0 8px 24px -18px rgba(20,20,30,0.1);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.highlight-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(20,20,30,0.05), 0 16px 32px -18px rgba(20,20,30,0.15);
}

.highlight-card .thumb{
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--paper-dim);
  display: flex;
}
.highlight-card .thumb img{ width: 100%; height: 100%; object-fit: cover; }
.highlight-card .thumb.split{ display: grid; grid-template-columns: 1fr 1fr 1fr; }
.highlight-card .thumb.split img{ height: 100%; }
.highlight-card .body{ padding: 1.4rem 1.5rem 1.6rem; }
.highlight-card h3{ font-size: 1.2rem; margin-bottom: 0.35rem; }
.highlight-card p{ color: var(--text-muted); font-size: 0.96rem; margin-bottom: 0; }
.highlight-card .tag{
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Book grid ---------- */
.book-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2.25rem;
}
.book-card{
  display: flex;
  flex-direction: column;
}
.book-cover{
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,20,30,0.04), 0 6px 16px -12px rgba(20,20,30,0.2);
  aspect-ratio: 2/3;
  background: var(--paper-dim);
  margin-bottom: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.book-card:hover .book-cover{
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(20,20,30,0.06), 0 12px 24px -14px rgba(20,20,30,0.25);
}
.book-cover img{ width: 100%; height: 100%; object-fit: cover; }
.book-card h3{ font-size: 1.03rem; margin-bottom: 0.25rem; font-weight: 600; }
.book-card .meta{ font-size: 0.84rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.book-card p{ font-size: 0.92rem; color: var(--text-muted); margin-bottom: 0.6rem; }

.book-section-title{
  font-size: 1.15rem;
  font-weight: 600;
  margin: 3.5rem 0 1.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--panel-line);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.book-section-title:first-of-type{ margin-top: 0; }

/* ---------- Video grid ---------- */
.video-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.25rem;
}
.video-card{
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,20,30,0.03), 0 8px 24px -18px rgba(20,20,30,0.1);
}
.video-card video{
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  background: #000;
}
.video-card .body{ padding: 1.1rem 1.3rem 1.4rem; }
.video-card h3{ font-size: 1.03rem; margin-bottom: 0.2rem; font-weight: 600; }
.video-card p{ font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0; }

/* ---------- Art gallery ---------- */
.art-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.75rem;
}
.art-item{
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,20,30,0.04), 0 6px 16px -12px rgba(20,20,30,0.16);
  background: var(--white);
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.art-item:hover{ transform: translateY(-2px); box-shadow: 0 4px 8px rgba(20,20,30,0.06), 0 12px 24px -14px rgba(20,20,30,0.22); }
.art-item img{ width: 100%; display: block; }

/* Lightbox */
.lightbox{
  position: fixed; inset: 0;
  background: rgba(15,16,22,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 100;
}
.lightbox.open{ display: flex; }
.lightbox img{
  max-width: min(90vw, 900px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.lightbox-close{
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-weight: 600;
  border-radius: 50%;
  width: 42px; height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
}
.lightbox-caption{
  position: absolute;
  bottom: 1.5rem;
  left: 0; right: 0;
  text-align: center;
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
  display: none;
}

/* ---------- Sequential page reader ---------- */
.reader{
  position: fixed; inset: 0;
  background: rgba(15,16,22,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}
.reader.open{ display: flex; }
.reader-frame{
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(94vw, 720px);
  width: 100%;
}
.reader-stage{
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.reader-stage img{
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--white);
}
.reader-nav{
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-weight: 600;
  border-radius: 50%;
  width: 44px; height: 44px;
  min-width: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.reader-nav:hover{ background: rgba(255,255,255,0.18); }
.reader-nav:disabled{
  opacity: 0.3;
  cursor: default;
}
.reader-meta{
  color: var(--white);
  text-align: center;
  margin-top: 1rem;
}
.reader-meta .reader-title{ font-weight: 600; margin-bottom: 0.15rem; }
.reader-meta .reader-page-count{ font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.reader-close{
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-weight: 600;
  border-radius: 50%;
  width: 42px; height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
}
.book-cover.has-preview{
  position: relative;
  cursor: zoom-in;
}
.book-cover.has-preview::after{
  content: "View sample page";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.5rem 0.6rem;
  background: rgba(20,20,30,0.75);
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.book-cover.has-preview:hover::after{
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Two-col content ---------- */
.two-col{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 780px){ .two-col{ grid-template-columns: 1fr; } }

/* ---------- Visit format cards ---------- */
.format-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.format-card{
  padding: 1.75rem;
}
.format-card h3{ font-size: 1.12rem; }
.format-card ul{ padding-left: 1.1rem; margin: 0.75rem 0 0; color: var(--text-muted); font-size: 0.94rem; }
.format-card li{ margin-bottom: 0.4rem; }

/* ---------- Contact block ---------- */
.contact-block{
  padding: 2.25rem;
}
.contact-row{
  display: flex;
  gap: 0.85rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--panel-line);
}
.contact-row:last-child{ border-bottom: none; }
.contact-row .label{ font-weight: 600; min-width: 110px; color: var(--text-muted); font-size: 0.92rem; }
.placeholder{
  background: var(--paper-dim);
  border: 1px dashed #c7c8d1;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer{
  background: var(--paper);
  color: var(--text-muted);
  border-top: 1px solid var(--panel-line);
  padding: 2.5rem 0;
  font-size: 0.9rem;
}
.site-footer .footer-top{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--panel-line);
}
.site-footer .wrap{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.site-footer a{ color: var(--ink); text-decoration: none; }
.site-footer a:hover{ text-decoration: underline; }

.social-row{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.social-link{
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--panel-line);
  color: var(--ink) !important;
  text-decoration: none !important;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.social-link:hover{
  border-color: var(--ink);
}
.social-link.placeholder-link{
  border-style: dashed;
  color: #a0a1ab !important;
}
.social-link.placeholder-link:hover{
  border-color: #a0a1ab;
  color: #a0a1ab !important;
}

/* ---------- Social icon buttons ---------- */
.social-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-line);
  color: var(--ink) !important;
  text-decoration: none !important;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}
.social-icon svg{
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}
.social-icon:hover{
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white) !important;
}
.social-icon.imdb-icon{
  width: auto;
  padding: 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-family: 'Work Sans', sans-serif;
}

/* ---------- Misc ---------- */
.divider-strip{
  height: 1px;
  background: var(--panel-line);
}

.badge-list{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}
.badge{
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--panel-line);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  background: transparent;
  color: var(--text-muted);
}
.section-navy .badge{ background: transparent; color: var(--text-muted); border-color: var(--panel-line); }

.pdf-note{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  margin-top: 0.4rem;
}
