/* ==========================================================================
   Aegean House — sitewide styles
   Static rebuild of the WordPress (Astra + Elementor) site, Nov 2026.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/lato-400.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/lato-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/barlow-condensed-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/barlow-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Alex Brush"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/alex-brush-400.woff2") format("woff2"); }

/* ---------- Design tokens (from the old Astra global colors) ---------- */
:root {
  --teal: #3aadba;          /* hover */
  --teal-dark: #1e93a8;     /* buttons, links */
  --teal-deep: #0d8196;     /* header "Email Us" button */
  --teal-footer: #046171;   /* copyright bar */
  --heading: #171819;
  --text: #383a3c;
  --white: #fff;
  --mist: #e9f8f9;          /* light teal section background */
  --mist-light: #f4feff;
  --line: #cae6e8;          /* frame borders */
  --script: #7bf2ff;        /* "Welcome to the" */
  --container: 1280px;
  --gutter: 20px;
  --font-body: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--mist);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); }
a:hover, a:focus { color: var(--teal); }
a:focus-visible, button:focus-visible { outline: 2px dotted currentColor; outline-offset: 2px; }
p { margin: 0 0 1.4em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 20px;
}
h1 { font-size: 4.5em; line-height: 1.2; text-transform: uppercase; }
h2 { font-size: 2.5em; line-height: 1.3; }
h3 { font-size: 2em;   line-height: 1.4; }
h4 { font-size: 1.5em; line-height: 1.5; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--white); color: var(--heading); padding: 10px 16px;
}
.skip-link:focus { left: 10px; top: 10px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background: var(--teal-dark);
  border: 1px solid var(--white);
  border-radius: 4px;
  padding: 12px 22px;
  transition: background-color .2s;
}
.btn:hover, .btn:focus { color: var(--white); background: var(--teal); }
.btn-row { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 20px; }

/* ---------- Header (overlays the hero, like the old transparent header) ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(30, 148, 168, .69);
  border-bottom: 1px solid var(--teal);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 80px; gap: 20px; }
.site-title {
  font-family: var(--font-head); font-weight: 600; font-size: 32px; line-height: 1;
  text-transform: uppercase; color: var(--white); text-decoration: none; white-space: nowrap;
}
.site-title:hover, .site-title:focus { color: var(--white); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.main-nav a {
  display: block; padding: 8px 10px;
  font-family: var(--font-head); font-size: 18px; font-weight: 400;
  text-transform: uppercase; text-decoration: none; color: var(--white);
}
.main-nav a:hover, .main-nav a:focus, .main-nav a[aria-current="page"] { color: var(--mist); text-decoration: underline; text-underline-offset: 6px; }
.main-nav .btn { background: var(--teal-deep); padding: 12px 24px; text-decoration: none; }
.main-nav .btn:hover, .main-nav .btn:focus { background: var(--teal-dark); color: var(--white); }

.menu-toggle {
  display: none;
  background: transparent; border: 0; color: var(--white);
  padding: 10px; cursor: pointer; line-height: 0;
}
.menu-toggle svg { width: 24px; height: 24px; fill: currentColor; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero ----------
   The photo is an absolutely-positioned layer behind the text, and the text
   box sets a min-height, so a long, wrapped title grows the band instead of
   being clipped (see launch checklist §6). */
.hero {
  position: relative; isolation: isolate;
  min-height: 800px;
  display: flex; align-items: center;
  padding: 120px 0 60px;          /* clears the 80px overlay header */
  color: var(--white);
  overflow: hidden;
}
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg { z-index: -2; }
.hero-bg img { object-fit: cover; object-position: center; }
.hero::before {                    /* left-to-right dark fade for legibility */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #000 0%, transparent 100%);
  opacity: var(--overlay, .6);
}
.hero h1, .hero-sub, .hero .hero-script { color: var(--white); margin: 0; }
.hero-sub { font-family: var(--font-head); font-weight: 600; font-size: 2.5em; line-height: 1.3; }
.hero-script { font-family: "Alex Brush", cursive; font-weight: 600; font-size: 3em; line-height: 1.3; color: var(--script) !important; }
.hero--home { --overlay: .5; }
.hero--home h1 { font-size: 8em; line-height: 1.1; }

/* Home title gently fades in and rises into place on page load. */
@keyframes fadeRise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
.hero--home h1 { animation: fadeRise 1.2s cubic-bezier(.2, .7, .2, 1) .2s both; }

/* ---------- Generic sections ---------- */
.section { padding: 60px 0; }
.section--white { background: var(--white); }
.section--mist { background: var(--mist); }
.section--mist-light { background: var(--mist-light); }

/* Framed image (the "photo with a mat" look used throughout) */
.frame { display: block; padding: 20px; border: 1px solid var(--line); background: var(--mist); }
.frame--white { background: var(--white); }
.frame img { width: 100%; }
a.frame { transition: border-color .2s; }
a.frame:hover { border-color: var(--teal); }

/* ---------- Home: intro (text + overlapping photo collage) ---------- */
.intro { background: var(--white); padding: 40px 0 60px; }
.intro-grid { display: grid; grid-template-columns: 2fr 3fr; gap: 20px; align-items: start; }
.intro-text h2 { font-size: 1.4em; line-height: 1.5; color: var(--heading); }
.intro-text { padding: 10px; }
.collage-main { margin-top: -200px; margin-bottom: 20px; position: relative; z-index: 2; }
.collage-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.feature-wide .frame { margin-bottom: 30px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; align-items: start; }
.split h2 { font-size: 2em; line-height: 1.4; }
.split--center { align-items: center; }

