/* =========================
   RESET BÀSIC
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* =========================
   VARIABLES
========================= */
:root {
  --bg: #f2f2f2;
  --text: #1f1f1f;
  --muted: #8a8a8a;
  --line: #d9d9d9;

  --max-width: 1800px;
  --page-pad-desktop: 58px;
  --page-pad-mobile: 14px;

  --title-size-desktop: 58px;
  --title-size-mobile: 24px;

  --nav-size: 17px;
  --gap-desktop: 64px;
  --gap-mobile: 6px;
}

/* =========================
   BASE
========================= */
body {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* =========================
   HEADER (DESKTOP)
========================= */
.site-header {
  width: 100%;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px var(--page-pad-desktop) 24px;
  position: relative;
  text-align: center;
}

.site-title {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: clamp(34px, 4vw, var(--title-size-desktop));
  line-height: 1.05;
  letter-spacing: 0.2px;
  margin-bottom: 34px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 54px;
}

.site-nav a {
  font-family:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important; 
  font-size: clamp(14px, 1.2vw, var(--nav-size));
  color: var(--muted);
  transition: color 0.2s ease;
  letter-spacing: 0.6px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  outline: none;
}

.site-nav a.active {
  color: var(--text);
}

/* Botó hamburguesa ocult a desktop */
.menu-toggle {
  display: none;
}

/* =========================
   MAIN / GALERIA
========================= */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px var(--page-pad-desktop) 58px;
}

/* =========================
   GALERIA MASONRY (desktop 2 col / mòbil 1 col)
========================= */
.gallery {
  column-count: 2;       /* 2 imatges de costat a desktop */
  column-gap: 10vh;      /* separació entre columnes */
}

.gallery-item {
  display: inline-block; /* important per columns */
  width: 100%;
  margin: 0 0 12px;      /* separació vertical entre imatges */
  break-inside: avoid;   /* evita que una imatge es talli */
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  background: transparent;
  overflow: hidden;
   opacity: 0;
  transform: translateY(100px);
  transition: opacity 1.0s ease, transform 1.0s ease;
  will-change: transform, opacity;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
  margin-bottom: 10vh; /* dalt-baix */
}

.gallery-item:hover img {
  transform: scale(1.01);
}

/* Quan ja són visibles */
.gallery-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   MÒBIL / TABLET PETIT
   (com la 2a imatge)
========================= */
@media (max-width: 900px) {
  .header-inner {
    padding: 12px var(--page-pad-mobile) 10px;
    text-align: center;
    border: 1px solid var(--line); /* marc fi com a la captura */
    margin: 0;
    max-width: 100%;
    background: rgba(255,255,255,0.08);
  }

  .site-title {
    font-size: var(--title-size-mobile);
    margin: 10px 0 8px;
  }

  /* Hamburguesa visible a mòbil */
  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 9px;
    width: 34px;
    height: 34px;
    position: absolute;
    top: 20px;
    left: 18px;
    z-index: 20;
  }

  .menu-toggle span {
    display: block;
    width: 32px;
    height: 2px;
    background: #7c7c7c;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  /* Estat obert (animació simple) */
  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }
  .menu-toggle.is-open span:nth-child(2) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Menú ocult per defecte a mòbil */
  .site-nav {
    display: none;
    width: 100%;
    text-align: left;
    margin-top: 8px;
    padding: 8px 4px 2px;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .site-nav a {
    font-size: 15px;
    color: var(--text);
	font-family:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  }

  .main-content {
    max-width: 100%;
    margin: 0;
    padding: 0 var(--page-pad-mobile) 14px;
  }

  .gallery {
	  column-count: 1;
	  column-gap: 0;
	}

	.gallery-item img{
	  margin-bottom: 0.5vh; /* o 2px si ho vols molt enganxat */
	}
}
	

/* =========================
   ABOUT PAGE (hero + 3 columnes)
========================= */

.about-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0;
}

.about-hero__image {
  position: relative;
  width: 100%;
  height: clamp(440px, 48vw, 640px); /* Alçada imatge */
  overflow: hidden;
  background: #ddd;
}



.about-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

.about-hero__content {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: #fff;
  padding: 16px;
}

