/* ============================================================
   DESIGN TOKENS. Change a colour here, it changes everywhere.
   ============================================================ */
:root{
  --ink:   #0E2029;
  --hull:  #163540;
  --water: #275866;
  --haze:  #8FA6AC;
  --sand:  #E7E3D8;
  --paper: #F6F4EF;
  --brass: #C08A3E;

  --display:"Fraunces", Georgia, serif;
  --body:"Archivo", system-ui, -apple-system, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 62ch;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  *{ animation-duration:.01ms !important; transition-duration:.01ms !important; }
}

body{
  margin:0; background:var(--ink); color:var(--sand);
  font-family:var(--body);
  font-size:clamp(1rem,.96rem + .2vw,1.0625rem);
  line-height:1.65; -webkit-font-smoothing:antialiased;
}
img{ display:block; max-width:100%; height:auto; }
a{ color:inherit; }
:focus-visible{ outline:2px solid var(--brass); outline-offset:3px; }

.skip{ position:absolute; left:-9999px; background:var(--brass); color:var(--ink); padding:.75rem 1rem; z-index:100; font-weight:600; }
.skip:focus{ left:1rem; top:1rem; }

h1,h2,h3{
  font-family:var(--display); font-weight:400; line-height:1.08;
  letter-spacing:-.015em; margin:0;
  font-variation-settings:"SOFT" 20,"WONK" 1;
}
h2{ font-size:clamp(1.9rem,1.3rem + 2.6vw,3.1rem); }
h3{ font-size:clamp(1.2rem,1.08rem + .6vw,1.5rem); }
p{ margin:0 0 1.1em; max-width:var(--measure); }
.lede{ font-size:clamp(1.1rem,1rem + .5vw,1.3rem); }
.quiet{ color:var(--haze); }

.wrap{ padding-inline:var(--gutter); }
section{ padding-block:clamp(4rem,10vw,8rem); }

/* Two thin rules: the ketch's two masts. The only ornament here. */
.masts{ display:flex; gap:.4rem; margin-bottom:1.75rem; }
.masts span{ display:block; height:1px; background:var(--brass); }
.masts span:first-child{ width:3.5rem; }
.masts span:last-child{ width:1.25rem; opacity:.6; }

/* ================= HEADER + HEROES ================= */
/* The header sits on top of whichever hero the page has, so every page opens
   the same way: wordmark left, links right. */
.hero,.page-hero{ position:relative; isolation:isolate; }
.hero::before,.page-hero::before{
  content:""; position:absolute; inset:0; z-index:-2;
  background:var(--hull) var(--hero-pos,center) / cover no-repeat;
  background-image:var(--hero);
}
.hero::after,.page-hero::after{
  content:""; position:absolute; inset:0; z-index:-1;
  background:linear-gradient(to bottom, rgba(14,32,41,.74) 0%, rgba(14,32,41,.28) 35%, rgba(14,32,41,.9) 100%);
}
.hero{
  min-height:100svh;
  display:grid; grid-template-rows:auto 1fr auto;
  padding-block:0 clamp(2.5rem,6vw,4rem);
}
.page-hero{ padding-block:0 clamp(3rem,8vw,5.5rem); }
.page-hero::after{ background:linear-gradient(to bottom, rgba(14,32,41,.8) 0%, rgba(14,32,41,.55) 55%, rgba(14,32,41,.92) 100%); }
.page-hero .hero-copy{ padding-top:clamp(4rem,12vw,8rem); }
.page-hero h1{ font-size:clamp(2.6rem,1.6rem + 5vw,4.75rem); font-weight:300; margin-bottom:1rem; }
.page-hero .lede{ max-width:46ch; }

.masthead{
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding-block:1.5rem; position:relative; z-index:20;
}
.wordmark{ font-family:var(--display); font-size:1.15rem; letter-spacing:.16em; text-transform:uppercase; text-decoration:none; font-weight:600; }
.nav{ display:flex; gap:clamp(.9rem,2vw,1.6rem); font-size:.9rem; align-items:center; }
.nav a{ text-decoration:none; color:var(--haze); padding-block:.4rem; border-bottom:1px solid transparent; }
.nav a:hover{ color:var(--sand); }
.nav a[aria-current="page"]{ color:var(--sand); border-bottom-color:var(--brass); }

