/* ==========================================================================
   M/s. Jolly Enterprise — shared stylesheet for every page.
   Colours, type and spacing are set once here in the tokens below.
   ========================================================================== */

:root {
  --paper:       #F7F3EC;
  --paper-deep:  #EAE1D1;
  --ink:         #1A1613;
  --ink-soft:    #5C544B;
  --petrol:      #0C4A61;
  --petrol-deep: #08313F;
  --gold:        #A8802B;
  --gold-light:  #C9A227;

  --display: "Cormorant Garamond", Georgia, serif;
  --text:    "Jost", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --page-max: 1440px;
  --gold-rule: 1px solid rgba(168, 128, 43, 0.45);
  --ink-rule:  1px solid rgba(26, 22, 19, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, .ser {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 1.3em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }
[hidden] { display: none !important; }

.shell { max-width: var(--page-max); margin: 0 auto; padding-inline: var(--gutter); }
.grid12 { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(1rem, 2.2vw, 2.25rem); }
.rule-gold { height: 1px; background: rgba(168, 128, 43, 0.45); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 0.75rem; z-index: 30; background: var(--petrol-deep); color: var(--paper); padding: 0.6rem 1rem; }

/* ------------------------------------------------------------- top strip - */

.topbar {
  background: var(--petrol-deep);
  color: rgba(247, 243, 236, 0.75);
  font-size: 0.7rem;
  letter-spacing: 0.11em;
}
.topbar > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
}

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

.masthead { text-align: center; padding-top: clamp(1.25rem, 3vw, 2rem); }
.masthead__logo { height: clamp(64px, 8vw, 104px); width: auto; display: inline-block; }

.logo-slot { display: inline-block; border: var(--gold-rule); padding: 0.7rem 1.3rem; line-height: 1.2; }
.logo-slot span { display: block; font-family: var(--display); font-size: 1.9rem; color: var(--petrol); }

.nav { margin-top: clamp(1rem, 2.4vw, 1.6rem); border-top: var(--gold-rule); border-bottom: var(--ink-rule); }
.nav__list {
  list-style: none; margin: 0; padding: 0.75rem 0;
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: clamp(1.2rem, 3vw, 2.4rem);
}
.nav__link {
  font-size: 0.8rem; letter-spacing: 0.1em; padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav__link:hover { color: var(--petrol); border-bottom-color: var(--gold-light); }
.nav__link[aria-current="page"] { color: var(--petrol); border-bottom-color: var(--petrol); }

.nav__toggle {
  display: none; width: 100%; background: none; border: 0;
  font-family: var(--text); font-size: 0.78rem; letter-spacing: 0.1em;
  color: var(--ink); padding: 0.7rem 0; cursor: pointer;
  align-items: center; justify-content: center; gap: 0.6rem;
}
.nav__toggle i { display: block; width: 18px; height: 1px; background: var(--ink); }

/* ----------------------------------------------------------- image slots - */

.frame {
  position: relative; margin: 0; overflow: hidden;
  background: var(--paper-deep);
  display: flex; align-items: center; justify-content: center;
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame__slot {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.66rem; letter-spacing: 0.15em; color: var(--gold);
  text-align: center; padding: 1rem;
}
.frame__slot::before, .frame__slot::after,
.frame__slot i::before, .frame__slot i::after {
  content: ""; position: absolute; width: 13px; height: 13px;
  border: 1px solid rgba(168, 128, 43, 0.55);
}
.frame__slot::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.frame__slot::after  { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.frame__slot i::before { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.frame__slot i::after  { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.frame img ~ .frame__slot { display: none; }

.ratio-32 { aspect-ratio: 3 / 2; }
.ratio-45 { aspect-ratio: 4 / 5; }
.ratio-11 { aspect-ratio: 1 / 1; }
.ratio-169 { aspect-ratio: 16 / 9; }
.ratio-34 { aspect-ratio: 3 / 4; }

.caption { font-size: 0.72rem; letter-spacing: 0.05em; color: var(--ink-soft); margin-top: 0.55rem; }

/* ------------------------------------------------------------------ main - */

main { display: flex; flex-direction: column; }
.band { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; }
.hero__panel {
  background: var(--petrol-deep); color: var(--paper);
  padding: clamp(2.25rem, 5vw, 4rem) var(--gutter);
  display: flex; flex-direction: column; justify-content: center;
}
.hero__title { font-size: clamp(2.1rem, 4.6vw, 3.6rem); color: var(--paper); }
.hero__panel .rule-gold { width: 54px; margin: 1.3rem 0 1.1rem; background: var(--gold-light); }
.hero__panel p { font-size: 0.88rem; color: rgba(247, 243, 236, 0.74); max-width: 22rem; }
.hero__image { min-height: clamp(300px, 40vw, 460px); }

/* Credentials */
.creds { border-bottom: var(--ink-rule); padding-block: 1rem; }
.creds ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
  gap: 1.1rem;
  font-family: var(--display); font-style: italic; font-size: 1.05rem; color: var(--petrol);
}
.creds li + li::before {
  content: ""; display: inline-block; width: 5px; height: 5px;
  background: var(--gold-light); transform: rotate(45deg); margin-right: 1.1rem;
  vertical-align: middle;
}

/* Profile */
.profile { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); }
.profile__rule { flex: none; width: 44px; }
.profile__rule div { height: 1px; background: rgba(168, 128, 43, 0.45); margin-top: 0.9rem; }
.profile__body { max-width: 60ch; font-size: 0.95rem; }
.profile__lede { font-family: var(--display); font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.45; letter-spacing: 0; margin-bottom: 1.4em; }
.drop {
  float: left; font-family: var(--display); color: var(--gold);
  font-size: 3.9em; line-height: 0.72; padding: 0.09em 0.14em 0 0;
}

/* Featured */
.featured { row-gap: clamp(1.5rem, 3.5vw, 2.5rem); }
.featured figure { margin: 0; }
.featured__a { grid-column: 1 / 8; position: relative; }
.featured__a .offset-rule { position: absolute; left: -10px; top: -10px; right: 26px; bottom: 26px; border: var(--gold-rule); pointer-events: none; }
.featured__b { grid-column: 9 / 13; margin-top: clamp(1.5rem, 4vw, 3rem); }
.featured__c { grid-column: 2 / 6; }
.featured__d { grid-column: 7 / 13; margin-top: clamp(-2.5rem, -2.5vw, -1rem); }

/* Category plates */
.plates { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.2vw, 1.6rem); align-items: start; }
.plate--2 { margin-top: clamp(1rem, 3vw, 2.5rem); }
.plate--3 { margin-top: clamp(2rem, 6vw, 5rem); }
.plate__mat { padding: 9px; border: var(--gold-rule); transition: border-color 0.25s ease; }
.plate:hover .plate__mat { border-color: var(--gold-light); }
.plate__name { display: block; font-family: var(--display); font-size: clamp(1.25rem, 2vw, 1.5rem); margin-top: 0.9rem; }
.plate__line { display: block; height: 1px; width: 36px; background: var(--gold-light); margin: 0.65rem 0; transition: width 0.35s ease; }
.plate:hover .plate__line { width: 100%; }
.plate__note { display: block; font-size: 0.8rem; color: var(--ink-soft); line-height: 1.65; }

/* Enquiry band */
.enquiry {
  background: var(--petrol-deep); color: var(--paper);
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
}
.enquiry > div { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.enquiry h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--paper); }
.enquiry p { font-size: 0.85rem; color: rgba(247, 243, 236, 0.72); max-width: 20rem; margin: 0.7rem 0 0; }
.enquiry__lines { font-size: 0.85rem; line-height: 2; color: var(--gold-light); text-align: right; }

/* ---------------------------------------------------------- inner pages - */

.pagehead { padding-block: clamp(2.25rem, 5vw, 3.75rem) clamp(1.5rem, 3vw, 2.25rem); }
.pagehead h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.pagehead .rule-gold { width: 54px; margin: 1.1rem 0 1.1rem; }
.pagehead p { max-width: 44ch; font-size: 0.92rem; color: var(--ink-soft); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(0.6rem, 1.4vw, 1.1rem); }
.gallery { align-items: start; }
.gallery .frame { aspect-ratio: 1 / 1; cursor: pointer; }
.gallery .frame__slot { font-size: 0.6rem; letter-spacing: 0.1em; }

.note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 2rem; max-width: 46ch; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); }
.contact h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-bottom: 1rem; }
.contact dl { margin: 0; border-top: var(--gold-rule); }
.contact dl > div { padding: 1.15rem 0; border-bottom: var(--ink-rule); }
.contact dt { font-size: 0.7rem; letter-spacing: 0.13em; color: var(--gold); margin-bottom: 0.3rem; }
.contact dd { margin: 0; font-size: 0.95rem; line-height: 1.6; }
.contact dd a { color: var(--petrol); border-bottom: 1px solid rgba(168, 128, 43, 0.4); }
.contact dd a:hover { border-bottom-color: var(--petrol); }

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

