/* Foffo Goddy — folk design inspired by the Lighthouse album art */

:root {
  --paper: #f6f0e1;
  --paper-deep: #ede4cd;
  --ink: #2a2622;
  --ink-soft: #5d564c;
  --teal: #1d5246;
  --teal-deep: #143b33;
  --teal-night: #0f2d27;
  --gold: #c2a059;
  --gold-soft: #d8bc82;
  --red: #a8402f;
  --green-brand: #00680c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; }

a { color: var(--teal); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover, a:focus { color: var(--red); }

h1, h2, h3, .page-title, .section-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--teal-deep);
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }

/* ---------------------------------------------------------- header */

.site-header {
  padding: 2.2rem 1rem 0;
  text-align: center;
}

.brand { display: inline-block; }
.brand img { width: 240px; height: auto; }

.tagline {
  margin: 0.2rem 0 1.4rem;
  font-style: italic;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* navigation using the hand-drawn typography (original sprite) */
.nav-main ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.nav-main a {
  position: relative;
  display: block;
  height: 70px;
  /* longhands only: the `background` shorthand would reset background-position
     and out-specify the per-item .m-* position rules below */
  background-image: url("/assets/img/menu-fg.svg");
  background-repeat: no-repeat;
  background-size: 310.8px 140px;
  text-indent: -9999px;
  overflow: hidden;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.6));
  transition: transform 0.25s ease;
}
.nav-main a:hover { transform: rotate(-2deg) scale(1.05); }

.m-bio      { width: 63px;   background-position: 0 0; }
.m-galeria  { width: 89.6px; background-position: -61.6px 0; }
.m-blog     { width: 72.8px; background-position: -151.2px 0; }
.m-contacto { width: 86.8px; background-position: -224px 0; }

.m-bio:hover,      .m-bio.current      { background-position: 0 -70px; }
.m-galeria:hover,  .m-galeria.current  { background-position: -61.6px -70px; }
.m-blog:hover,     .m-blog.current     { background-position: -151.2px -70px; }
.m-contacto:hover, .m-contacto.current { background-position: -224px -70px; }

.social { display: flex; justify-content: center; gap: 1.1rem; }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  color: var(--ink-soft);
  transition: color 0.2s, transform 0.2s;
}
.social a:hover { color: var(--red); transform: translateY(-2px); }

.social-header { margin: 1.4rem 0 2rem; }

/* decorative thread under the header */
.site-header::after {
  content: "";
  display: block;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14' viewBox='0 0 120 14'%3E%3Cpath d='M0 7q15-10 30 0t30 0 30 0 30 0' fill='none' stroke='%23c2a059' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x center;
  opacity: 0.8;
}

/* ---------------------------------------------------------- hero */

.hero {
  background: linear-gradient(165deg, #25604f 0%, var(--teal) 35%, var(--teal-deep) 100%);
  color: var(--paper);
  padding: 4.5rem 0 5.5rem;
  position: relative;
}

/* the hero brings its own wavy shoreline, so the header thread would clash */
.home .site-header::after { display: none; }

.hero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'%3E%3Cpath d='M0 0 H 1200 V 16 Q 1125 30 1050 16 T 900 16 T 750 16 T 600 16 T 450 16 T 300 16 T 150 16 T 0 16 Z' fill='%23f6f0e1'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
}

.hero::after {
  /* waves at the foot of the sea, like on the album cover */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 38px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 38' preserveAspectRatio='none'%3E%3Cpath d='M0 22 Q 75 0 150 22 T 300 22 T 450 22 T 600 22 T 750 22 T 900 22 T 1050 22 T 1200 22 V 38 H 0 Z' fill='%23f6f0e1'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 3.5rem;
  align-items: center;
}

.hero-art { margin: 0; }
.hero-art img {
  display: block;
  width: 100%;
  border: 6px solid rgba(246, 240, 225, 0.92);
  border-radius: 3px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform: rotate(-1.2deg);
}

.hero-title {
  color: var(--paper);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  margin: 0 0 1.6rem;
}
.hero-title em { color: var(--gold-soft); }

.hero-listen iframe { border-radius: 12px; border: 0; }

/* ---------------------------------------------------------- sections */

.section { padding: 4.5rem 0; }

.section-title, .page-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 2.2rem;
}

.page-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 12px;
  margin: 0.9rem auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='12' viewBox='0 0 90 12'%3E%3Cpath d='M2 6 q 11-8 22 0 t 22 0 22 0 20 0' fill='none' stroke='%23c2a059' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
}