.nav-toggle{
  display:none; background:none; border:1px solid rgba(231,227,216,.35); color:var(--sand);
  width:2.75rem; height:2.75rem; padding:0; cursor:pointer; align-items:center; justify-content:center;
}
.nav-toggle span{ display:block; width:1.2rem; height:1px; background:currentColor; position:relative; transition:background .15s; }
.nav-toggle span::before,.nav-toggle span::after{
  content:""; position:absolute; left:0; width:100%; height:1px; background:currentColor; transition:transform .2s, top .2s;
}
.nav-toggle span::before{ top:-6px; }
.nav-toggle span::after{ top:6px; }
.nav-open .nav-toggle span{ background:transparent; }
.nav-open .nav-toggle span::before{ top:0; transform:rotate(45deg); }
.nav-open .nav-toggle span::after{ top:0; transform:rotate(-45deg); }

/* Seven links plus the wordmark stop fitting around 900px. Below that the links
   fold into a menu. The .js gate means that if the script never loads, the
   links simply stay visible and wrap. */
@media (max-width:56rem){
  .js .nav-toggle{ display:inline-flex; }
  .js .nav{
    display:none; position:absolute; top:100%; left:calc(-1 * var(--gutter)); right:calc(-1 * var(--gutter));
    flex-direction:column; align-items:stretch; gap:0;
    background:var(--ink); border-top:1px solid rgba(231,227,216,.14);
    border-bottom:1px solid rgba(192,138,62,.5);
    padding:.5rem var(--gutter) 1.25rem;
  }
  .js .nav-open .nav{ display:flex; }
  .js .nav a{
    font-family:var(--display); font-size:1.5rem; color:var(--sand);
    padding:.85rem 0; border-bottom:1px solid rgba(231,227,216,.1);
  }
  .js .nav a[aria-current="page"]{ color:var(--brass); }
  html:not(.js) .masthead{ flex-wrap:wrap; }
  html:not(.js) .nav{ flex-wrap:wrap; row-gap:.2rem; }
}

.hero-copy{ align-self:end; }
.hero h1{ font-size:clamp(2.5rem,1.4rem + 6vw,5.5rem); font-weight:300; margin-bottom:1.25rem; max-width:16ch; }
.hero .lede{ max-width:44ch; color:var(--sand); }

.hero-foot{
  display:flex; align-items:end; justify-content:space-between; gap:1.5rem; flex-wrap:wrap;
  border-top:1px solid rgba(231,227,216,.18); padding-top:1.25rem;
}
.caption{ font-size:.85rem; color:var(--haze); margin:0; max-width:36ch; }

.btn{
  display:inline-block; font-family:var(--body); font-weight:600; font-size:.95rem;
  padding:.85rem 1.6rem; text-decoration:none;
  border:1px solid var(--brass); background:var(--brass); color:var(--ink);
  transition:background .18s ease,color .18s ease;
}
.btn:hover{ background:transparent; color:var(--brass); }
.btn-ghost{ background:transparent; color:var(--sand); border-color:rgba(231,227,216,.4); }
.btn-ghost:hover{ background:var(--sand); color:var(--ink); border-color:var(--sand); }

/* ================= GALLERIES ================= */
/* Column count is set explicitly at each breakpoint rather than left to
   auto-fill. Auto-fill picks the count from available space, so photos pair up
   differently at every window width and the layout feels unstable. Fixed steps
   mean one column on a phone, two on a tablet, three on a desktop, and nothing
   in between. */
.gallery{
  display:grid;
  grid-template-columns:1fr;                       /* phones */
  gap:.75rem; margin-top:clamp(1.75rem,4vw,2.75rem);
  /* dense: if a double-width photo won't fit in the space left on a row, a
     later single-width one slides up to fill the gap instead of leaving a hole.
     Without this, some window widths show blank cells mid-gallery. */
  grid-auto-flow:dense;
}
@media (min-width:640px){ .gallery{ grid-template-columns:repeat(2,1fr); } }
@media (min-width:1080px){ .gallery{ grid-template-columns:repeat(3,1fr); } }

