/* Lawless & Co */

:root {
  --ink: #14161A;
  --paper: #F2F0EB;
}

/* ---------- reset ---------- */
html,
body,
div,
img,
span,
h1,
h2,
h3,
p,
a,
figure,
header,
footer,
nav {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  border: none;
  max-width: 100%;
}

body {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  padding-top: 92px;
  color: #111;
}

body.is-home {
  background-color: #313540;
}

/* no focus ring on mouse clicks, but always one for keyboard users */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid #FF6F61;
  outline-offset: 3px;
}

a {
  transition: all 300ms ease-in-out;
  text-decoration: none;
  cursor: pointer;
  color: #666;
}

/* ---------- structure ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background-color: #F5F5F5;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
  view-transition-name: site-header;
  /* stays put during page transitions */
}

header.header--hidden {
  transform: translateY(-100%);
}

a.logo {
  display: block;
  flex-shrink: 0;
  width: 175px;
  height: 21px;
  background: url("/img/wordmark-midnight.svg") center / contain no-repeat;
}

div.content-wrapper {
  width: 94%;
  max-width: 1184px;
  margin: 0 auto;
}

div.document-wrapper {
  width: 94%;
  max-width: 1184px;
  margin: 200px auto;
}

div.content-wrapper-inset {
  width: 80%;
  margin-left: auto;
  padding: 200px 0;
}

div.content-wrapper-outset {
  width: 80%;
  margin-right: auto;
}

div.masthead {
  display: flex;
  align-items: center;
  padding: 200px 0;
  background-color: #FFF;
}

div.bio {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #FF6F61;
  width: 90%;
  max-width: 1340px;
  margin: 140px auto 0 auto;
}

div.bio div.content-wrapper {
  padding: 200px 0;
}

/* ---------- imagery ---------- */
div.image-gallery {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap:10px;
}

div.image-gallery img {
  width:50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background-color: #E5E5E5;
}

/* full-width banner, centred on Jim */
div.full-width-hero {
  width: 100%;
  aspect-ratio: 24 / 13;
  /* 1440 x 780, per Figma */
  background: #313540 url("/img/hero3.png") center / cover no-repeat;
}

div.pattern-band {
  height: 400px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
    url("/img/pattern-midnight.svg") center / cover no-repeat,
    #FFF;
}

/* parallax: the photo sits on a taller layer that moves more slowly than */
/* the page as it scrolls past. Same effect on every screen size. */
/* Needs scroll-driven animation (Chrome, Edge, Safari 26 incl. iOS 26). */
@keyframes hero-parallax {
  from {
    transform: translateY(-14%);
  }

  to {
    transform: translateY(14%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    div.full-width-hero {
      position: relative;
      overflow: hidden;
      background-image: none;
      view-timeline-name: --hero;
    }

    div.full-width-hero::before {
      content: "";
      position: absolute;
      inset: -20% 0;
      /* 40% taller than the banner: room to move */
      background: url("/img/hero3.png") center / cover no-repeat;
      animation: hero-parallax linear both;
      animation-timeline: --hero;
    }
  }

  /* fallback for desktop browsers without it (Firefox, older Safari): */
  /* a fixed photo the page scrolls over, centred on the window */
  @supports not (animation-timeline: view()) {
    @media (min-width: 1025px) and (hover: hover) {
      div.full-width-hero {
        background-attachment: fixed;
      }
    }
  }
}

div.pattern-rocker {
  width: 90%;
  max-width: 1340px;
  margin: 0 auto;
  height: 400px;
  background: #FF6F61 url("/img/pattern-midnight.svg") no-repeat;
  background-size: cover;
}

div.badge {
  width: 200px;
  height: 200px;
  background: url("/img/badge.png") no-repeat;
  background-size: contain;
}

/* ---------- bottom CTA ---------- */
div.bottom-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 200px 0;
  background-color: #313540;
  color: #FFF;
  text-align: center;
}

div.bottom-cta h2 {
  color: #FFF;
}

/* centre the shrink-wrapped eyebrow and link (the reveal animation sets them to fit-content) */
/* auto margins also cancel the CTA's -16px left offset */
.bottom-cta span.eyebrow,
.bottom-cta a.enquire-cta {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- footer ---------- */
footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 96px 0;
  background-color: #313540;
  text-align: center;
  view-transition-name: site-footer;
  /* stays put during page transitions */
}

footer a {
  color: #FFF;
}

