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

html, body {
  height: 100%;
}

body {
  font-family: "EB Garamond", serif;
  background-color: #F4F2EC; /* warm cream */
  color: #1A1A1A;            /* ink */
  line-height: 1.6;
}

h1, h2, h3, .site-title, .page-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #5E6B54; /* deep moss */
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: #8B775A;
  text-decoration: none;
}

/* ------------------------------
   PAGE CONTAINER
------------------------------ */
.page {
  max-width: 1050px;
  margin: 0 auto;
  padding: 40px 24px 50px;
  background-color: #F4F2EC;
}

/* ------------------------------
   HEADER
------------------------------ */
.site-header {
  text-align: center;
  margin-bottom: 24px;
}

.avatar-wrapper {
  margin-bottom: 8px;
}

.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #111;
  background: #fff;
}

.site-title {
  margin: 0 0 4px;
}

.name-logo {
  display: block;
  margin: 0 auto;
  max-width: 240px;
  width: 100%;
  height: auto;
}

.tagline {
  font-size: 0.9rem;
  color: #7a8270;
  margin-top: 2px;
  margin-bottom: 6px;
}

/* ------------------------------
   DROPDOWN MENU
------------------------------ */
.section-nav {
  margin-top: 0;
  margin-bottom: 18px;
}

.section-nav .menu {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0;
  margin: 0;
}

.menu-item {
  position: relative;
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.section-nav a,
.section-nav a:hover {
  text-decoration: none !important;
}

.menu-item > a {
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}

.menu-item > a:hover {
  border-bottom-color: #8B775A;
}

.dropdown {
  display: none;
  list-style: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #F4F2EC;
  padding: 8px 16px 10px;
  border: 1px solid #d7d3c4;
  box-shadow: 0 10px 18px rgba(0,0,0,0.08);
  min-width: 220px;
  z-index: 100;
}

.dropdown li + li {
  margin-top: 6px;
}

.dropdown a {
  font-size: 0.9rem;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
}

.dropdown a:hover {
  border-bottom-color: #8B775A;
}

.menu-item:hover .dropdown {
  display: block;
}

/* ------------------------------
   HERO SLIDER (fixed height, no cropping)
------------------------------ */
.hero {
  width: 100%;
  margin-top: 14px;
  margin-bottom: 36px;
  background: #F4F2EC;
}

.hero-slider {
  position: relative;
  height: clamp(280px, 56vw, 620px);
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
  background: #F4F2EC;
}

.hero-slide {
  position: absolute;
  inset: 0;
  height: 100%;
  width: auto;
  margin: auto;
  object-fit: contain;
  object-position: center;
  background-color: #F4F2EC;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
  display: block;
}

.hero-slide.active {
  opacity: 1;
}

/* ------------------------------
   TEXT SECTIONS
------------------------------ */
.text-section {
  margin-top: 52px;
  margin-bottom: 40px;
}

.text-section h2 {
  margin-bottom: 10px;
}

.text-section p {
  line-height: 1.7;
}

.text-section a:hover,
.site-footer a:hover {
  text-decoration: underline;
}

/* CONTACT SECTION */
.contact-section {
  max-width: 520px;
  margin: 60px auto 40px;
  text-align: center;
}

.contact-section h2 {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #5E6B54;
  position: relative;
}

.contact-section h2::before {
  content: "";
  display: block;
  width: 80px;
  height: 1px;
  margin: 0 auto 14px;
  background-color: #d7d3c4;
}

.contact-intro {
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 14px;
  color: #555;
}

.contact-email {
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.contact-email a {
  font-weight: 500;
  border-bottom: 1px solid #8B775A;
}

.contact-email a:hover {
  color: #8B775A;
  border-bottom-color: #5E6B54;
}

.social-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-links a {
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
}

.social-links a:hover {
  border-bottom-color: #8B775A;
}

#contact {
  text-align: center;
  max-width: 520px;
  margin: 0 auto 40px auto;
}

#contact h2,
#contact p {
  text-align: center;
}

/* ------------------------------
   FOOTER
------------------------------ */
.site-footer {
  margin-top: 60px;
  font-size: 0.75rem;
  color: #9ea88f;
  letter-spacing: 0.3px;
  text-align: center;
}

/* ------------------------------
   GALLERY PAGES
------------------------------ */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

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