.footer { padding-block: clamp(2rem, 4vw, 3rem) 1.5rem; font-size: 0.8rem; color: var(--ink-soft); }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: clamp(1.25rem, 3vw, 2rem); }
.footer__name { font-family: var(--display); font-size: 1.2rem; color: var(--ink); margin-bottom: 0.5rem; }
.footer ul { list-style: none; margin: 0; padding: 0; line-height: 2.1; }
.footer a:hover { color: var(--petrol); }
.footer__base {
  margin-top: clamp(1.5rem, 3vw, 2.5rem); padding-top: 0.9rem; border-top: var(--ink-rule);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.68rem; letter-spacing: 0.08em;
}

/* -------------------------------------------------------------- lightbox - */

.lightbox {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(8, 49, 63, 0.94);
  display: flex; align-items: center; justify-content: center; padding: 4vh 4vw;
}
.lightbox img { max-width: 100%; max-height: 92vh; width: auto; height: auto; }
.lightbox button {
  background: none; border: 0; color: var(--paper);
  font-family: var(--text); cursor: pointer;
}
.lightbox__close {
  position: absolute; top: 1.2rem; right: 1.4rem;
  font-size: 0.8rem; letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(247, 243, 236, 0.35) !important;
  padding-bottom: 2px;
}
.lightbox__close:hover { border-bottom-color: var(--gold-light) !important; }
.lightbox__step {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 2.4rem; line-height: 1; padding: 0.6rem 0.9rem;
  color: rgba(247, 243, 236, 0.7); transition: color 0.25s ease;
}
.lightbox__step:hover { color: var(--gold-light); }
.lightbox__step--prev { left: max(0.5rem, 2vw); }
.lightbox__step--next { right: max(0.5rem, 2vw); }
.lightbox__count {
  position: absolute; bottom: 1.3rem; left: 0; right: 0; margin: 0;
  text-align: center; font-size: 0.72rem; letter-spacing: 0.16em;
  color: rgba(247, 243, 236, 0.6);
}
@media (max-width: 620px) {
  .lightbox__step { font-size: 1.9rem; padding: 0.4rem 0.5rem; }
}

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

