/* ============================================================
   hirendesign — site base and shared chrome (v1)

   Loaded on every page, after design-system/tokens.css:
     <link rel="stylesheet" href="design-system/tokens.css">
     <link rel="stylesheet" href="site.css">

   Holds: base styles, wordmark, nav dock, page foot, button.
   Rule for chrome: it stays quiet. It never competes with the
   page's main content (on the home page, the hero).
   ============================================================ */

*,*::before,*::after{box-sizing:border-box;corner-shape:var(--corner)}
html{font-synthesis-weight:none;-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-text);
  -webkit-font-smoothing:antialiased;
  /* short pages keep the page foot at the bottom of the window */
  display:flex;
  flex-direction:column;
  min-height:100svh;
}
body > main{flex:1 0 auto}
a{color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:4px}

/* ---------------- wordmark ----------------
   One word. "hiren" recedes, "design" is what remains. */
.wordmark{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  font:500 18px/1 var(--font-text);
  letter-spacing:-.03em;
  color:var(--ink);
  text-decoration:none;
  white-space:nowrap;
}
.wordmark__muted{color:var(--ink-3)}

/* ---------------- button ---------------- */
.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 var(--space-4);
  font:500 var(--text-ui)/1 var(--font-text);
  color:var(--on-ink);
  background:var(--ink);
  border:1px solid var(--ink);
  border-radius:var(--radius);
  text-decoration:none;
  cursor:pointer;
  transition:background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.button:hover{background:var(--ink-2);border-color:var(--ink-2)}
.button--quiet{color:var(--ink);background:transparent;border-color:var(--line)}
.button--quiet:hover{background:var(--sunk);border-color:var(--line)}

/* ---------------- nav dock ----------------
   The site's navigation floats at the bottom centre of the window on
   every page, so the top of the page stays empty for the content.
   It is first in the markup (keyboard and screen readers reach it
   first) and fixed in place visually. Frosted glass, like the hero's
   cards: it reads over the hero, the work screens and plain page alike.
   Work leads the links: it carries the number of case studies and is
   marked while you are in the Work section or reading a case study. */
.site-header{
  position:fixed;
  left:50%;
  bottom:var(--space-4);
  transform:translateX(-50%);
  z-index:50;
  display:flex;
  align-items:center;
  gap:var(--space-4);
  max-width:calc(100vw - var(--space-4) * 2);
  padding:var(--space-1) var(--space-1) var(--space-1) var(--space-3);
  /* the same box as the page-foot fields and the theme switch */
  background:color-mix(in srgb, var(--surface) 60%, transparent);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border:1px solid var(--line);
  border-radius:var(--radius-nested);
}
.site-header .wordmark{position:relative;min-height:40px;font-size:18px}
.site-header .wordmark::after{content:"";position:absolute;inset:-2px 0}
.site-nav{
  display:flex;
  align-items:center;
  gap:var(--space-1);
}
.site-nav__link,
.theme-toggle{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:var(--space-2);
  min-height:40px;
  padding:0 var(--space-3);
  font:400 var(--text-ui)/1 var(--font-text);
  color:var(--ink-2);
  background:none;
  border:0;
  border-radius:4px;
  text-decoration:none;
  white-space:nowrap;
  cursor:pointer;
  transition:color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
/* items are 40px boxes; this keeps each tap area 44px tall */
.site-nav__link::after,
.site-header .button::after{content:"";position:absolute;inset:-2px 0}
.site-nav__link{font-size:16px}
.site-nav__link:hover,
.theme-toggle:hover{color:var(--ink);background:var(--sunk)}
.site-nav__link[aria-current]{color:var(--ink);background:var(--sunk)}
.site-nav__work{color:var(--ink);font-weight:500}
.site-nav__count{
  display:inline-grid;
  place-items:center;
  min-width:18px;
  height:18px;
  padding:0 4px;
  font:500 11px/1 var(--font-text);
  color:var(--on-ink);
  background:var(--ink);
  border-radius:3px;
}
.site-header .button{
  position:relative;
  min-height:40px;
  padding:0 var(--space-4);
  font-size:16px;
  font-weight:400;
  border-radius:4px;
  white-space:nowrap;
}

/* theme switch: an icon on its own at the top right of every page, drawn
   like the page-foot fields (36px box, thin border, light tint), lined up
   with the page edge. A transparent margin keeps the tap area at 44px. */
.theme-switch{
  position:fixed;
  top:var(--space-4);
  right:var(--pad);
  z-index:50;
  justify-content:center;
  width:36px;
  min-height:36px;
  height:36px;
  padding:0;
  color:var(--ink);
  background:color-mix(in srgb, var(--surface) 60%, transparent);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border:1px solid var(--line);
  border-radius:var(--radius-nested);
}
.theme-switch::after{content:"";position:absolute;inset:-4px}
.theme-switch svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.theme-switch__sun,
.theme-switch[data-next="light"] .theme-switch__moon{display:none}
.theme-switch[data-next="light"] .theme-switch__sun{display:block}
[data-theme-lock] .theme-toggle{display:none}

/* Phones: the dock holds the wordmark, two links and the call button. */
@media (max-width:520px){
  .site-header{gap:var(--space-1);padding-left:var(--space-2)}
  .site-header .wordmark{font-size:15px}
  .site-nav{gap:0}
  .site-nav__link{gap:6px;padding:0 var(--space-2)}
  .site-nav__count{min-width:18px;height:18px;padding:0 4px}
  .site-header .button{padding:0 var(--space-3)}
}
/* Small phones: "Book a call" shortens to "Book" so the dock fits. */
@media (max-width:400px){
  .site-header{max-width:calc(100vw - var(--space-3) * 2);padding-left:var(--space-2)}
  .site-header .wordmark{font-size:14px}
  .site-header__long{display:none}
}
@media (max-width:340px){
  .site-nav__link{padding:0 var(--space-1)}
  .site-header .button{padding:0 var(--space-2)}
}

/* ---------------- page foot ----------------
   After cobloc.archi: no footer block, just two small boxed fields in the
   bottom corners, text on the left and an icon on the right. At the end of
   the page they line up with the nav dock (dock: 16px off the bottom, 50px
   tall; a field is 36px), so the last line reads field · dock · field.
   Narrower windows keep extra room under them to clear the dock. */
.site-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--space-2);
  padding:var(--space-5) var(--pad) calc(var(--space-6) + 76px);
}
.foot-chip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--space-4);
  width:min(240px, 50%);
  min-height:36px;
  margin:0;
  padding:0 var(--space-2) 0 var(--space-3);
  font:400 var(--text-small)/1 var(--font-text);
  color:var(--ink-2);
  background:color-mix(in srgb, var(--surface) 60%, transparent);
  border:1px solid var(--line);
  border-radius:var(--radius-nested);
  white-space:nowrap;
  text-decoration:none;
}
.foot-chip svg{flex:none;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.foot-chip--link{
  font-size:var(--text-label);
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--ink);
  transition:background-color var(--dur-1) var(--ease);
}
.foot-chip--link:hover{background:var(--sunk)}
.foot-chip--link{position:relative}
.foot-chip--link::after{content:"";position:absolute;inset:-4px 0}   /* 44px tap area */
@media (min-width:1080px){
  .site-footer{padding-bottom:calc(var(--space-4) + 7px)}
}
@media (max-width:520px){
  .foot-chip{gap:var(--space-2);padding:0 var(--space-2);font-size:13px}
}
@media (max-width:360px){
  .foot-chip svg{display:none}
}

@media (prefers-reduced-motion:reduce){
  .button,.site-nav__link,.theme-toggle,.foot-chip--link{transition:none}
}