.about-hero__eyebrow {
  margin: 0 0 4px;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  opacity: 0.9;
  letter-spacing: 0.2px;
}

.about-hero__content h1 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.08;
}

.about-hero__subtitle {
  margin: 8px 0 14px;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  opacity: 0.95;
}

.about-hero__button {
  display: inline-block;
  background: #fff;
  color: #111;
  padding: 9px 16px;
  border-radius: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  margin: 0 auto;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.about-hero__button:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.about-hero__dots {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.about-hero__dots span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  display: inline-block;
}

/* Secció inferior */
.about-grid-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 24px 70px; /* menys espai sota el hero */
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 42px;
  align-items: start;
}

.about-card__label {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

.about-card h2 {
  margin: 0 0 16px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.2;
}

.about-card p {
  margin: 0 0 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #2b2b2b;
}

.about-divider {
  border: 0;
  border-top: 1px solid #d9d9d9;
  margin: 28px 0 22px;
}

.about-extra h3 {
  margin: 0 0 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}

.about-extra p {
  margin: 0;
  max-width: 820px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: #2b2b2b;
}

/* =========================
   RESPONSIVE ABOUT
========================= */
@media (max-width: 900px) {
  /* A mòbil mantenim el teu look amb nom visible */
  .page-about .site-title {
    display: inline-block;
    font-size: 24px;
    margin: 8px 0 6px;
  }

  .page-about .header-inner {
    padding: 10px var(--page-pad-mobile) 8px;
  }

  .about-hero {
    padding: 0 var(--page-pad-mobile);
  }

  .about-hero__image{
	  position: relative;
	  overflow: hidden;      /* IMPORTANT: retalla el text dins la imatge */
	  height: auto;          /* ho deixes com ho tens */
	}
	
	.about-hero__overlay{
	  display: block;        /* o deixa-ho com estigui ara si ja ho uses */
	}

  .about-hero__image img{
  width: 100%;
  height: auto;     /* clau: que la imatge defineixi l'alçada real */
  display: block;
}

  .about-hero__content h1 {
    font-size: 22px;
  }

  .about-hero__subtitle {
    margin: 8px 0 12px;
    font-size: 11px;
  }

  .about-hero__button {
    padding: 9px 14px;
    font-size: 11px;
  }

  .about-hero__dots {
    margin-top: 10px;
  }

  .about-grid-wrap {
    padding: 16px var(--page-pad-mobile) 42px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-divider {
    margin: 20px 0 18px;
  }
  
  .about-hero__content{
	  position: absolute;
	  left: 0;
	  right: 0;
	  bottom: 12px;
	  top:auto;
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	  text-align: center;
	  padding: 0 14px;
	  z-index: 2;
	}

	/* 4) Ajustos perquè els colors es llegeixin sobre foto */
	.about-hero__content h1,
	.about-hero__subtitle{
	  color: #fff;
	}

	.about-hero__subtitle{
	  margin: 8px 0 12px;    /* pots mantenir el teu */
	}
}

/* ===== FORÇAR HEADER CONSISTENT (INDEX / ABOUT / ARCHIVE / CONTACT) ===== */
.site-header {
  width: 100%;
}

.header-inner {
  max-width: var(--max-width) !important;
  margin: 0 auto !important;
  padding: 48px var(--page-pad-desktop) 24px !important;
  position: relative !important;
  text-align: center !important;
}

.site-title {
  display: inline-block !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 700 !important;
  font-size: clamp(34px, 4vw, var(--title-size-desktop)) !important;
  line-height: 1.05 !important;
  letter-spacing: 0.2px !important;
  margin-bottom: 34px !important;
}

.site-nav ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 54px !important;
}

.site-nav a {
  font-family:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  font-size: clamp(14px, 1.2vw, var(--nav-size));
  color: var(--muted);
  transition: color 0.2s ease;
  letter-spacing: 0.6px;
}

.site-nav a.active {
  color: var(--text) !important;
}

@media (max-width: 900px) {
  .header-inner {
    padding: 12px var(--page-pad-mobile) 10px !important;
    text-align: center !important;
    border: 1px solid var(--line) !important;
    margin: 0 !important;
    max-width: 100% !important;
    background: rgba(255,255,255,0.08) !important;
  }

  .site-title {
    font-size: var(--title-size-mobile) !important;
    margin: 10px 0 8px !important;
  }

  .site-nav a {
    font-size: 15px !important;
    color: var(--text) !important;
    font-family:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  }
}

/* =========================
   REVEAL ANIMATION (ABOUT)
========================= */
.reveal-up {
  opacity: 0;
  transform: translateY(45px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   CONTACT PAGE
========================= */

.page-contact .site-title {
  display: inline-block;
}

/* Accessibilitat (labels ocults visualment) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Hero superior tipus screenshot */
.contact-hero {
  width: 100%;
  margin: 0;
}

.contact-hero__image {
  position: relative;
  width: 100%;
  height: clamp(220px, 30vw, 360px);
  overflow: hidden;

  /*  posa aquí la teva imatge similar */
  background-image: url("../img/works/oli_porta.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Si uses <img> dins HTML en lloc de background-image */
.contact-hero__image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Capa fosca suau */
.contact-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
}

/* Degradat lateral subtil (opcional, molt elegant) */
.contact-hero__image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.22) 0%,
    rgba(0, 0, 0, 0.08) 18%,
    rgba(0, 0, 0, 0) 35%,
    rgba(0, 0, 0, 0) 65%,
    rgba(0, 0, 0, 0.08) 82%,
    rgba(0, 0, 0, 0.22) 100%
  );
  pointer-events: none;
}

.contact-hero__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  text-align: center;
  color: #fff;
  padding: 16px;
}

