/* Javi Surf Lessons
   Palette taken from the lesson photos: Pacific teal, softboard yellow,
   Jacó's dark volcanic sand and the jungle behind the beach. */

:root {
  --salt: #EEF4F2;       /* page background, sea-foam white */
  --foam: #FFFFFF;
  --pacific: #0E3B43;    /* ink */
  --swell: #1D6F78;      /* secondary teal */
  --softboard: #F4C430;  /* the yellow beginner board, used only for booking */
  --softboard-deep: #D9A916;
  --jungle: #3E6B48;
  --sand: #5F5750;       /* volcanic sand, muted text */
  --line: #C9D8D5;

  --display: "Anybody", "Arial Narrow", sans-serif;
  --body: "Karla", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.5rem;
  --step-2: 2rem;
  --step-3: clamp(2.25rem, 4.5vw, 3.25rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 36rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--salt);
  color: var(--pacific);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--swell); text-underline-offset: 0.18em; }
a:hover { color: var(--pacific); }

:focus-visible {
  outline: 3px solid var(--softboard);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { margin: 0; font-family: var(--display); line-height: 1.05; }

h2 {
  font-size: var(--step-3);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  max-width: 18ch;
}

h3 { font-size: var(--step-1); font-weight: 700; font-stretch: 110%; }

p { margin: 0 0 1em; max-width: var(--measure); }

section { padding: clamp(4rem, 9vw, 7.5rem) var(--gutter); }
section > * { max-width: 72rem; margin-inline: auto; }

/* Buttons: the booking button is shaped like a softboard, with a stringer line */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 2rem;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 700;
  font-size: var(--step-0);
  text-decoration: none;
  transition: background-color 0.15s, transform 0.15s;
}

.btn-board {
  position: relative;
  background: var(--softboard);
  color: var(--pacific);
  box-shadow: inset 0 -3px 0 var(--softboard-deep);
}
.btn-board::after {
  content: "";
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  top: 50%;
  height: 1px;
  background: rgba(14, 59, 67, 0.18);
  pointer-events: none;
}
.btn-board:hover { color: var(--pacific); background: #F7D04F; transform: translateY(-1px); }

.btn-ghost {
  color: var(--foam);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}
.btn-ghost:hover { color: var(--pacific); background: var(--foam); }

.btn-small { min-height: 2.6rem; padding: 0 1.4rem; font-size: 1rem; }

/* Top bar */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem var(--gutter);
  color: var(--foam);
  transition: background-color 0.25s, color 0.25s;
}
.topbar.is-solid {
  background: var(--pacific);
}

.brand {
  margin-right: auto;
  color: inherit;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 130%;
  font-size: 1.15rem;
  text-decoration: none;
}
.brand:hover { color: var(--softboard); }

.topnav { display: flex; gap: 1.5rem; }
.topnav a {
  color: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  opacity: 0.85;
}
.topnav a:hover { opacity: 1; text-decoration: underline; }

.brand, .btn, .topnav a { white-space: nowrap; }

@media (max-width: 1040px) {
  .topnav { display: none; }
}

@media (max-width: 420px) {
  .brand { font-size: 1rem; font-stretch: 110%; }
  .topbar .btn-small { padding: 0 1rem; }
}

/* Hero: the real lesson photo, with the place name stretched wide across it */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 7rem var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
  color: var(--foam);
  overflow: hidden;
}
.hero > * { max-width: none; margin: 0; }

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 20% 40%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(14, 59, 67, 0.92) 0%, rgba(14, 59, 67, 0.55) 40%, rgba(14, 59, 67, 0.05) 70%),
    linear-gradient(to bottom, rgba(14, 59, 67, 0.55), transparent 9rem);
}

.hero-copy { position: relative; z-index: 1; width: 100%; }

.hero-title {
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.02em;
}
.hero-line { display: block; }
.hero-line:first-child {
  font-size: clamp(2rem, 6vw, 5rem);
  font-stretch: 110%;
}
.hero-place {
  font-size: clamp(4.5rem, 21vw, 17rem);
  font-stretch: 150%;
  white-space: nowrap;
  margin-top: 0.06em;
  color: var(--softboard);
  animation: stretch 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

@keyframes stretch {
  from { font-stretch: 50%; }
  to { font-stretch: 150%; }
}

.hero-lede {
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  max-width: 34rem;
}

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

/* The lesson */

.lesson {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.lesson h2 { margin-bottom: 1.5rem; }
.lesson h3 { margin: 2.25rem 0 1rem; }

.checklist { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.checklist li {
  position: relative;
  padding: 0.6rem 0 0.6rem 2.25rem;
  border-top: 1px solid var(--line);
}
.checklist li:last-child { border-bottom: 1px solid var(--line); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.05rem;
  width: 1.1rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--softboard);
  box-shadow: inset 0 -2px 0 var(--softboard-deep);
}

.lesson-photo { margin: 0; }
.lesson-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 1.5rem 1.5rem 1.5rem 0.25rem;
}

.lesson-flip { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); padding-top: 0; }
.lesson-flip .lesson-photo img { aspect-ratio: 4 / 3; border-radius: 1.5rem 1.5rem 0.25rem 1.5rem; }

