/* ==========================================================================
   Ariel Herzog Law PLLC
   One stylesheet. Tokens at :root. No utility framework, no build step.
   ========================================================================== */

:root {
  /* Palette — six values, fixed. */
  --paper:   #FBFAF8;   /* page background */
  --ink:     #131A26;   /* body text on paper */
  --slate:   #4A5260;   /* secondary text on paper */
  --rule:    #DDD9D2;   /* hairlines */

  /* Colour. Navy carries the header, the bands and the footer; brass is the
     accent that shows against both. */
  --navy:        #0F2C4C;
  --navy-deep:   #0A2038;
  --on-navy:     #C3D0DE;   /* secondary text on flat navy — 9.0:1 */
  --on-photo:    #D6DEE8;   /* secondary text over photography — 5.2:1 worst case */
  --brass:       #B0853C;   /* accent on paper (rules, underlines) */
  --brass-light: #C9A053;   /* accent on navy — 5.8:1 */
  --tint:        #E9EFF5;   /* cool blue section band */
  --wash:        #E9EFF5;

  /* Type families */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Type scale — fluid between 360px and 1440px viewports */
  --t-hero:    clamp(1.8125rem, 1.5rem    + 1.3889vw, 2.75rem);   /* 29 → 44 */
  --t-title:   clamp(1.6875rem, 1.5rem    + 0.8333vw, 2.25rem);   /* 27 → 36 */
  --t-section: clamp(1.375rem,  1.2917rem + 0.3704vw, 1.625rem);  /* 22 → 26 */
  --t-sub:     clamp(1.0625rem, 1.0417rem + 0.0926vw, 1.125rem);  /* 17 → 18 */
  --t-body:    clamp(1rem,      0.9792rem + 0.0926vw, 1.0625rem); /* 16 → 17 */
  --t-small:   clamp(0.8125rem, 0.7917rem + 0.0926vw, 0.875rem);  /* 13 → 14 */

  /* Measures */
  --measure:  34em;     /* ≈68 characters */
  --w-hero:   620px;
  --w-wide:   1140px;

  /* Rhythm */
  --gap-section: clamp(4rem, 2.5rem + 4vw, 6rem);  /* 64 → 96 */
  --pad-x:       max(1.5rem, 6vw);
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 400; }
p  { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

img { max-width: 100%; height: auto; display: block; }

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  font-size: var(--t-small);
  z-index: 100;
}
.skip:focus { left: 0; }

/* Global focus state — always visible, never removed */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ------------------------------------------------------------- layout -- */

.wrap {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

/* Text blocks sit left-aligned inside the wrapper at a readable measure. */
.measure { max-width: var(--measure); }
.measure--hero { max-width: var(--w-hero); }

.section { padding-block: var(--gap-section); }
.section--tight { padding-block: calc(var(--gap-section) * 0.6); }

/* The section rule: hairline with a short crimson segment at the left edge.
   A markup tick, not a decoration. */
.rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 0;
  position: relative;
}
.rule::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 64px;
  height: 3px;
  background: var(--brass);
}

/* --------------------------------------------------------------- type -- */

.hero-statement {
  color: var(--navy);
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-hero);
  line-height: 1.15;
  letter-spacing: -0.005em;
}

.page-title {
  color: var(--navy);
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-title);
  line-height: 1.2;
}

.section-heading {
  color: var(--navy);
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--t-section);
  line-height: 1.25;
}

.subheading {
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--t-sub);
  line-height: 1.4;
}

.lede  { color: var(--slate); }

.measure strong { font-weight: 500; color: var(--navy); }
.small { font-size: var(--t-small); line-height: 1.5; }

.stack > * + *      { margin-top: 1.5rem; }
.stack-sm > * + *   { margin-top: 0.75rem; }
.stack-lg > * + *   { margin-top: 2.5rem; }

/* --------------------------------------------------------------- links -- */

a { color: inherit; }

/* Body links and standalone navigational links: crimson underline, no arrows. */
.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.link:hover {
  color: var(--brass);
}

.link--standalone {
  display: inline-block;
  font-weight: 500;
}

/* Ink-filled and ink-outline buttons. Never crimson. */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 500;
  line-height: 1.2;
  padding: 0.875rem 1.5rem;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  transition: none;
}
.btn:hover { background: var(--brass); border-color: var(--brass); color: var(--paper); }

/* Larger call to action, used once at the foot of a page. */
.btn--lg {
  font-size: var(--t-sub);
  padding: 1.05rem 2rem;
}

.btn--outline { background: transparent; color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--paper); }

/* ------------------------------------------------------------- header -- */