/* ---------- contact form ---------- */
/* Figma: 572 wide, labels 16/24, fields 60px with a 0.5px midnight border, */
/* 16px label-to-field, 32px between fields, first and last name side by side. */

form {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  max-width: 572px;
}

/* two fields side by side (first + last name) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field label {
  font-size: 1rem;
  /* 16px */
  font-weight: 400;
  line-height: 1.5;
  /* 24px */
  color: #313540;
}

/* required marker */
.required {
  color: #FF6F61;
}

form input[type="text"],
form input[type="email"],
form input[type="tel"] {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  border: 0.5px solid #313540;
  border-radius: 4px;
  background: #FFF;
  font-family: inherit;
  font-size: 1rem;
  /* 16px: also stops iOS zooming on focus */
  color: #313540;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

form input[type="text"],
form input[type="email"],
form input[type="tel"] {
  height: 60px;
  padding: 0 16px;
}

/* focus: firm up the hairline rather than adding a heavy ring */
form input:focus {
  border-color: #313540;
  box-shadow: 0 0 0 1px #313540;
}

/* only flag errors once someone has typed and moved on */
form input:user-invalid {
  border-color: #FF6F61;
  box-shadow: 0 0 0 1px #FF6F61;
}

/* honeypot */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* gdpr consent: 12/18 small print, checkbox kept for explicit consent */
.gdpr {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.gdpr input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: #FF6F61;
}

.gdpr label {
  font-size: 0.75rem;
  /* 12px */
  font-weight: 400;
  line-height: 1.5;
  /* 18px */
  color: #313540;
}

/* submit: the enquire text link, not a filled button */
form button[type="submit"] {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0 0 -16px;
  /* 64px from the small print; text flush with the fields */
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  background-color: transparent;
  font-family: inherit;
  font-size: 1.125rem;
  /* 18px */
  font-weight: 700;
  line-height: 1.5556;
  /* 28px */
  color: #FF6F61;
  cursor: pointer;
  transition: background-color 300ms ease-in-out;
}

form button[type="submit"]::after {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 9.238h11.323l-4.431 4.457 1.723 1.734L16 8 8.615.572 6.892 2.305l4.431 4.457H0z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 9.238h11.323l-4.431 4.457 1.723 1.734L16 8 8.615.572 6.892 2.305l4.431 4.457H0z'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform 300ms ease-in-out;
}

form button[type="submit"]:hover,
form button[type="submit"]:focus-visible {
  background-color: #F5F5F5;
}

form button[type="submit"]:hover::after,
form button[type="submit"]:focus-visible::after {
  transform: translateX(4px);
}

form button[type="submit"]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ---------- form messages ---------- */
.form-message {
  max-width: 572px;
  margin-bottom: 32px;
  padding: 24px;
  border-radius: 4px;
}

.form-message p {
  margin: 0;
  font-weight: 400;
  color: #313540;
}

.form-message--error {
  border: 1px solid #FF6F61;
}

.field-error {
  display: block;
  margin-top: -8px;
  /* sits closer to its field than the 16px label gap */
  font-size: 0.875rem;
  /* 14px */
  line-height: 1.5;
  color: #D6473A;
  /* darker coral so small text passes contrast on white */
}

form .has-error input {
  border-color: #FF6F61;
  box-shadow: 0 0 0 1px #FF6F61;
}

/* jump link target: clear the fixed header */
#enquiry {
  scroll-margin-top: 120px;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
}

/* ---------- burger button ---------- */
.burger {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.burger-lines {
  position: relative;
  width: 26px;
  height: 18px;
}

.burger-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition:
    transform 0.35s cubic-bezier(0.65, 0, 0.35, 1),
    opacity 0.2s ease,
    background 0.3s ease;
}

.burger-lines span:nth-child(1) {
  top: 0;
}

.burger-lines span:nth-child(2) {
  top: 8px;
}

.burger-lines span:nth-child(3) {
  top: 16px;
}

/* burger -> X when menu is open */
.burger[aria-expanded="true"] .burger-lines span {
  background: var(--paper);
}

.burger[aria-expanded="true"] .burger-lines span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger-lines span:nth-child(2) {
  transform: scaleX(0);
}

