/* ==========================================================================
   Dyason Developments — navigation
   A deliberately simple nav: flat links, one small dropdown each, no panels.
   Mirrors the pre-migration site's structure.

   Type scale: the row carries nine items plus a phone number and a button, so
   rather than one fixed size the header steps — it takes the largest setting
   that width can hold. Each step brings the tracking, the gaps, the logo and
   the dropdown down with it, so the header keeps its proportions at every size.
   Measured free space is at least 14px at any width from 1024px up.
   ========================================================================== */

/* ---------- desktop header ---------- */
header.nav{
  position:fixed;top:0;left:0;right:0;z-index:60;
  background:rgba(18,20,16,.0);
  transition:background .35s ease,box-shadow .35s ease;
}
header.nav.is-stuck{
  background:rgba(18,20,16,.96);
  box-shadow:0 1px 0 rgba(244,241,234,.10);
}
header.nav .wrap{display:flex;align-items:center;gap:22px;
  padding-top:26px;padding-bottom:26px;transition:padding .3s ease}
header.nav.is-stuck .wrap{padding-top:15px;padding-bottom:15px}

/* the page's own stylesheet carries a `.brand img{height:34px}` rule and is
   linked after this file, so these selectors are qualified with `header.nav`
   to win on specificity rather than on source order */
.brand{display:flex;align-items:center;flex:0 0 auto;text-decoration:none}
header.nav .brand img{height:45px;width:auto;display:block;transition:height .3s ease}
header.nav.is-stuck .brand img{height:36px}
header.nav .brand .logo-ink{display:none}
header.nav.is-light .brand .logo-white{display:none}
header.nav.is-light .brand .logo-ink{display:block}

/* ---------- flat link row ---------- */
nav.links{display:flex;align-items:center;gap:15px;margin-left:auto}
nav.links > .item{position:relative}
nav.links > .item > a{
  display:inline-flex;align-items:center;gap:8px;
  font-size:14px;letter-spacing:.11em;text-transform:uppercase;
  color:rgba(244,241,234,.80);text-decoration:none;
  padding:9px 0;white-space:nowrap;
  border-bottom:1px solid transparent;
  transition:color .2s ease,border-color .2s ease;
}
header.nav.is-light nav.links > .item > a{color:rgba(26,29,23,.78)}
nav.links > .item > a:hover,
nav.links > .item.is-open > a{color:#fff;border-bottom-color:rgba(244,241,234,.5)}
header.nav.is-light nav.links > .item > a:hover,
header.nav.is-light nav.links > .item.is-open > a{color:var(--ink);border-bottom-color:var(--ink)}

/* small caret */
nav.links .caret{
  width:7px;height:7px;margin-top:-2px;
  border-right:1px solid currentColor;border-bottom:1px solid currentColor;
  transform:rotate(45deg);opacity:.7;transition:transform .25s ease;
}
nav.links > .item.is-open .caret{transform:rotate(-135deg);margin-top:4px}

/* ---------- small dropdown (one column, no panel) ---------- */
nav.links .sub{
  position:absolute;top:calc(100% + 16px);left:-18px;min-width:268px;
  background:var(--ink);border:1px solid rgba(244,241,234,.14);
  padding:14px 0;
  opacity:0;visibility:hidden;transform:translateY(-6px);
  transition:opacity .18s ease,transform .18s ease,visibility .18s;
  box-shadow:0 24px 48px -18px rgba(0,0,0,.55);
}
nav.links > .item.is-open .sub{opacity:1;visibility:visible;transform:translateY(0)}
nav.links .sub a{
  display:block;padding:11px 24px;
  font-size:14px;letter-spacing:.02em;text-transform:none;
  color:rgba(244,241,234,.76);text-decoration:none;
  transition:color .15s ease,background .15s ease;
}
nav.links .sub a:hover{color:#fff;background:rgba(244,241,234,.06)}
nav.links .sub a .r{display:block;font-size:11.5px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--sage-lt);margin-top:4px}

/* ---------- mobile chrome ---------- */
.topbar{display:none;position:fixed;top:0;left:0;right:0;z-index:70;
  align-items:center;justify-content:space-between;
  padding:14px var(--gut);background:rgba(18,20,16,.96)}
.topbar img{height:32px;width:auto;display:block}
.topbar .logo-ink{display:none}
.burger{width:44px;height:44px;border:1px solid rgba(244,241,234,.30);
  background:transparent;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:5px;cursor:pointer;padding:0}
.burger span{display:block;width:18px;height:1px;background:var(--bone);
  transition:transform .25s ease,opacity .2s ease}
.burger.is-open span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.burger.is-open span:nth-child(2){opacity:0}
.burger.is-open span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}