.masthead { background: var(--navy); }

.masthead__inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 1.5rem var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.2;
  text-decoration: none;
  color: var(--paper);
  white-space: nowrap;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}
.nav a {
  font-size: var(--t-small);
  font-weight: 400;
  color: var(--on-navy);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--paper); }
.nav a[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--brass-light);
}

/* Page-opening band. The words sit on plain paper across the left of the
   band, which then fades out into the photograph on the right. Nothing is
   ever read against a picture. */
.band-hero {
  background-color: var(--paper);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding-block: clamp(4rem, 2rem + 6vw, 7rem);
}
.band-hero .hero-statement,
.band-hero .page-title,
.band-hero .section-heading { color: var(--navy); }
.band-hero p,
.band-hero .measure,
.band-hero .lede { color: var(--slate); }

/* Default: the photograph occupies a fixed strip at the foot of the band and
   fades up into the paper, so the fade never starts mid-paragraph however long
   the copy runs or however narrow the window is. */
.band-photo--home,
.band-photo--ma,
.band-photo--security,
.band-photo--about,
.band-photo--contact {
  background-image: linear-gradient(180deg,
                      var(--paper) 0%,
                      var(--paper) calc(100% - 13rem),
                      rgba(251,250,248,.45) calc(100% - 7rem),
                      rgba(251,250,248,0) 100%),
                    var(--band-photo);
  padding-bottom: 13rem;
}

/* Wide enough for the text column and the photograph to sit side by side:
   words on plain paper across the left, fading out into the picture on the
   right. 1150px is the point at which the text column clears 63%. */
@media (min-width: 1150px) {
  /* Nothing in the band may run past the text column into the photograph. */
  .band-hero .wrap > * { max-width: var(--w-hero); }

  .band-photo--home,
  .band-photo--ma,
  .band-photo--security,
  .band-photo--about,
  .band-photo--contact {
    background-image: linear-gradient(90deg,
                        var(--paper) 0%, var(--paper) 63%,
                        rgba(251,250,248,.55) 76%,
                        rgba(251,250,248,0) 90%),
                      var(--band-photo);
    padding-bottom: clamp(4rem, 2rem + 6vw, 7rem);
  }
}

.band-photo--home     { --band-photo: url("/assets/img/home.jpg"); }
.band-photo--ma       { --band-photo: url("/assets/img/ma.jpg"); }
.band-photo--security { --band-photo: url("/assets/img/security.jpg"); }
.band-photo--about    { --band-photo: url("/assets/img/about.jpg"); }
.band-photo--contact  { --band-photo: url("/assets/img/contact.jpg"); }

/* --------------------------------------------------- homepage: split -- */