@media (max-width: 820px) {
  .lesson, .lesson-flip { grid-template-columns: 1fr; }
  .lesson-photo { order: -1; }
  .lesson-photo img { aspect-ratio: 4 / 3; }
}

/* Season */

.season {
  background: var(--pacific);
  color: var(--salt);
}
.season-head { display: grid; gap: 1rem; margin-bottom: 3rem; }
.season-head p { color: #B9D2CF; }

.months {
  list-style: none;
  margin: 0 auto 2.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
}
.months li {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: clamp(5rem, 14vw, 9rem);
  padding-bottom: 0.6rem;
  border-radius: 999px 999px 6px 6px;
  font-weight: 700;
  font-size: var(--step--1);
}
.months .dry { background: var(--softboard); color: var(--pacific); }
.months .green { background: var(--jungle); color: #E4EFE6; height: clamp(3.5rem, 9vw, 6rem); align-self: end; }
.months { align-items: end; }

@media (max-width: 560px) {
  .months span { writing-mode: vertical-rl; transform: rotate(180deg); }
  .months li { padding-bottom: 0.5rem; font-size: 0.8rem; }
}

.season-key {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem clamp(2rem, 5vw, 4rem);
}
.season-key h3 { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; font-size: 1.25rem; }
.season-key p { color: #B9D2CF; }
.swatch { flex: none; width: 0.9rem; height: 0.9rem; border-radius: 50%; }
.swatch-dry { background: var(--softboard); }
.swatch-green { background: #6FA27B; }

@media (max-width: 700px) {
  .season-key { grid-template-columns: 1fr; }
}

/* Prices */

.prices h2 { margin-bottom: 0.75rem; }
.prices-note { color: var(--sand); margin-bottom: 2.5rem; }

.price-list { list-style: none; padding: 0; margin: 0 auto 2.5rem; }
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 2px solid var(--pacific);
}
.price-row:last-child { border-bottom: 2px solid var(--pacific); }
.price-name h3 { margin-bottom: 0.35rem; }
.price-name p { margin: 0; color: var(--sand); }

.price-amount {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 140%;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 1;
  color: var(--swell);
}
.price-amount .cur { font-size: 0.45em; vertical-align: 0.9em; margin-right: 0.08em; }

/* Photos */

.photos { background: var(--foam); }
.photos-head { margin-bottom: 2.5rem; }
.photos-head h2 { margin-bottom: 0.75rem; }
.photos-head p { color: var(--sand); }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(9rem, 17vw, 14rem);
  grid-auto-flow: dense;
  gap: 0.6rem;
}

.shot {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--line);
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.shot span {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(14, 59, 67, 0.82);
  color: var(--foam);
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 600;
}
.shot:hover img { transform: scale(1.04); }
.shot-lead { grid-column: span 2; grid-row: span 2; }

@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 9.5rem; }
}

.viewer {
  max-width: min(92vw, 1100px);
  padding: 0;
  border: 0;
  border-radius: 0.75rem;
  background: var(--pacific);
  overflow: visible;
}
.viewer::backdrop { background: rgba(14, 59, 67, 0.88); }
.viewer img { max-height: 82vh; width: auto; border-radius: 0.75rem; }
.viewer form { position: absolute; top: -3.25rem; right: 0; }
.viewer-close {
  min-height: 2.5rem;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--foam);
  color: var(--pacific);
  font: 700 1rem var(--body);
  cursor: pointer;
}

/* FAQ */

.faq h2 { margin-bottom: 2rem; }
.faq-list { max-width: 48rem; margin-inline: 0; }
.faq-list { margin-left: max(0px, calc((100% - 72rem) / 2)); }

details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }

summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0;
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--pacific);
  color: var(--foam);
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.2s;
}
details[open] summary::after { transform: rotate(45deg); background: var(--softboard); color: var(--pacific); }
details p { padding-bottom: 1.25rem; color: var(--sand); }

/* Contact */

.contact { background: var(--softboard); }
.contact h2 { font-size: clamp(3rem, 9vw, 6.5rem); font-stretch: 150%; max-width: none; margin-bottom: 1rem; }
.contact-lede { margin-bottom: 2.5rem; }

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  margin: 0 auto;
}
.contact-list div { border-top: 2px solid var(--pacific); padding-top: 0.75rem; }
.contact-list dt { font-weight: 700; font-size: var(--step--1); margin-bottom: 0.25rem; }
.contact-list dd { margin: 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.contact-list a { color: var(--pacific); font-weight: 600; }
.contact-list a:hover { text-decoration-thickness: 2px; }

@media (max-width: 640px) {
  .contact-list { grid-template-columns: 1fr; }
}

/* Footer */

.footer {
  padding: 3rem var(--gutter);
  background: var(--pacific);
  color: #B9D2CF;
  font-size: 1rem;
}
.footer p { margin: 0 0 0.35rem; }
.footer-brand {
  color: var(--foam);
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 130%;
  font-size: 1.25rem;
}
.footer-small { margin-top: 1.5rem !important; font-size: var(--step--1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