.burger[aria-expanded="true"] .burger-lines span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- overlay panel ---------- */
.menu-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  /* padding sits inside the width, so it never spills past the screen */
  width: 33.333vw;
  max-width: 100%;
  padding: 140px 48px 96px;
  /* top clears the header and close button; bottom clears the meta line */
  overflow-y: auto;
  /* scrolls if the content is ever taller than the screen, e.g. phone in landscape */
  background: var(--ink);
  transform: translateX(100%);
  visibility: hidden;
  /* closed: fully hidden, so its links can't be tabbed to */
  transition:
    transform 0.5s cubic-bezier(0.76, 0, 0.24, 1),
    visibility 0s linear 0.5s;
  /* hide only once it has slid away */
}

.menu-overlay.is-open {
  transform: translateX(0%);
  visibility: visible;
  transition:
    transform 0.5s cubic-bezier(0.76, 0, 0.24, 1),
    visibility 0s;
}

.menu-meta {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 40px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(242, 240, 235, 0.5);
  opacity: 0;
  transition: opacity 0.4s ease 0.5s;
}

.menu-overlay.is-open .menu-meta {
  opacity: 1;
}

/* panel links: H3 scale, Inter Extra Light 32/40, 24/30 on mobile */
/* fade and rise in one after another as the panel slides out */
.menu-overlay>a {
  display: block;
  width: fit-content;
  margin-bottom: 12px;
  /* clear space between links */
  font-size: 2rem;
  /* 32px */
  font-weight: 200;
  line-height: 1.25;
  /* 40px */
  text-transform: capitalize;
  color: var(--paper);

  /* closed: hidden and slightly low, and gone quickly when the panel closes */
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    color 0.3s ease;
}

/* open: surface one after another, starting as the panel is still sliding */
.menu-overlay.is-open>a {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--link-delay, 0.3s),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--link-delay, 0.3s),
    color 0.3s ease;
}

.menu-overlay>a:nth-of-type(1) {
  --link-delay: 0.30s;
}

.menu-overlay>a:nth-of-type(2) {
  --link-delay: 0.38s;
}

.menu-overlay>a:nth-of-type(3) {
  --link-delay: 0.46s;
}

.menu-overlay.is-open>a:hover,
.menu-overlay.is-open>a:focus-visible {
  color: #FF6F61;
}

.menu-overlay>a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* while the menu is open, lift the header above the panel so the close button shows */
body:has(.menu-overlay.is-open) header {
  z-index: 60;
  transform: none;
  /* keep it visible even if it was hidden on scroll */
  background-color: transparent;
  /* so the grey bar doesn't sit over the panel */
}

/* ---------- enquire CTA ---------- */
/* Text link that fills with a soft background on hover. */
/* Coral on white by default; midnight on coral (.bio); coral with a darker fill on midnight. */

a.enquire-cta {
  --cta-text: #FF6F61;
  --cta-hover-bg: #F5F5F5;
  /* header grey */

  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  margin-left: -16px;
  /* keeps the text flush with the copy above; only the fill extends */
  border-radius: 6px;
  font-size: 1.125rem;
  /* 18px */
  font-weight: 700;
  line-height: 1.5556;
  /* 28px */
  color: var(--cta-text);
  background-color: transparent;
  transition: background-color 300ms ease-in-out;
}

a.enquire-cta:hover,
a.enquire-cta:focus-visible {
  background-color: var(--cta-hover-bg);
}

/* keyboard focus ring, so it's still clear without a mouse */
a.enquire-cta:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* on coral */
.bio a.enquire-cta {
  --cta-text: #313540;
  /* midnight */
  --cta-hover-bg: #EE5B4D;
  /* slightly darker coral */
}

/* on midnight */
.bottom-cta a.enquire-cta {
  --cta-hover-bg: #272A33;
  /* slightly darker midnight */
}

/* arrow: the Figma icon, drawn as a mask so it takes the link colour */
a.enquire-cta::after {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 9.238h11.323l-4.431 4.457 1.723 1.734L16 8 8.615.572 6.892 2.305l4.431 4.457H0z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 9.238h11.323l-4.431 4.457 1.723 1.734L16 8 8.615.572 6.892 2.305l4.431 4.457H0z'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform 300ms ease-in-out;
}

/* nudge forward on hover */
a.enquire-cta:hover::after,
a.enquire-cta:focus-visible::after {
  transform: translateX(4px);
}

/* ---------- typography ---------- */
h1 {
  font-size: 5em;
  /* 80px */
  font-weight: 200;
  /* Extra Light */
  line-height: 1em;
  /* 80px */
  margin-bottom: 1em;
  color: #313540;
}