.split {
  background: var(--tint);
  padding-block: var(--gap-section);
}
.split__divider { background: #BFCDDC; }

.split__grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0 clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.split__divider {
  background: var(--rule);
  align-self: stretch;
  min-height: 100%;
  transform: scaleY(0);
  transform-origin: top center;
  animation: draw-down 600ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes draw-down { to { transform: scaleY(1); } }

.split__panel { max-width: 46ch; }
.split__panel > * + * { margin-top: 1.25rem; }

/* ---------------------------------------------------------- wash band -- */

.wash {
  background: var(--wash);
  padding-block: var(--gap-section);
}

/* Full-bleed navy band — used once per page, for a statement that should
   carry weight rather than sit in the flow. */
.wash--navy { background: var(--navy-deep); }
.wash--navy p            { color: #E4EAF1; }
.wash--navy .measure     { color: #E4EAF1; }
.wash--navy .section-heading,
.wash--navy .subheading  { color: var(--paper); }
.wash--navy .link        { color: var(--paper); text-decoration-color: var(--brass-light); }
.wash--navy .link:hover  { color: var(--brass-light); }

/* A section whose copy runs alongside a picture, so long text is not left
   sitting in white space. Stacks below 1000px. */
.with-aside { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); }
.with-aside__media { margin: 0; }
.with-aside__media img {
  display: block;
  width: 100%;
  height: clamp(190px, 42vw, 280px);
  object-fit: cover;
}

@media (min-width: 1000px) {
  .with-aside {
    grid-template-columns: minmax(0, 1fr) minmax(0, 330px);
    align-items: start;
  }
  /* Held in view while the copy beside it scrolls, rather than stretched to
     the full height of a long section. */
  .with-aside__media {
    position: sticky;
    top: 2.5rem;
    height: min(66vh, 520px);
  }
  .with-aside__media img { width: 100%; height: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .with-aside__media { position: static; }
}

/* Full-bleed photograph used to break up a page between sections. */
.photo-band { margin: 0; }
.photo-band img {
  display: block;
  width: 100%;
  height: clamp(180px, 26vw, 340px);
  object-fit: cover;
}

/* ---------------------------------------------- two-column plain list -- */

.list-2col {
  columns: 2;
  column-gap: 3rem;
  max-width: 60rem;
}
.list-2col li {
  break-inside: avoid;
  padding-block: 0.4rem;
  padding-left: 1.1rem;
  max-width: 34ch;
  position: relative;
}
.list-2col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 5px;
  height: 5px;
  background: var(--brass);
}

/* ------------------------------------------------- "when companies call" -- */

.scenarios > * + * { margin-top: 3rem; }

.scenario p {
  max-width: var(--measure);
}
.scenario__lead {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink);
}

/* ------------------------------------------------------- credentials -- */

.credentials {
  max-width: 44rem;
  border-top: 1px solid var(--rule);
}
.credentials div {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}
.credentials dt {
  font-weight: 500;
  font-size: var(--t-small);
  color: var(--slate);
}
.credentials dd { margin: 0; }

/* ------------------------------------------------------------ portrait -- */

.portrait {
  width: 240px;
  border-radius: 0;
  box-shadow: none;
}

/* ------------------------------------------------------- contact layout -- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 17rem);
  gap: 0 clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.contact-grid__divider { background: var(--rule); align-self: stretch; }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-grid__divider { height: 1px; margin-block: 2.5rem; }
}

/* --------------------------------------------------------------- forms -- */

.form { max-width: 34rem; }
.form > * + * { margin-top: 1.5rem; }

.field label {
  display: block;
  font-size: var(--t-small);
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.field .req { color: #A32424; font-weight: 400; }

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.7rem 0.85rem;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--slate); }

.field textarea { min-height: 9rem; resize: vertical; }

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--slate) 50%),
                    linear-gradient(135deg, var(--slate) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

/* Error state */
.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea { border-color: #A32424; }

.field__error {
  display: none;
  font-size: var(--t-small);
  color: #A32424;
  margin-top: 0.35rem;
}
.field[data-invalid="true"] .field__error { display: block; }

.form__notice {
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--slate);
  max-width: var(--measure);
}

.form__status {
  font-size: var(--t-small);
  color: #A32424;
}
.form__status:empty { display: none; }

.form-success {
  font-family: var(--serif);
  font-size: var(--t-section);
  line-height: 1.35;
  max-width: var(--measure);
}

.contact-direct { font-style: normal; }
.contact-direct dt {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--slate);
  margin-bottom: 0.15rem;
}
.contact-direct dd { margin: 0 0 1.25rem; }

/* -------------------------------------------------------------- footer -- */

.site-footer {
  background: var(--navy-deep);
  padding-block: 4rem;
  text-align: center;
}
.site-footer .wrap > * + * { margin-top: 1rem; }

.site-footer p,
.site-footer address {
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--on-navy);
  font-style: normal;
}

.footer__firm {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--paper);
}

.footer__advertising {
  font-weight: 500;
  color: var(--paper);
}

.footer__disclaimer {
  max-width: 46rem;
  margin-inline: auto;
}

.site-footer a {
  color: var(--on-navy);
  text-decoration: underline;
  text-decoration-color: var(--brass-light);
  text-underline-offset: 4px;
}
.site-footer a:hover { color: var(--brass-light); }

/* Crimson tick above the footer, echoing the section rules. */
.site-footer::before {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--brass-light);
  margin: 0 auto 2.5rem;
}

/* --------------------------------------------------------- responsive -- */

@media (max-width: 820px) {
  .split__grid { grid-template-columns: 1fr; gap: 0; }

  /* Vertical rule becomes a horizontal one between the stacked panels.
     Not animated: a sideways draw is a different gesture than the one
     the design calls for. */
  .split__divider {
    height: 1px;
    min-height: 0;
    background: #BFCDDC;
    margin-block: 2.5rem;
    transform: none;
    animation: none;
  }

  .split__panel { max-width: var(--measure); }

  .list-2col { columns: 1; }

  .credentials div { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media (max-width: 560px) {
  .masthead__inner { display: block; }
  .nav { margin-top: 1rem; }
  .nav ul { gap: 0.5rem 1.25rem; }
  .portrait { width: 180px; }
}

/* ---------------------------------------------------- reduced motion -- */

@media (prefers-reduced-motion: reduce) {
  .split__divider {
    animation: none;
    transform: scaleY(1);
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------------------------------------------------------------- print */

@media print {
  .masthead, .skip { display: none; }
  body { background: #fff; }
}
