/* =============================================
   HOLASARI — CSS
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600&family=Caveat:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ultra&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Slabo+13px&family=Ultra&display=swap');

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

:root {
  --bg:    #125440;
  --accent: #98e79b;
  --radius-circle: 50%;
  --font-body: 'Slabo 13px', sans-serif;
  --font-title: 'Ultra', cursive;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: #111;
  color: #1e1e1e;
  overflow-x: hidden;
}

/* =============================================
   HINT TOAST
   ============================================= */
#hint-toast {
  width: 20rem;
  height: 15rem;
  position: absolute;
  top: 18px;
  right: 18px;
  /*background: rgba(255,255,255,0.92);*/
  background-image: url('../images/hoja-cinta.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  color: #333;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0 3rem;
  border-radius: 8px;
  z-index: 1000;
  pointer-events: none;
  /*box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  backdrop-filter: blur(4px);*/
  display: flex;
  align-items: center;
}

/* =============================================
   SECTION 1 — HERO (fixed bg + color circles)
   ============================================= */
#section-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

#hero-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(30%);
}

/* Color circles — section 1 (solid accent color, float over photo) */
.circle-color {
  position: absolute;
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
}

/* =============================================
   SECTION 2 — COLOR BLOCK + HOLE CIRCLES
   ============================================= */
#section-holes {
  position: relative;
  z-index: 2;
  background-color: var(--bg);   /* overwritten by JS */
  min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

/* Safe text zone — circles won't overlap this */
#holes-text,
#holes-text2 {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 3rem 2.5rem;
  max-width: 520px;
  height: fit-content;
}

#holes-text2 {
  padding-top: 0;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  line-height: 1.6;
}

/* "Hola, soy Sara" — bold, accent color, matches PDF */
#holes-text h1 {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--accent);   /* set by JS */
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

/* Subtitle — lighter weight, same accent color */
#holes-text p {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  line-height: 1.6;
  color: var(--accent);   /* set by JS */
  opacity: 0.9;
  font-weight: 300;
}

/* Hole circles — cut-outs that reveal the fixed bg below */
.circle-hole {
  position: absolute;
  border-radius: 50%;
  background: transparent;
  /* The trick: mix-blend-mode destination-out won't work across stacking contexts,
     so we use box-shadow to "punch" the color away. 
     Instead we use a pseudo-element with the actual bg image repeated */
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.circle-hole::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  /* bg-image set by JS to match hero-bg */
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}

/* =============================================
   SECTION 3 — GRID PAPER + WIND TEXT
   ============================================= */
#section-grid {
  position: relative;
  z-index: 2;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;

  background-color: #f8f7f2;
}

#section-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("../images/papel-cuadro.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.75;
  z-index: 1;
  pointer-events: none;
}

#grid-content {
  position: relative;
  z-index: 2;
  /*max-width: 560px;*/
  text-align: center;
  height: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.grid-text-1{
  align-self: baseline;
}

.grid-text-2{
    width: 60%;
    align-self: center;
}

/* Wind text effect — each word is a span */
.wind-word {
  display: inline-block;
  transition: opacity 0.24s ease;
  will-change: transform, opacity;
  cursor: default;
}

#grid-content p {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  line-height: 1.8;
  color: #000;
  margin-bottom: 1.4rem;
}

/*
#grid-content .grid-quote {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #5a7a5a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2rem;
}*/

#grid-content .grid-quote {
  align-self: flex-end;
}

#grid-content a.process-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.2s;
  font-weight: 700;
}
#grid-content a.process-link:hover { opacity: 0.6; }

/* =============================================
   SECTION 4 — PROJECTS
   ============================================= */
#section-projects {
  position: relative;
  z-index: 2;
  padding: 8rem 2rem 15rem;
}

.projects-inner {
  width: 80%;
  margin: 0 auto;
  padding: 3rem 2rem;
/* Crumpled paper texture via CSS — layered noise */
  background-color: #d6cfc4;
  background-image: url("../images/papel-arrugado.jpg");
  background-repeat: repeat-y;
  background-position: center;
  
}
#section-projects .projects-inner {
  position: relative;
}

#section-projects .projects-inner::before {
  content: '';
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  background-image: url("../images/pin.png");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
#section-projects .projects-inner h2 {
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  text-align: center;
  color: #1e1e1e;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 3.5rem;
}

/* Zigzag list — each project is a box aligned left or right */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  max-width: 960px;
  margin: 0 auto;
}

.project-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  cursor: pointer;
  width: min(500px, 100%);
  transition: opacity 0.2s, transform 0.2s;
}

.project-row:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

.project-row.align-left {
  align-self: flex-start;
}

.project-row.align-right {
  align-self: flex-end;
}

.project-img {
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
  border: 5px #125440 dashed;
}

.project-row:hover .project-img img {
  transform: scale(1.03);
}

.project-info {
  width: 100%;
  padding: 1.4rem 1.6rem;
  /*background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);*/
}

.project-info h3 {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  color: #1e1e1e;
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

.project-info p {
  font-size: 0.88rem;
  color: #2f2f2f;
  line-height: 1.6;
  max-width: 100%;
}

/* =============================================
   SECTION 5 — FOOTER / CONTACT
   ============================================= */
#section-contact {
  position: relative;
  z-index: 2;
  min-height: 120vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 5rem 0 5rem;
  /* Fabric background */
  background-image: url("../images/tela.jpg");
  background-size: contain;
  background-position: center;
  background-repeat: repeat;
  overflow: visible;

  /* Lace-like top border (kept for decoration) */
  border-top: 2px dashed rgba(100,80,50,0.2);
}