h2 {
  font-size: 3em;
  /* 48px */
  font-weight: 200;
  /* Extra Light */
  line-height: 1.25em;
  /* 60px */
  margin-bottom: 1em;
  color: #313540;
}

h3 {
  font-size: 2em;
  /* 32px */
  font-weight: 200;
  /* Extra Light */
  line-height: 1.125em;
  /* 36px */
  margin-bottom: 1em;
  color: #313540;
}

p {
  font-size: 1.125rem;
  /* 18px */
  font-weight: 300;
  line-height: 1.5556;
  /* 28px */
  margin-bottom: 1.5em;
}

span.eyebrow {
  display: block;
  margin-bottom: 2em;
  font-size: 1rem;
  /* 16px */
  font-weight: 600;
  line-height: 1.75;
  /* 28px */
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- reveal animations ---------- */
/* Add .reveal to any wrapper; each direct child surfaces into view. */
/* Masthead plays on page load. Everything else is driven by scroll. */

@keyframes surface {
  from {
    opacity: 0;
    transform: translateY(80px);
    filter: blur(2px);
    -webkit-mask-position: 0 100%;
    mask-position: 0 100%;
  }

  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
  }
}

@media (prefers-reduced-motion: no-preference) {

  /* shared: the feathered mask, solid top, soft middle, clear bottom */
  .reveal>* {
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 60%);
    mask-image: linear-gradient(to bottom, #000 40%, transparent 60%);
    -webkit-mask-size: 100% 250%;
    mask-size: 100% 250%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }

  /* inline elements need to be blocks to be transformed */
  .reveal>span,
  .reveal>a {
    display: block;
    width: fit-content;
  }

  /* the CTA needs flex for its arrow */
  .reveal>a.enquire-cta {
    display: flex;
  }

  /* masthead: on page load, one after another */
  .masthead .reveal>* {
    animation: surface 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .masthead .reveal> :nth-child(1) {
    animation-delay: 0.2s;
  }

  .masthead .reveal> :nth-child(2) {
    animation-delay: 0.4s;
  }

  .masthead .reveal> :nth-child(3) {
    animation-delay: 0.7s;
  }

  .masthead .reveal> :nth-child(4) {
    animation-delay: 0.9s;
  }

  /* everything else: on scroll */
  @supports (animation-timeline: view()) {
    .reveal>* {
      animation: surface cubic-bezier(0.22, 1, 0.36, 1) both;
      animation-timeline: view();
      /* starts as it enters, finishes around mid-screen where the eye is */
      animation-range: entry 20% cover 50%;
    }

    /* masthead keeps its load animation */
    .masthead .reveal>* {
      animation: surface 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
      animation-timeline: auto;
    }
  }
}

/* respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {

  .menu-overlay,
  .menu-overlay>a,
  .burger-lines span,
  .menu-meta {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* page load transition */
@view-transition {
  navigation: auto;
}

/* Keep header and footer fixed while the content changes */

::view-transition-old(root) {
  animation: 250ms ease-out both lc-fade-out;
}

::view-transition-new(root) {
  animation: 450ms cubic-bezier(.2, .7, .2, 1) both lc-fade-in;
}

@keyframes lc-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes lc-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---------- bio (on coral) ---------- */
.bio p {
  color: #000;
}

/* copy runs to the same 80% measure as the masthead text */
.bio .content-wrapper>* {
  max-width: 80%;
}

/* ---------- bottom CTA ---------- */
/* 862px centred column: 32px under the eyebrow, 48px under the heading and the copy */
div.bottom-cta {
  padding: 140px 0 0 0;
}

.bottom-cta .content-wrapper {
  max-width: 862px;
}

.bottom-cta span.eyebrow {
  margin-bottom: 32px;
}

.bottom-cta h2 {
  margin-bottom: 48px;
}

.bottom-cta p {
  margin-bottom: 48px;
}

/* even line lengths, as in Figma, so no word is left alone on the last line */
.bottom-cta h2,
.bottom-cta p {
  text-wrap: balance;
}

/* ---------- about: inset copy ---------- */
.content-wrapper-inset p {
  font-weight: 400;
  color: #313540;
}

.content-wrapper-inset h3 {
  margin-top: 16px;
  margin-bottom: 32px;
}

/* ---------- contact ---------- */
.form-wrap {
  margin-top: 96px;
}

/* ---------- footer ---------- */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
}

.footer-links a {
  font-size: 1rem;
  /* 16px */
  line-height: 1.5;
  /* 24px */
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #FF6F61;
}

.footer-links a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}