/* ---------- mobile drawer ---------- */
.drawer{position:fixed;inset:0;z-index:80;visibility:hidden;pointer-events:none}
.drawer.is-open{visibility:visible;pointer-events:auto}
.drawer .scrim{position:absolute;inset:0;background:rgba(10,12,8,.55);opacity:0;
  transition:opacity .3s ease}
.drawer.is-open .scrim{opacity:1}
.drawer .panel{
  position:absolute;top:0;right:0;bottom:0;width:min(88vw,400px);
  background:var(--bone);display:flex;flex-direction:column;
  transform:translateX(100%);transition:transform .34s cubic-bezier(.32,.72,0,1);
  overflow-y:auto;
}
.drawer.is-open .panel{transform:translateX(0)}
.drawer .dhead{display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px;border-bottom:1px solid var(--line);flex:0 0 auto}
.drawer .dhead img{height:32px;width:auto;display:block}
.drawer .dclose{width:38px;height:38px;border:1px solid var(--line);
  background:transparent;cursor:pointer;position:relative}
.drawer .dclose::before,
.drawer .dclose::after{content:'';position:absolute;top:50%;left:50%;
  width:15px;height:1px;background:var(--ink)}
.drawer .dclose::before{transform:translate(-50%,-50%) rotate(45deg)}
.drawer .dclose::after{transform:translate(-50%,-50%) rotate(-45deg)}

.drawer .dnav{padding:8px 0;flex:1 1 auto}
.drawer .ditem{border-bottom:1px solid var(--line)}
.drawer .ditem > a,
.drawer .ditem > button{
  display:flex;align-items:center;justify-content:space-between;width:100%;
  padding:17px 22px;background:transparent;border:0;cursor:pointer;text-align:left;
  font-family:var(--serif);font-size:21px;font-weight:400;color:var(--ink);
  text-decoration:none;
}
.drawer .ditem > button .pm{position:relative;width:13px;height:13px;flex:0 0 auto}
.drawer .ditem > button .pm::before,
.drawer .ditem > button .pm::after{content:'';position:absolute;background:var(--stone);top:50%;left:0;
  width:13px;height:1px;transform:translateY(-50%)}
.drawer .ditem > button .pm::after{transform:translateY(-50%) rotate(90deg);
  transition:transform .25s ease,opacity .2s ease}
.drawer .ditem.is-open > button .pm::after{transform:translateY(-50%) rotate(0);opacity:0}
.drawer .dsub{display:none;padding:2px 0 16px}
.drawer .ditem.is-open .dsub{display:block}
.drawer .dsub a{display:block;padding:9px 22px 9px 34px;
  font-size:15px;color:var(--stone);text-decoration:none}
.drawer .dsub a:hover{color:var(--ink)}

.drawer .dfoot{flex:0 0 auto;padding:20px 22px 26px;
  border-top:1px solid var(--line);background:var(--bone-2)}
.drawer .dfoot .btn{display:block;text-align:center;margin-bottom:10px}
.drawer .dfoot .tel{margin-top:16px;font-size:14px;color:var(--stone);text-align:center;
  letter-spacing:.04em}
body.drawer-lock{overflow:hidden}

/* ---------- responsive ----------
   The row is stepped down as the laptop narrows, so the type stays as large as
   the available width allows. Tracking, gaps, logo and button follow each step
   so the proportions hold. */
@media (max-width:1365px){
  header.nav .wrap{gap:18px}
  header.nav .brand img{height:42px}
  nav.links{gap:13px}
  nav.links > .item > a{font-size:13px;letter-spacing:.10em}
  nav.links .sub a{font-size:13px}
      }
@media (max-width:1279px){
  header.nav .wrap{gap:15px}
  header.nav .brand img{height:38px}
  nav.links{gap:9px}
  nav.links > .item > a{font-size:12.5px;letter-spacing:.09em}
  nav.links .sub a{font-size:12.5px}
      }
@media (max-width:1199px){
  header.nav .wrap{gap:13px}
  header.nav .brand img{height:35px}
  nav.links{gap:7px}
  nav.links > .item > a{font-size:12px;letter-spacing:.085em}
  nav.links .sub a{font-size:12px}
      }
@media (max-width:1120px){
  header.nav .wrap{gap:13px}
  header.nav .brand img{height:34px}
  nav.links{gap:8px}
  nav.links > .item > a{font-size:11.5px;letter-spacing:.075em}
  nav.links .sub a{font-size:11.5px}
      }
/* On a phone the five section links sit across the top of the page, so the section is always
   visible without opening anything. The drawer stays in the markup but its button is retired,
   and the desktop row is untouched because none of this applies above 960px. */