.contact-hero__content h1 {
  margin: 0 0 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 600;
  line-height: 1.1;
}

.contact-hero__content p {
  margin: 0 0 16px;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  line-height: 1.4;
  opacity: 0.95;
}

.contact-hero__newsletter {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.contact-hero__newsletter input {
  width: min(380px, 72vw);
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  outline: none;
}

.contact-hero__newsletter input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.contact-hero__newsletter button {
  height: 40px;
  min-width: 108px;
  padding: 0 18px;
  background: #fff;
  color: #111;
  border: 1px solid #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.contact-hero__newsletter button:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* Secció formulari */
.contact-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px var(--page-pad-desktop) 60px;
}

.contact-wrap {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.contact-wrap h2 {
  margin: 0 0 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  line-height: 1.1;
}

.contact-section__intro {
  margin: 0 0 28px;
  color: #5f5f5f;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

.contact-form {
  text-align: left;
}

.contact-form__field {
  margin: 0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  background: transparent;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  padding: 14px 12px;
  outline: none;
  border-radius: 0;
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form__field + .contact-form__field input,
.contact-form__field + .contact-form__field textarea {
  border-top: 0; /* look continu com a la captura */
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #9d9d9d;
}

.contact-form__submit {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  height: 42px;
  padding: 0 16px;
  background: #1f1f1f;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  border: 1px solid #1f1f1f;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.contact-form__submit:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.contact-footer-info {
  margin: 46px 0 0;
  color: #666;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  .contact-hero__image {
    height: clamp(180px, 44vw, 240px);
  }

  .contact-hero__content h1 {
    font-size: 28px;
  }

  .contact-hero__content p {
    font-size: 10px;
    margin-bottom: 12px;
  }

  .contact-hero__newsletter {
    gap: 8px;
  }

  .contact-hero__newsletter input {
    width: min(320px, 86vw);
    height: 38px;
    font-size: 11px;
  }

  .contact-hero__newsletter button {
    height: 38px;
    min-width: 96px;
    font-size: 11px;
  }

  .contact-section {
    padding: 26px var(--page-pad-mobile) 36px;
  }

  .contact-wrap h2 {
    font-size: 24px;
  }

  .contact-section__intro {
    font-size: 12px;
    margin-bottom: 20px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 12px;
    padding: 12px 10px;
  }

  .contact-footer-info {
    margin-top: 34px;
    font-size: 11px;
  }
}
  
  /* Reveal només per contact (sense tocar about ni galeria) */
.contact-reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.contact-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
