/* ============================================================
   AKAM — site chrome: header, menu overlay, footer
   Ported from akam.au/styles.css
   ============================================================ */

/* ---------- Top bar ---------- */
.e-con.topbar,
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad-x);
  color: var(--fg);
  background: rgba(248, 247, 244, 0.78);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid rgba(19, 22, 24, 0.06);
  width: 100%;
  max-width: none;
}
.topbar > .elementor-widget { width: auto; }

.topbar .brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
}
/* 28px tall / ~98px wide, matching the live site's inline SVG height */
.topbar .brand svg { height: 28px; width: auto; fill: currentColor; display: block; }

/* The parent theme styles all <button>; these need to beat it. */
.topbar button.menu-trigger,
.menu-overlay button.menu-close,
.menu-trigger {
  font-family: var(--mono);
  font-size: 14px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
}
.topbar button.menu-trigger:hover,
.topbar button.menu-trigger:focus {
  background: none;
  border: 0;
  color: inherit;
  box-shadow: none;
}
.menu-overlay button.menu-close:hover,
.menu-overlay button.menu-close:focus {
  background: none;
  border: 0;
  color: var(--white);
  box-shadow: none;
}

.menu-trigger .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* The fixed bar would otherwise sit on top of the first section */
body:not(.elementor-editor-active) .site-main,
body:not(.elementor-editor-active) main { padding-top: 0; }

/* ---------- Menu overlay ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--black);
  color: var(--white);
  display: none;
  grid-template-columns: 1fr 1fr;
  padding: 22px var(--pad-x) 40px;
}
.menu-overlay.is-open {
  display: grid;
  animation: menu-in 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.menu-overlay .menu-top {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 80px;
  padding: 0;
}
.menu-overlay .menu-top .brand svg { fill: var(--white); height: 14px; width: auto; }

.menu-overlay button.menu-close,
.menu-close {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--white);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.menu-overlay .links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: end;
  padding: 0;
}
/* The links render inside a single shortcode widget, so the container gap
   would otherwise land around the widget rather than between the links. */
.menu-overlay .links .elementor-widget-shortcode,
.menu-overlay .links .elementor-widget-container,
.menu-overlay .links .elementor-shortcode {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
/* Rendered by wp_nav_menu from the Main Menu location */
.menu-overlay .links ul.akam-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* starts at -1 so the first item reads 00, matching the design */
  counter-reset: akam-nav -1;
}
.menu-overlay .links ul.akam-menu li { margin: 0; }

.menu-overlay .links a {
  font-family: var(--sans);
  font-weight: 400;
  /* Labels come from the menu now, so the design's lowercase is enforced here
     rather than relying on how an editor types them. */
  text-transform: lowercase;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.02em;
  padding: 6px 0;
  display: flex;
  align-items: baseline;
  /* No flex gap: it would also push the trailing full stop away from the
     label ("home ." instead of "home."). The index gets a margin instead. */
  gap: 0;
  transition: opacity 200ms ease;
  color: var(--white);
  text-decoration: none;
}

/* The 00/01/02 index is generated, so reordering the menu renumbers itself */
.menu-overlay .links a::before {
  counter-increment: akam-nav;
  content: counter(akam-nav, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: rgba(248, 247, 244, 0.45);
  flex: none;
  margin-right: 18px;
}
/* The design renders each item with a trailing full stop */
.menu-overlay .links a::after { content: '.'; }

.menu-overlay .links a:hover { opacity: 0.5; }

/* WordPress marks the current item; a project single marks "work" (see
   akam-menus.php). The design sets the current item in italics. */
.menu-overlay .links .current-menu-item > a,
.menu-overlay .links .current-menu-ancestor > a,
.menu-overlay .links .current_page_parent > a,
.menu-overlay .links a.active { font-style: italic; }

.menu-overlay .menu-right {
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 0 0 12px;
}
.menu-overlay .menu-right .group { display: flex; flex-direction: column; gap: 10px; }
.menu-overlay .menu-right h5 {
  font-family: var(--mono);
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  color: rgba(248, 247, 244, 0.45);
  margin: 0 0 6px;
}
.menu-overlay .menu-right a { font-size: 15px; color: var(--white); text-decoration: none; }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .menu-overlay.is-open { grid-template-columns: 1fr; }
  .menu-overlay .menu-right { align-self: start; margin-top: 40px; }
}

/* ---------- Footer ---------- */
.e-con.site-footer,
.site-footer {
  background: var(--white);
  color: var(--fg);
  padding: 96px var(--pad-x) 32px;
  margin-top: 96px;
  border-top: 1px solid var(--rule);
  display: block;
}

.e-con.footer-top,
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 56px;
  padding: 0 0 96px;
}
.footer-top > .e-con { padding: 0; }

.site-footer h4,
.site-footer .col-title,
.site-footer .col-title p {
  font-family: var(--mono);
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 16px;
}

.site-footer .subscribe { max-width: 36ch; }
.site-footer .subscribe .blurb,
.site-footer .subscribe .blurb p {
  font-family: var(--sans);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 28px;
  font-weight: 400;
}

.site-footer ul,
.site-footer ul.akam-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer ul li { margin: 0; }
.site-footer ul a {
  font-size: 15px;
  opacity: 0.85;
  transition: opacity 180ms ease;
  color: inherit;
  text-decoration: none;
}
.site-footer ul a:hover { opacity: 1; }

.footer-wordmark {
  border-top: 1px solid var(--rule);
  padding-top: 56px;
  margin-bottom: 56px;
}
.footer-wordmark svg {
  width: 100%;
  height: auto;
  fill: var(--fg);
  display: block;
}