.gallery figure{ margin:0; }

/* Portrait crop for standing shots, landscape crop for wide ones. The crop
   follows the photo at EVERY width - a landscape frame squeezed into a 4:5 box
   on a phone loses both edges, which is where the subject usually is. */
.gallery img{ width:100%; aspect-ratio:4/5; object-fit:cover; }
.gallery .span-2 img{ aspect-ratio:3/2; }
.gallery video{ width:100%; aspect-ratio:3/2; object-fit:cover; display:block; }

/* The double-width span only exists once there are columns to span. On a phone
   it's already full width, so the class does nothing there and needs nothing. */
@media (min-width:640px){
  .gallery .span-2{ grid-column:span 2; }
}
.section-intro{ max-width:var(--measure); }
.section-intro p{ margin-top:1rem; }

/* ================= VIDEO ================= */
.reel{ background:var(--hull); }
.reel-frame{
  position:relative; aspect-ratio:16/9; width:100%;
  margin-top:clamp(1.75rem,4vw,2.75rem);
  background:var(--ink); border:1px solid rgba(231,227,216,.14);
  display:grid; place-content:center; text-align:center; padding:1.5rem;
}
.reel-frame iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.reel-note{ color:var(--haze); font-size:.85rem; max-width:40ch; margin:0 auto; }
.reel-play{
  position:absolute; inset:0; width:100%; height:100%; padding:0;
  border:0; cursor:pointer; background:var(--ink) center/cover no-repeat;
  display:grid; place-items:center;
}
.reel-play::before{
  content:""; position:absolute; inset:0;
  background:rgba(14,32,41,.35); transition:background .2s ease;
}
.reel-play:hover::before{ background:rgba(14,32,41,.15); }
.reel-play span{
  position:relative; width:74px; height:74px; border-radius:50%;
  background:rgba(14,32,41,.55); border:1px solid var(--brass);
  display:grid; place-items:center; transition:background .2s ease;
}
.reel-play:hover span{ background:var(--brass); }
.reel-play span::after{
  content:""; width:0; height:0; margin-left:5px;
  border-left:20px solid var(--sand);
  border-top:12px solid transparent; border-bottom:12px solid transparent;
}
.reel-play:hover span::after{ border-left-color:var(--ink); }
.reel-note code{ color:var(--brass); }

/* ================= ABOUT ================= */
.about{ background:var(--hull); }
.about-grid{ display:grid; gap:clamp(2rem,5vw,4rem); max-width:52rem; margin:0 auto; }