.gallery-item {
  background: #FFFDFC;
  padding: 16px 16px 18px;
  border: 1px solid #9EA88F;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.gallery-item img {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
  cursor: zoom-in;
}

.gallery-item figcaption {
  font-size: 0.9rem;
  color: #555;
  margin-top: 10px;
  text-align: center;
  max-width: 90%;
}

/* ------------------------------
   RUN / PROJECT SLIDERS
------------------------------ */
.run-slider {
  margin-top: 28px;
  margin-bottom: 40px;
  text-align: center;
}

.run-frame {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  background: #111;
  padding: 10px;
}

.run-slide-img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  opacity: 1;
  transition: opacity 0.25s ease-in-out;
}

.run-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #d2cdbd;
  background: rgba(244, 242, 236, 0.9);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.run-prev { left: -18px; }
.run-next { right: -18px; }

.run-arrow:hover {
  background: #1A1A1A;
  color: #F4F2EC;
  border-color: #1A1A1A;
}

.run-caption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #555;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Move project arrows fully outside the frame --- */
.run-frame {
  position: relative;
  overflow: visible;                /* allow arrows to sit outside */
}

/* per-slider variables so you can tweak per page if needed */
.run-slider {
  --arrow-size: 40px;               /* visual size of the button */
  --arrow-gap: 14px;                /* extra space outside the frame */
}

.run-arrow {
  width: var(--arrow-size);
  height: var(--arrow-size);
  line-height: 1;                   /* cleaner centering of the glyph */
}

/* push completely outside the black frame */
.run-prev { left: calc(-1 * (var(--arrow-size) + var(--arrow-gap))); }
.run-next { right: calc(-1 * (var(--arrow-size) + var(--arrow-gap))); }

/* Mobile: pull them closer & shrink a bit */
@media (max-width: 700px) {
  .run-slider {
    --arrow-size: 34px;
    --arrow-gap: 8px;
  }
}
/* ------------------------------
   LIGHTBOX
------------------------------ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox-overlay.visible { display: flex; }

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  cursor: zoom-out;
  background: #111;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid #F4F2EC;
  background: rgba(0, 0, 0, 0.45);
  color: #F4F2EC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  cursor: pointer;
  z-index: 1100;
}

.lightbox-prev { left: 32px; }
.lightbox-next { right: 32px; }

.lightbox-arrow:hover { background: rgba(0, 0, 0, 0.75); }

/* ------------------------------
   STUDIO LUZANO KOULU / ABOUT PAGES
------------------------------ */
.koulu-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 40px;
}

.koulu-intro .back-link {
  display: inline-block;
  font-size: 0.8rem;
  margin-bottom: 12px;
  color: #7a8270;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.koulu-intro .back-link:hover {
  border-bottom-color: #8B775A;
  color: #8B775A;
}

.koulu-intro .page-title {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.koulu-intro .intro-text {
  font-size: 0.95rem;
  max-width: 640px;
  margin: 0 auto 18px;
  line-height: 1.7;
}

.soft-divider {
  border: 0;
  border-top: 1px solid #e1ddcf;
  width: 120px;
  margin: 0 auto;
}

.koulu-gallery {
  max-width: 960px;
  margin: 40px auto 50px;
}

.section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: #7a8270;
  margin: 32px 0 18px;
}

.section-title.small {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  margin-top: 40px;
  margin-bottom: 12px;
}

.koulu-gallery-intro {
  max-width: 640px;
  margin: 0 auto 10px;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

.koulu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin-bottom: 28px;
}

@media (max-width: 820px) {
  .koulu-grid { grid-template-columns: 1fr; }
}

.koulu-item {
  background: #FFFDFC;
  border: 1px solid #d7d3c4;
  padding: 14px 14px 18px;
}

.koulu-item img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.koulu-item figcaption {
  font-size: 0.85rem;
  color: #777;
  text-align: center;
}

.koulu-description {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: left;
}

.koulu-description p { margin-bottom: 10px; }

.koulu-description a {
  border-bottom: 1px solid transparent;
}

.koulu-description a:hover {
  border-bottom-color: #8B775A;
  color: #8B775A;
}