.cta-heading { text-align: center; font-size: 1.8em; line-height: 1.4; margin: 0; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.card { text-align: center; padding: 10px; }
.card h3 { font-size: 1.5em; line-height: 1.5; }
.card .frame { margin-bottom: 20px; }
.card p { margin-bottom: 20px; }

/* ---------- Page intro text block ---------- */
.page-intro { padding: 60px 0; }
.page-intro .btn { margin-top: 20px; }

/* ---------- Gallery (masonry via CSS columns) ---------- */
.gallery { columns: 4; column-gap: 20px; }
.gallery a { display: block; margin-bottom: 20px; break-inside: avoid; cursor: zoom-in; }
.gallery img { width: 100%; transition: opacity .2s; }
/* With JS: row-by-row masonry (photos keep their order left to right).
   main.js sets each item's row span from its width/height attributes. */
.gallery.is-masonry {
  columns: auto; display: grid; grid-template-columns: repeat(4, 1fr);
  column-gap: 20px; grid-auto-rows: 2px; align-items: start;
}
.gallery.is-masonry a { margin-bottom: 0; }
.gallery a:hover img, .gallery a:focus img { opacity: .85; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10, 12, 14, .92);
  display: none; align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox button {
  position: absolute; background: rgba(30,30,30,.6); color: #fff; border: 0;
  width: 48px; height: 48px; font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox button:hover, .lightbox button:focus { background: rgba(30,147,168,.9); }
.lb-close { top: 0; right: 0; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 12px; left: 14px; color: #ddd; font-size: 14px; }
body.lb-locked { overflow: hidden; }

/* ---------- History ---------- */
.history { margin: 60px 0; }
.history .split { align-items: center; }

/* ---------- Footer ---------- */
.footer-cta {
  position: relative; isolation: isolate;
  padding: 140px 0; text-align: center;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.footer-cta picture, .footer-cta picture img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.footer-cta picture img { object-fit: cover; }
.footer-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0,0,0,.49); }
.footer-cta .btn { font-size: 1.2em; }
.footer-bottom {
  background: var(--teal-footer); color: var(--white);
  border-top: 1px solid var(--line);
  text-align: center; font-size: 14px; padding: 18px 0;
}
.footer-bottom a { color: var(--white); text-decoration: none; }
.footer-bottom a:hover, .footer-bottom a:focus { text-decoration: underline; color: var(--white); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 30px; bottom: 30px; z-index: 40;
  width: 32px; height: 32px; border-radius: 2px;
  background: var(--teal-dark); color: #fff; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover, .to-top:focus { background: var(--teal); }
.to-top svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- 404 ---------- */
.notfound { background: var(--white); padding: 80px 0; text-align: center; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
  .main-nav { gap: 14px; }
  .main-nav ul { gap: 0; }
  .main-nav a { font-size: 17px; padding: 8px 8px; }
}

@media (max-width: 1024px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  h3 { font-size: 26px; }
  h4 { font-size: 20px; }
  .hero { min-height: 500px; }
  .hero-sub { font-size: 32px; }
  .hero--home h1 { font-size: 4em; }
  .hero-script { font-size: 2em; }
  .gallery { columns: 3; }
  .gallery.is-masonry { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile menu kicks in where the desktop menu stops fitting */
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white);
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
    /* tall menu scrolls inside itself on short (landscape) screens */
    max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px);
    overflow-y: auto;
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a {
    font-family: var(--font-body); font-size: 17px; text-transform: none;
    color: var(--text); padding: 12px var(--gutter);
    border-bottom: 1px solid var(--mist);
  }
  .main-nav a:hover, .main-nav a:focus, .main-nav a[aria-current="page"] {
    color: var(--teal-dark); background: var(--mist); text-decoration: none;
  }
  .main-nav .btn { margin: 14px var(--gutter); text-align: center; color: var(--white); border-color: var(--teal-deep); }
}

@media (max-width: 767px) {
  h1 { font-size: 32px; }
  h2 { font-size: 25px; }
  h3 { font-size: 22px; }
  h4 { font-size: 18px; }
  .hero { min-height: 500px; padding-top: 110px; }
  .hero-sub { font-size: 25px; }
  .hero--home h1 { font-size: 3.6em; line-height: 1.05; }
  .site-title { font-size: 28px; }

  .intro-grid, .split, .cards { grid-template-columns: 1fr; }
  .collage-pair { grid-template-columns: 1fr; }
  .split > .frame { order: -1; }
  .history .split > .frame { order: 0; }
  .gallery { columns: 2; column-gap: 12px; }
  .gallery.is-masonry { grid-template-columns: repeat(2, 1fr); column-gap: 12px; }
  .gallery a { margin-bottom: 12px; }
  .footer-cta { padding: 90px 0; }
  .to-top { right: 16px; bottom: 16px; }
}

/* The home collage only overlaps the hero on wide desktop screens; on tablets
   and short screens the hero text sits too close to it and would be covered. */
@media (max-width: 1024px), (max-height: 600px) {
  .collage-main { margin-top: 0; }
}

/* Short screens (phones in landscape): keep the hero from filling the view */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: 0; padding: 110px 0 40px; }
}

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