/* ================= CONTACT ================= */
.contact{ background:var(--paper); color:var(--ink); text-align:center; }
.contact .masts{ justify-content:center; }
.contact p{ margin-inline:auto; }
.contact .quiet{ color:#5A6A70; }
.contact-actions{ display:flex; gap:.75rem; flex-wrap:wrap; justify-content:center; margin-top:2rem; }
.contact .btn-ghost{ color:var(--ink); border-color:rgba(14,32,41,.35); }
.contact .btn-ghost:hover{ background:var(--ink); color:var(--paper); }
.contact-detail{ margin-top:2.5rem; font-size:.9rem; color:#5A6A70; }
.contact-detail a{ color:var(--water); }

footer{ background:var(--ink); padding-block:2.5rem; font-size:.82rem; color:var(--haze); display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
footer a{ text-decoration:none; }
footer a:hover{ color:var(--sand); }

/* Gallery photo fade-in. The class is added by script, so if the script or the
   animation library fails to load, photos are simply visible. Video figures are
   never touched: a video that starts at opacity 0 loses its autoplay. */
.fade-ready{ opacity:0; }


/* ================= SERVICE CARDS (home) ================= */
.services{ background:var(--hull); }
.cards{
  display:grid; grid-template-columns:1fr; gap:.75rem; grid-auto-rows:1fr;
  margin-top:clamp(1.75rem,4vw,2.75rem);
}
@media (min-width:640px){ .cards{ grid-template-columns:repeat(2,1fr); } .card.wide{ grid-column:span 2; } }
@media (min-width:1080px){ .cards{ grid-template-columns:repeat(3,1fr); } }
.card{
  display:flex; flex-direction:column; text-decoration:none; background:var(--ink);
  border:1px solid rgba(231,227,216,.1); transition:border-color .2s ease;
}
.card:hover{ border-color:var(--brass); }
.card-img{ position:relative; flex:1 1 auto; min-height:15rem; overflow:hidden; }
.card-img img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.card:hover .card-img img{ transform:scale(1.03); }
.card-body{ padding:1.25rem 1.4rem 1.4rem; }
.card-body h3{ margin-bottom:.4rem; }
.card-body p{ color:var(--haze); font-size:.95rem; margin:0 0 .9rem; }
.card-meta{ display:flex; justify-content:space-between; align-items:baseline; gap:1rem; font-size:.85rem; }
.card-meta .from{ color:var(--haze); }
.card-meta .from b{ font-family:var(--display); font-weight:400; font-size:1.15rem; margin-left:.25rem; color:var(--sand); }
.card-meta .go{ color:var(--brass); font-weight:600; letter-spacing:.04em; }

/* ================= ABOUT TEASER (home) ================= */
.teaser{ background:var(--ink); }
.teaser-grid{ display:grid; gap:clamp(1.75rem,5vw,4rem); align-items:center; }
@media (min-width:860px){ .teaser-grid{ grid-template-columns:1fr 1fr; } }
.textlink{ color:var(--brass); text-decoration:none; font-weight:600; border-bottom:1px solid rgba(192,138,62,.5); padding-bottom:.1rem; }
.textlink:hover{ border-bottom-color:var(--brass); }

/* ================= PRICING (bottom of each service page) ================= */
.pricing{ background:var(--hull); }
.reel + .pricing{ background:var(--ink); }
.pricing .lede{ margin-top:1rem; }
.rates{ list-style:none; margin:clamp(1.75rem,4vw,2.75rem) 0 0; padding:0; max-width:46rem; border-top:1px solid rgba(143,166,172,.28); }
.rate{ display:grid; grid-template-columns:1fr auto; gap:.25rem 1.5rem; align-items:baseline; padding:1.15rem 0; border-bottom:1px solid rgba(143,166,172,.28); }
.rate small{ display:block; margin-top:.2rem; font-family:var(--body); font-size:.85rem; color:var(--haze); letter-spacing:0; }
.amount{ text-align:right; font-family:var(--display); font-size:clamp(1.3rem,1.15rem + .7vw,1.7rem); font-variant-numeric:tabular-nums; white-space:nowrap; }
.amount .from{ font-family:var(--body); font-size:.7rem; letter-spacing:.14em; text-transform:uppercase; color:var(--brass); margin-right:.5rem; font-weight:600; }
.amount .sub{ display:block; font-family:var(--body); font-size:.8rem; color:var(--haze); margin-top:.15rem; }
.fine{ margin:1.75rem 0 0; max-width:52ch; font-size:.9rem; color:var(--haze); }
@media (max-width:30rem){ .rate{ grid-template-columns:1fr; } .amount{ text-align:left; } }

/* ================= FOOTER NAV ================= */
footer{ align-items:center; }
.foot-nav{ display:flex; gap:1.1rem; flex-wrap:wrap; }

/* ABOUT: service links */
.svc-links{ list-style:none; margin:2rem auto 0; padding:0; max-width:52rem; border-top:1px solid rgba(231,227,216,.18); }
.svc-links a{ display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1.1rem .25rem; border-bottom:1px solid rgba(231,227,216,.18); color:var(--sand); text-decoration:none; font-family:"Fraunces",Georgia,serif; font-size:1.35rem; }
.svc-links a:hover, .svc-links a:focus-visible{ color:var(--brass); }
.svc-links .go{ color:var(--brass); font-family:"Archivo",system-ui,sans-serif; font-weight:600; }