@media (max-width: 1000px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .nav__list { display: none; flex-direction: column; align-items: center; gap: 0.9rem; padding-bottom: 1.2rem; }
  .nav__list.is-open { display: flex; }
  .nav__toggle { display: flex; }

  .hero { grid-template-columns: 1fr; }
  .hero__image { order: -1; min-height: 250px; }
  .hero__panel { padding-block: 1.75rem; }

  .creds ul { flex-direction: column; gap: 0.1rem; font-size: 0.95rem; }
  .creds li + li::before { display: none; }

  .profile__rule { display: none; }

  .featured { grid-template-columns: 1fr 1fr; }
  .featured__a, .featured__b, .featured__c, .featured__d { grid-column: auto; margin-top: 0; }
  .featured__a .ratio-32, .featured__b .ratio-34 { aspect-ratio: 4 / 5; }
  .featured__b { margin-top: 1.6rem; }
  .featured__c, .featured__d { grid-column: 1 / 3; }
  .featured__c .ratio-11 { aspect-ratio: 16 / 9; }
  .featured__a .offset-rule { display: none; }

  .plates { grid-template-columns: 1fr; }
  .plate--2, .plate--3 { margin-top: 0; }

  .enquiry__lines { text-align: left; }

  .contact { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }

  .gallery { grid-template-columns: repeat(2, 1fr); }

  /* Photographs come before the written profile on a phone. */
  .s-hero  { order: 1; }
  .s-feat  { order: 2; }
  .s-creds { order: 3; }
  .s-prof  { order: 4; }
  .s-plates{ order: 5; }
  .s-enq   { order: 6; }
}

@media (max-width: 480px) {
  .topbar > div { flex-direction: column; gap: 0.1rem; text-align: center; align-items: center; }
  .gallery .frame { aspect-ratio: 1 / 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------ photographs on scroll - */
/* The .reveal class is added by site.js, so the images stay visible
   if JavaScript is off. */

.frame.reveal { opacity: 0; transition: opacity 0.9s ease; }
.frame.reveal img {
  filter: blur(16px);
  transform: scale(1.06);
  transition: filter 1.1s cubic-bezier(0.2, 0.6, 0.2, 1),
              transform 1.4s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.frame.reveal.is-in { opacity: 1; }
.frame.reveal.is-in img { filter: blur(0); transform: none; }

@media (prefers-reduced-motion: reduce) {
  .frame.reveal, .frame.reveal img { opacity: 1; filter: none; transform: none; }
}


/* -------------------------------------------------- typographic detail - */
/* Italic second line in the hero title. */
.hero__title em { font-style: italic; font-weight: 300; }

/* Gold rule broken by a small lozenge, echoing the marks in the logo. */
.ornament { display: flex; align-items: center; gap: 0.85rem; }
.ornament i { flex: 1; height: 1px; background: rgba(168, 128, 43, 0.45); }
.ornament span {
  flex: none; width: 6px; height: 6px;
  background: var(--gold-light); transform: rotate(45deg);
}

/* Opening letter of the profile, set in the display face. */
.profile__lede .drop { color: var(--gold); }