/* the land label reads in full on wider screens and in short form on a phone */
.nl-wide{display:inline}.nl-narrow{display:none}
@media (max-width:960px){
  .topbar{display:none}
  .burger{display:none}
  header.nav{
    display:block;
    padding:8px 0 0;
  }
  header.nav .wrap{
    display:flex;flex-direction:column;align-items:center;
    gap:7px;padding:0 8px 9px;
  }
  header.nav .brand img{height:24px}
  header.nav.is-stuck .brand img{height:22px}
  nav.links{
    margin-left:0;width:100%;
    justify-content:center;flex-wrap:nowrap;gap:0;
  }
  .nl-wide{display:none}.nl-narrow{display:inline}
  nav.links > .item > a{
    font-size:8.8px;letter-spacing:.015em;
    padding:6px 1px 7px;gap:0;
  }

  /* the dropdown is suppressed here, so the caret has nothing to announce */
  nav.links .caret{display:none}
  /* narrower phones need a touch less again */
  @media (max-width:380px){
    nav.links > .item > a{font-size:8px;letter-spacing:0}
  }
  /* the drawer is unreachable here; its off-screen panel was adding page width */
  .drawer{display:none}
  /* a dropdown has nowhere to go on a phone: the section link itself carries the tap */
  nav.links .sub{display:none}
  header.nav .wrap{padding-left:8px;padding-right:8px}
}
  .topbar{display:none}
}

/* a hero with no standfirst should not reserve the space for one */
.phero-sub:empty{display:none}

/* ---------- social links in the footer ---------- */
/* On the stacked footer the icons fall naturally between the logo and the address, because
   that is their order in the markup. */
@media (min-width:861px) and (max-width:1100px){.f-social{grid-column:1 / -1;margin:2px 0 0}}
.f-social{display:flex;align-items:center;gap:14px;margin:0}
.f-social a{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;
  border:1px solid rgba(255,255,255,.28);border-radius:50%;color:rgba(255,255,255,.78);
  transition:border-color .25s ease,color .25s ease,background-color .25s ease}
.f-social a:hover,.f-social a:focus-visible{border-color:var(--brass,#a98b52);color:#fff;background-color:rgba(255,255,255,.07)}
.f-social svg{width:19px;height:19px;fill:currentColor;display:block}
@media (max-width:860px){.f-social{gap:12px;margin:22px 0}.f-social a{width:38px;height:38px}
  .f-social svg{width:18px;height:18px}}

/* ---------- header contact pair: phone only, home page only ---------- */
.nav-contact{display:none;align-items:center;gap:16px;flex:0 0 auto}
.nav-contact a{
  display:inline-flex;align-items:center;gap:8px;
  font-size:12.5px;letter-spacing:.02em;text-decoration:none;
  color:rgba(244,241,234,.78);white-space:nowrap;
  transition:color .2s ease;
}
.nav-contact a:hover{color:#fff}
.nav-contact svg{width:14px;height:14px;fill:currentColor;flex:0 0 auto;display:block}
header.nav.is-light .nav-contact a{color:rgba(26,29,23,.78)}
header.nav.is-light .nav-contact a:hover{color:var(--ink)}
/* the pair rides at the top right on a phone, clear of the centred mark; the desktop header keeps
   its section links alone */
@media (max-width:960px){
  body.home header.nav .nav-contact{
    display:flex;position:absolute;right:15px;top:17px;gap:15px;
  }
  body.home .nav-contact .nc-num,
  body.home .nav-contact .nc-mail{display:none}
  body.home .nav-contact svg{width:17px;height:17px}
}

/* Mobile Developments dropdown: keep the existing six-heading row unchanged. */
@media(max-width:960px){
  header.nav nav.links > .item:has(.sub){position:relative}
  header.nav nav.links > .item:has(.sub) > a{position:relative}
  header.nav nav.links > .item:has(.sub) > a::after{
    content:'';position:absolute;left:50%;bottom:1px;width:4px;height:4px;
    border-right:1px solid currentColor;border-bottom:1px solid currentColor;
    transform:translateX(-50%) rotate(45deg);
  }
  header.nav nav.links > .item.is-open > a::after{transform:translateX(-50%) rotate(-135deg)}
  header.nav nav.links .sub{
    display:block;top:calc(100% + 8px);left:-12px;right:auto;min-width:0;width:200px;
    max-width:calc(100vw - 24px);padding:4px 0;
    max-height:calc(100dvh - 100px);overflow-y:auto;
    box-shadow:0 12px 24px -12px rgba(0,0,0,.45);
  }
  header.nav nav.links .sub a{
    padding:12px 14px;font-size:11.5px;line-height:1.4;letter-spacing:.04em;
    text-transform:uppercase;white-space:normal;min-height:44px;
  }
  header.nav nav.links .sub .r{display:none}
}
