/* ==========================================================================
   Site shell — used by the published site (Cloudflare) and the local preview.
   Not needed on Squarespace, which provides these natively: page shell,
   header, mobile menu, sections with colour themes and content width.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #F7F6F2;
  color: #14263A;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: #14263A;
  color: #F7F6F2;
  border-radius: 3px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Sections (= Squarespace sections + colour themes) ---------- */
.sq-section {
  padding: clamp(4.5rem, calc(2.5rem + 6vw), 8.5rem) 0;
  position: relative;
  isolation: isolate;
}
.sq-section--tight { padding: clamp(3rem, calc(2rem + 3vw), 5rem) 0; }
.sq-section--hero { padding: clamp(3.5rem, calc(2rem + 5vw), 7rem) 0 clamp(4rem, calc(2rem + 5vw), 7rem); }
.sq-theme-light { background: #F7F6F2; }
.sq-theme-paper { background: #EFEDE6; }
.sq-theme-sand { background: #F2E7DC; }
.sq-theme-dark { background: #14263A; color: #F7F6F2; }
.sq-theme-deep { background: #0D1A28; color: #F7F6F2; }

.sq-container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 56px);
}

/* ---------- Header (= Squarespace native header) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 242, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgba(20, 38, 58, 0.12);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 1320px;
  height: 84px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 56px);
}
.site-logo { color: #14263A; text-decoration: none; margin-right: auto; }
.site-logo .ddn-wm__name { font-size: 1.4rem; }
.site-nav ul { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  position: relative;
  color: #14263A;
  text-decoration: none;
  font-size: 0.93rem;
  letter-spacing: 0.01em;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: #C58B64;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-header__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  background: #14263A;
  color: #F7F6F2;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.25s;
}
.site-header__cta:hover { background: #2A6870; }
.site-header__cta[aria-current="page"] { background: #2A6870; }

.site-burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(20, 38, 58, 0.2);
  border-radius: 50%;
  background: transparent;
  color: #14263A;
  cursor: pointer;
}
.site-burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 4px auto;
  background: currentColor;
  transition: transform 0.3s;
}
.site-burger[aria-expanded="true"] span:first-child { transform: translateY(2.75px) rotate(45deg); }
.site-burger[aria-expanded="true"] span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 72px 0 0 0;
  z-index: 49;
  padding: 2rem clamp(16px, 4vw, 56px) 3rem;
  background: #F7F6F2;
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(20, 38, 58, 0.14); }
.mobile-menu li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(20, 38, 58, 0.14);
  color: #14263A;
  text-decoration: none;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}
.mobile-menu li a small {
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 0.75rem;
  color: #5A6977;
  letter-spacing: 0.08em;
}
.mobile-menu .site-header__cta { margin-top: 2rem; width: 100%; justify-content: center; min-height: 52px; }

@media (max-width: 960px) {
  .site-header__inner { height: 72px; }
  .site-nav, .site-header__inner > .site-header__cta { display: none; }
  .site-burger { display: block; }
  body.menu-open { overflow: hidden; }
}

/* ---------- Footer shell ---------- */
.site-footer { padding: clamp(4rem, calc(2.5rem + 4vw), 6rem) 0 2.5rem; }

/* ---------- Contact form (shares class names with Squarespace) ---------- */
.sqs-block-form .field-list { margin: 0; padding: 0; border: 0; }
.sqs-block-form .form-item { display: block; }
.sqs-block-form .form-item .title { display: block; }
.sqs-block-form .field-error {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #A3402A;
}
.sqs-block-form .form-item.has-error .field-element { border-color: #A3402A !important; }
.sqs-block-form .form-status {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  color: #A3402A;
}
.sqs-block-form .form-status a { color: inherit; }
.sqs-block-form .form-button-wrapper button[disabled] { opacity: 0.7; cursor: progress; }
.sqs-block-form .form-honeypot { display: none !important; }

/* ---------- About / contact layout (= Fluid Engine grid in Squarespace) ---------- */
.sq-grid-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
}
@media (min-width: 900px) {
  .sq-grid-about { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(3rem, 7vw, 7rem); }
}
.sq-grid-about .ddn-portrait { max-width: 520px; }
.sq-grid-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
@media (min-width: 960px) {
  .sq-grid-contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(3rem, 6vw, 6rem); }
}

/* ---------- Scroll reveal (local JS only; Squarespace uses native animations) ---------- */
.ddn-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ddn-js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ddn-js [data-reveal] { opacity: 1; transform: none; transition: none; }
}