.video-frame {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 6px solid #fff;
  border-radius: 3px;
  box-shadow: 0 16px 40px rgba(42, 38, 34, 0.25);
  background: var(--teal-night);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------------------------------------------------------- prose */

.prose { font-size: 1.04rem; }
.prose p { margin: 0 0 1.3em; }
.prose img {
  display: block;
  margin: 2rem auto;
  border: 5px solid #fff;
  border-radius: 3px;
  box-shadow: 0 10px 28px rgba(42, 38, 34, 0.22);
}
.prose h2, .prose h3 { margin: 2.2rem 0 1rem; }
.prose blockquote {
  margin: 1.6rem 0;
  padding: 0.3rem 1.4rem;
  border-left: 3px solid var(--gold);
  font-style: italic;
  color: var(--ink-soft);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  background: #fffdf6;
  box-shadow: 0 6px 18px rgba(42, 38, 34, 0.12);
}
.prose td, .prose th {
  padding: 0.6rem 1rem;
  border: 1px solid var(--paper-deep);
}
.prose tr:first-child td { background: var(--teal-deep); color: var(--paper); }

/* ---------------------------------------------------------- blog */

.blog-card {
  background: #fffdf6;
  border: 1px solid var(--paper-deep);
  border-radius: 4px;
  box-shadow: 0 8px 22px rgba(42, 38, 34, 0.08);
  padding: 1.8rem 2rem 1.4rem;
  margin-bottom: 1.6rem;
}

.entry-date {
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.entry-title { margin: 0 0 0.6rem; font-size: 1.45rem; }
.entry-title a { color: var(--teal-deep); text-decoration: none; }
.entry-title a:hover { color: var(--red); }

.entry-excerpt { margin: 0 0 0.8rem; color: var(--ink-soft); }

.entry-more { margin: 0; }
.entry-more a {
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--green-brand);
}
.entry-more a:hover { color: var(--red); }

.post-header { text-align: center; margin-bottom: 2rem; }
.post-header .entry-date { margin-bottom: 0.6rem; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--paper-deep);
  font-family: 'Fraunces', Georgia, serif;
}
.post-nav a { text-decoration: none; }
.post-nav .post-next { margin-left: auto; text-align: right; }

/* ---------------------------------------------------------- gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.g-item {
  display: block;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 3px;
  box-shadow: 0 8px 20px rgba(42, 38, 34, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.g-item:nth-child(3n+1) { transform: rotate(-0.7deg); }
.g-item:nth-child(3n+2) { transform: rotate(0.5deg); }
.g-item:nth-child(3n)   { transform: rotate(-0.3deg); }
.g-item:hover {
  transform: rotate(0deg) scale(1.025);
  box-shadow: 0 14px 32px rgba(42, 38, 34, 0.3);
  z-index: 2;
  position: relative;
}
.g-item img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }

/* lightbox */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 45, 39, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 3rem;
}
.lb-overlay img {
  max-width: 100%;
  max-height: 100%;
  border: 6px solid var(--paper);
  border-radius: 3px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.lb-btn {
  position: absolute;
  background: none;
  border: 0;
  color: var(--paper);
  font-size: 2.6rem;
  font-family: 'Fraunces', Georgia, serif;
  cursor: pointer;
  padding: 1rem;
  line-height: 1;
  opacity: 0.85;
}
.lb-btn:hover { opacity: 1; color: var(--gold-soft); }
.lb-close { top: 0.6rem; right: 1rem; }
.lb-prev { left: 0.6rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.6rem; top: 50%; transform: translateY(-50%); }

/* ---------------------------------------------------------- contacto */

.contact-form {
  max-width: 560px;
  margin: 1.5rem auto 0;
  display: flex;
  flex-direction: column;
}

.contact-form label {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--teal-deep);
  margin: 1.1rem 0 0.35rem;
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--ink);
  padding: 0.65rem 0.85rem;
  background: #fffdf6;
  border: 1.5px solid var(--paper-deep);
  border-radius: 3px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(194, 160, 89, 0.25);
}

.contact-form button {
  margin-top: 1.6rem;
  align-self: center;
  font: 700 1rem 'Lato', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--green-brand);
  border: 0;
  border-radius: 3px;
  padding: 0.85rem 3rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.contact-form button:hover { background: var(--teal-deep); transform: translateY(-1px); }

/* ---------------------------------------------------------- footer */

.site-footer {
  margin-top: 4rem;
  background: linear-gradient(180deg, var(--teal-deep), var(--teal-night));
  color: var(--paper);
  text-align: center;
  padding: 3.2rem 1rem 2.4rem;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'%3E%3Cpath d='M0 0 H 1200 V 16 Q 1125 30 1050 16 T 900 16 T 750 16 T 600 16 T 450 16 T 300 16 T 150 16 T 0 16 Z' fill='%23f6f0e1'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
}

.footer-logo { filter: invert(1) opacity(0.9); width: 150px; height: auto; margin-top: 1.2rem; }

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0;
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  flex-wrap: wrap;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.02rem;
}
.footer-nav a { color: var(--gold-soft); text-decoration: none; }
.footer-nav a:hover { color: #fff; }

.site-footer .social { margin: 1.3rem 0; }
.site-footer .social a { color: var(--gold-soft); border-color: rgba(216, 188, 130, 0.5); }
.site-footer .social a:hover { color: #fff; }

.copyright { margin: 1rem 0 0; font-size: 0.85rem; color: rgba(246, 240, 225, 0.65); }

/* ---------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero-art { max-width: 440px; margin: 0 auto; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .brand img { width: 195px; }
  .nav-main ul { gap: 1rem; }
  .nav-main a { height: 50px; background-size: 222px 100px; }
  .m-bio      { width: 45px; background-position: 0 0; }
  .m-galeria  { width: 64px; background-position: -44px 0; }
  .m-blog     { width: 52px; background-position: -108px 0; }
  .m-contacto { width: 62px; background-position: -160px 0; }
  .m-bio:hover,      .m-bio.current      { background-position: 0 -50px; }
  .m-galeria:hover,  .m-galeria.current  { background-position: -44px -50px; }
  .m-blog:hover,     .m-blog.current     { background-position: -108px -50px; }
  .m-contacto:hover, .m-contacto.current { background-position: -160px -50px; }
  .gallery { grid-template-columns: 1fr; }
  .blog-card { padding: 1.4rem 1.3rem 1.1rem; }
  .lb-overlay { padding: 1.2rem; }
  .section { padding: 3rem 0; }
}