#section-contact::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  right: 0;
  height: 40%;
  width: 120%;
  background-image: url("../images/encaje.png");
  background-repeat: no-repeat;
  background-position: center;
  /* preserve aspect ratio: auto width, fixed height */
  background-size: cover;
  z-index: 6;
  pointer-events: none;
}

#section-contact::after {
  /* tint layer using the accent color to recolor the fabric */
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--accent);
  opacity: 0.8;
  mix-blend-mode: multiply;
  z-index: 1;
  pointer-events: none;
}

#contact-inner {
    position: relative;
    z-index: 666;
    padding: 3rem;
    max-width: 40rem;
    min-height: 80vh;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
    background-image: url(../images/plato.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#table-scene {
  position: absolute;
  inset: 0;
  z-index: 222;
  pointer-events: none;
}

.sticker-group {
  position: absolute;
  display: block;
  width: 200px;
  height: auto;
}

.sticker-group .sticker {
  position: absolute;
  /*display: block;
  width: 100%;
  height: auto;*/
}

.group-pan {
  position: absolute;
  top: 18%;
  right: 10%;
  width: 220px;
}

.piso {
  width: 18rem;
  height: 18rem;
  background-image: url("../images/piso.png");
  background-size: cover;
  background-position: center;
  display: flex;
}
.p-cafe {
  justify-content: flex-end;
}

.p-pan {
  justify-content: center;
}

.group-pan .pan {
  /*position: absolute;
  width: 80%;
  left: 75%;
  top: 12%;
  transform: translateX(-50%);*/
  background-image: url("../images/pan.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 80%;
  height: 100%;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
}

.group-pan:hover .pan {
  transform: translateY(-24px);
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.18));
}

.group-cafe {
  position: absolute;
  bottom: 40%;
  right: 40%;
  width: 210px;
}
/*
.group-cafe .piso {
  width: 18rem;
}*/

.group-cafe .cafe {
  /*position: absolute;
  width: 100%;
  left: 75%;
  top: 8%;
  transform: translateX(-50%);*/
  background-image: url("../images/cafe.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 80%;
  height: 100%;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
}

.group-cafe:hover .cafe {
  transform: translateY(-24px);
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.18));
}

.cuchara {
  position: absolute;
  top: 15%;
  right: 28%;
  width: 18rem;
  transform: rotate(15deg);
  z-index: 3;
}

#contact-inner h2 {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: #212121;
  margin-bottom: 0.5rem;
}

#contact-inner p.contact-sub {
  font-size: 1rem;
  color: #000;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
}

.contact-links a {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: #1e1e1e;
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 0.2s;
}
.contact-links a:hover { opacity: 0.5; }

/* Contact table image area */
/* Remove old duplicate table-scene rules and use the more specific sticker-group layout for contact */

/* =============================================
   BLOG PAGE  (project-entry.html)
   ============================================= */
body.entry-page {
  background: #f5f2ec;
  font-family: var(--font-body);
}

.entry-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  gap: 3rem;
}

.entry-sidebar {
  padding-top: 3rem;
}

.entry-sidebar a.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: #2a4a2a;
  text-decoration: none;
  margin-bottom: 2.5rem;
}

.sidebar-more-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 1rem;
}

.sidebar-project-card {
  background: rgba(255,255,255,0.7);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.2rem;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.08);
  transition: transform 0.2s;
}
.sidebar-project-card:hover { transform: translateX(3px); }

.sidebar-project-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
}

.sidebar-project-card-body {
  padding: 0.6rem 0.8rem;
}
.sidebar-project-card-body h4 {
  font-family: var(--font-title);
  font-size: 1rem;
  color: #1e1e1e;
  margin-bottom: 0.2rem;
}
.sidebar-project-card-body p {
  font-size: 0.75rem;
  color: #666;
}

/* Entry main content */
.entry-main {
  padding: 2rem 0;
  /* Grid paper background */
  background-color: #f8f7f2;
  background-image:
    linear-gradient(rgba(100,140,100,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,140,100,0.15) 1px, transparent 1px);
  background-size: 28px 28px;
  padding: 2.5rem 3rem;
  border-radius: 4px;
  border: 1px solid rgba(100,140,100,0.2);
}

.entry-header {
  margin-bottom: 2rem;
}

.entry-header h1 {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #1e1e1e;
  margin-bottom: 0.6rem;
}

.entry-demo-link {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--bg);
  text-decoration: none;
  border: 1.5px solid var(--bg);
  padding: 4px 14px;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 1.5rem;
}
.entry-demo-link:hover {
  background: var(--bg);
  color: #fff;
}

.entry-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: #2a2a2a;
  margin-bottom: 1.4rem;
}

.entry-body img {
  width: 100%;
  border-radius: 4px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  /* Projects: stack vertically on mobile */
  .project-row {
    flex-direction: column;
    min-height: auto;
  }
  .project-img,
  .project-info {
    flex: none;
    width: 100%;
    order: unset !important;
  }
  .project-img { height: 200px; }
  .project-info { padding: 1.2rem 1.5rem 1.8rem; }
  .project-info p { max-width: 100%; }

  /* Entry page */
  .entry-layout {
    grid-template-columns: 1fr;
  }
  .entry-sidebar {
    order: 2;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 2rem;
  }
  .entry-main { order: 1; padding: 1.5rem; }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  .wind-word,
  .project-card,
  .sidebar-project-card { transition: none; }
}

:focus-visible {
  outline: 2px solid var(--bg);
  outline-offset: 3px;
}