/* Letter-by-letter reveal, triggered by akam-menu.js */
.wordmark .wm-letter {
  transform-box: fill-box;
  transform-origin: bottom;
  transform: translateY(28%);
  opacity: 0;
  clip-path: inset(0 0 -2% 0);
}
.wordmark.in .wm-letter { animation: wm-rise 1400ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.wordmark.in .wm-letter:nth-child(1) { animation-delay: 0ms; }
.wordmark.in .wm-letter:nth-child(2) { animation-delay: 280ms; }
.wordmark.in .wm-letter:nth-child(3) { animation-delay: 560ms; }
.wordmark.in .wm-letter:nth-child(4) { animation-delay: 840ms; }

@keyframes wm-rise {
  from { transform: translateY(34%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark .wm-letter { transform: none; opacity: 1; animation: none; }
  .menu-overlay.is-open { animation: none; }
}

.e-con.footer-bottom,
.footer-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 28px 0 0;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.footer-bottom .acknowledgement,
.footer-bottom .acknowledgement p {
  text-align: right;
  max-width: 56ch;
  justify-self: end;
  text-transform: none;
  line-height: 1.5;
  letter-spacing: 0;
  font-size: 11px;
  margin: 0;
}

/* Gravity Forms subscribe row, restyled as the original's underlined field */
.site-footer .subscribe .gform_wrapper form {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 10px;
  gap: 12px;
}
.site-footer .subscribe .gform_wrapper .gform_fields { flex: 1; display: block; }
.site-footer .subscribe .gform_wrapper .gfield_label { display: none; }
.site-footer .subscribe .gform_wrapper input[type="email"] {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 6px 0;
  font: inherit;
  color: inherit;
  outline: none;
  font-size: 14px;
}
.site-footer .subscribe .gform_wrapper input::placeholder {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.site-footer .subscribe .gform_wrapper .gform_footer { margin: 0; padding: 0; }
.site-footer .subscribe .gform_wrapper input[type="submit"] {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
}

@media (max-width: 900px) {
  .e-con.footer-top,
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 600px) {
  .e-con.footer-top,
  .footer-top { grid-template-columns: 1fr; }
  .e-con.footer-bottom,
  .footer-bottom { grid-template-columns: 1fr; }
  .footer-bottom .acknowledgement,
  .footer-bottom .acknowledgement p { text-align: left; justify-self: start; }
}

/* ---------- Focus visibility ----------
   The overlay inverts the palette, so the inherited dark focus ring lands
   black-on-black and effectively disappears for keyboard users. */
.menu-overlay :focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
  border-radius: 2px;
}
.menu-overlay :focus:not(:focus-visible) { outline: none; }

.topbar :focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}
.topbar :focus:not(:focus-visible) { outline: none; }

/* Gravity Forms paints its submit with the theme's button style; the footer
   subscribe is a text link in this design. */
/* GF 2.9 renders the submit as <button class="gform_button elementor-button
   button">, which picks up both the theme's and Elementor's button styling. */
.site-footer .subscribe .gform_wrapper .gform_footer button.gform_button,
.site-footer .subscribe .gform_wrapper .gform_footer button.gform_button:hover,
.site-footer .subscribe .gform_wrapper .gform_footer button.gform_button:focus,
.site-footer .subscribe .gform_wrapper .gform_footer input[type="submit"],
.site-footer .subscribe .gform_wrapper .gform_footer input[type="submit"]:hover,
.site-footer .subscribe .gform_wrapper .gform_footer input[type="submit"]:focus {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  background: none;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  width: auto;
  color: var(--fg);
  box-shadow: none;
  cursor: pointer;
}
.site-footer .subscribe .gform_wrapper .gform_footer {
  display: flex;
  align-items: center;
  width: auto;
  margin: 0;
  padding: 0;
}

/* ============================================================
   Preloader — black screen, AKAM letters rising
   Shown once per session (see includes/akam-preloader.php)
   ============================================================ */
#akam-preloader[hidden] { display: none; }

#akam-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 700ms ease;
}
#akam-preloader.pl-done {
  opacity: 0;
  pointer-events: none;
}
#akam-preloader .pl-wordmark {
  width: min(58vw, 480px);
  height: auto;
  fill: var(--white);
  display: block;
}
#akam-preloader .pl-letter {
  transform-box: fill-box;
  transform-origin: bottom;
  transform: translateY(34%);
  opacity: 0;
  clip-path: inset(0 0 -2% 0);
  animation: pl-rise 1400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
#akam-preloader .pl-letter:nth-child(1) { animation-delay: 0ms; }
#akam-preloader .pl-letter:nth-child(2) { animation-delay: 280ms; }
#akam-preloader .pl-letter:nth-child(3) { animation-delay: 560ms; }
#akam-preloader .pl-letter:nth-child(4) { animation-delay: 840ms; }

@keyframes pl-rise {
  from { transform: translateY(34%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

html.pl-lock, body.pl-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  #akam-preloader .pl-letter { transform: none; opacity: 1; animation: none; }
}

/* ============================================================
   Work index — cursor-following row preview
   ============================================================ */
.row-preview-src { display: none; }

#akam-row-preview {
  position: fixed;
  width: clamp(200px, 18vw, 280px);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  transform: translate(12px, 12px);
  background-size: cover;
  background-position: center;
  background-color: var(--cream);
  z-index: 70;
  box-shadow: 0 12px 40px rgba(19, 22, 24, 0.18);
  opacity: 0;
  transition: opacity 180ms ease;
  will-change: transform;
}
#akam-row-preview.is-visible { opacity: 1; }

/* Pointer-driven, so irrelevant on touch and at narrow widths */
@media (hover: none), (max-width: 800px) {
  #akam-row-preview { display: none; }
}