/* ------------------------------
   ABOUT PAGE IMPROVEMENTS
------------------------------ */
.text-section {
  max-width: 700px;
  margin: 0 auto;
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

.text-section + .text-section { margin-top: -0.5rem; }

.site-footer {
  margin-top: 3rem;
  padding-top: 2rem;
}

.text-section p {
  line-height: 1.55;
  margin-bottom: 1.1rem;
}

.text-section h2 {
  margin-bottom: 0.6rem;
  font-size: 1.6rem;
}

.price-booking {
  margin-top: 3rem;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.price-booking .section-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #5E6B54; /* deep moss */
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-size: 1rem;
}

.price-booking p {
  font-family: "EB Garamond", serif;
  line-height: 1.6;
  color: #1A1A1A;
  margin-bottom: 1rem;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem 0;
}

.price-list li {
  margin: 0.4rem 0;
  font-family: "EB Garamond", serif;
}

.menu-item a[target="_blank"]::after {
  content: "↗";
  font-size: 0.8em;
  margin-left: 3px;
  opacity: 0.6;
}

/* =========================
   iOS in-app browser fixes
   (Instagram/Safari safe-areas)
   ========================= */

/* Give ONLY the header safe-area padding on iOS.
   Using max() keeps normal padding on other devices. */
@supports (padding: max(0px)) {
  .site-header {
    padding-top: max(16px, env(safe-area-inset-top));
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

/* Keep menus above the hero/art, so dropdowns remain tappable */
.site-header { position: relative; z-index: 20; }
.section-nav   { position: relative; z-index: 30; }
.menu .dropdown { z-index: 40; }
.hero          { position: relative; z-index: 1; }

/* Small-screen header tune-up (prevents “squish”/clip) */
@media (max-width: 420px) {
  .avatar {
    width: 68px;
    height: 68px;
  }
  .name-logo {
    max-width: 260px;   /* adjust if you prefer a bit larger */
    height: auto;
  }

  /* Optional: a touch more space between nav items */
  .section-nav .menu {
    gap: 10px;   /* if your menu uses flex/gap; safe to leave in */
  }
}

/* ===== iOS/Instagram safe-area + compact header ===== */

/* Give ONLY the header extra top padding for the notch bars */
@supports (padding: max(0px)) {
  .site-header {
    /* more generous top padding for in-app browsers */
    padding-top: max(24px, calc(env(safe-area-inset-top) + 16px));
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

/* Keep menus above art so dropdowns always sit on top */
.site-header   { position: relative; z-index: 20; }
.section-nav   { position: relative; z-index: 30; }
.menu .dropdown{ z-index: 40; }
.hero          { position: relative; z-index: 1; }

/* --- Compact header on small phones --- */
@media (max-width: 430px) {
  /* shrink avatar/logo just a touch */
  .avatar   { width: 64px; height: 64px; }
  .name-logo{ max-width: 230px; height: auto; }

  /* tagline + nav a bit smaller and tighter line-height */
  .tagline { font-size: 0.95rem; line-height: 1.2; margin-top: 6px; }

  .section-nav .menu {
    display: flex;
    flex-wrap: wrap;          /* allow wrapping to second line cleanly */
    gap: 8px 14px;            /* row-gap / column-gap */
    justify-content: center;
    margin-top: 8px;
  }

  .section-nav .menu > .menu-item > a {
    font-size: 16px;          /* was larger; this prevents crowding */
    line-height: 1.25;
    padding: 2px 0;
    letter-spacing: .02em;
    white-space: nowrap;      /* avoid ugly mid-word breaks */
  }

  /* Optional: keep “Private lessons” together on one line */
  .section-nav .menu > .menu-item > a[href*="studio-luzano-koulu"],
  .section-nav .menu > .menu-item > a[href*="private"] {
    white-space: nowrap;
  }
}

/* If Instagram still overlaps on some devices, give the MAIN a tiny top buffer */
@media (max-width: 430px) {
  main { margin-top: 6px; }
}

@media (max-width: 430px){
  .section-nav .menu > .menu-item > a { padding: 6px 0; }
}

@media (prefers-reduced-motion: reduce){
  .hero .hero-slide { transition: none !important; }
}
<script>
  if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
    const s = document.querySelectorAll('.hero-slide');
    s.forEach((el,i)=>el.classList.toggle('active', i===0));
    // don’t start the interval
  }
</script>

a:hover { text-decoration: underline; text-underline-offset: 2px; }
