/* =========================================================================
   Left of the Brain Designs — landing page
   Palette lifted from the colour version of the logo:
     dark brown #3F2A1D · rust thread #B4553D · cream fill #F5EADA
   ========================================================================= */

/* ------------------------------------------------------------------ tokens */
:root {
  --cream: #fbf5ea;
  --cream-2: #f4e9d7;
  --cream-3: #ece0ca;
  --paper: #fffdf8;

  --ink: #3f2a1d;
  --ink-2: #6e5748;
  --ink-3: #8c7666;
  --brown-dk: #2e1e14;

  --rust: #b4553d;
  --rust-dk: #96412b;
  --rust-lt: #d08a75;

  --line: #e5d6c0;
  --line-soft: rgba(63, 42, 29, 0.12);

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-script: "Pinyon Script", "Snell Roundhand", cursive;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3.75rem, 9vw, 7.5rem);

  --radius: 0.875rem;
  --radius-lg: 1.5rem;
  --shadow-sm: 0 1px 2px rgba(63, 42, 29, 0.06), 0 6px 18px -12px rgba(63, 42, 29, 0.25);
  --shadow-md: 0 2px 4px rgba(63, 42, 29, 0.06), 0 18px 40px -24px rgba(63, 42, 29, 0.35);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* clears the sticky header when jumping to an anchor */
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--rust-dk);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

button {
  font: inherit;
  color: inherit;
}

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 4px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -120%;
  z-index: 100;
  background: var(--ink);
  color: var(--cream);
  padding: 0.7rem 1.25rem;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
  transition: translate 0.2s var(--ease);
}

.skip:focus {
  translate: -50% 0;
  color: var(--cream);
}

/* ------------------------------------------------------------------ layout */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--tint {
  background: var(--cream-2);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section__title {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.85rem);
  margin-bottom: 0.5em;
}

.section__lede {
  color: var(--ink-2);
  font-size: clamp(1.03rem, 1rem + 0.35vw, 1.2rem);
  margin: 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 0 0 1rem;
}

.eyebrow--light {
  color: var(--rust-lt);
}

/* a dashed rule that echoes the stitched thread in the logo */
.stitch {
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--rust) 0 1.125rem,
    transparent 1.125rem 2.125rem
  );
  opacity: 0.55;
}

.stitch--light {
  opacity: 0.4;
}

.link {
  color: var(--rust-dk);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  white-space: nowrap;
}

.link:hover {
  color: var(--ink);
}

.link--light {
  color: var(--rust-lt);
}

.link--light:hover {
  color: var(--cream);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

/* ------------------------------------------------------------------ buttons */
.btn {
  --btn-bg: var(--rust);
  --btn-fg: #fff9f0;
  --btn-bd: var(--rust);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border: 1.5px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 0.97rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.18s var(--ease),
    border-color 0.18s var(--ease),
    color 0.18s var(--ease),
    translate 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btn:hover {
  translate: 0 -1px;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  --btn-bg: var(--rust-dk);
  --btn-bd: var(--rust-dk);
  color: #fff9f0;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--ink);
}

.btn--ghost:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--cream);
  color: var(--cream);
}

.btn--lg {
  padding: 0.9rem 1.85rem;
  font-size: 1.03rem;
}

.btn--sm {
  padding: 0.5rem 1.05rem;
  font-size: 0.9rem;
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

@supports (backdrop-filter: blur(1px)) {
  .site-header {
    backdrop-filter: saturate(140%) blur(10px);
  }
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -22px rgba(63, 42, 29, 0.5);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand__logo {
  width: auto;
  height: clamp(2.5rem, 2rem + 2vw, 3.25rem);
  transition: height 0.25s var(--ease);
}

.site-header.is-scrolled .brand__logo {
  height: clamp(2.25rem, 1.85rem + 1.5vw, 2.75rem);
}

/* ------------------------------------------------------------------ nav */
.navtoggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
}

.navtoggle__bars {
  display: grid;
  gap: 3px;
  width: 1rem;
}

.navtoggle__bars span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition:
    translate 0.2s var(--ease),
    rotate 0.2s var(--ease),
    opacity 0.2s var(--ease);
}

.navtoggle[aria-expanded="true"] .navtoggle__bars span:nth-child(1) {
  translate: 0 4.5px;
  rotate: 45deg;
}

.navtoggle[aria-expanded="true"] .navtoggle__bars span:nth-child(2) {
  opacity: 0;
}

.navtoggle[aria-expanded="true"] .navtoggle__bars span:nth-child(3) {
  translate: 0 -4.5px;
  rotate: -45deg;
}

.nav {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--cream);
  border-block: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: none;
}

.nav.is-open {
  display: block;
}

.nav__list {
  display: grid;
  gap: 0.25rem;
  padding: 1rem var(--gutter) 1.5rem;
}

.nav__list a:not(.btn) {
  display: block;
  padding: 0.6rem 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
}

.nav__list a:not(.btn):hover {
  color: var(--rust-dk);
}

.nav__list .btn {
  margin-top: 0.75rem;
  justify-self: start;
}

@media (min-width: 56rem) {
  .navtoggle {
    display: none;
  }

  .nav {
    position: static;
    display: block;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .nav__list {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.2vw, 2rem);
    padding: 0;
  }

  .nav__list a:not(.btn) {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0;
    border: 0;
  }

  .nav__list .btn {
    margin: 0;
  }
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  background:
    radial-gradient(70% 55% at 50% 0%, var(--paper) 0%, transparent 70%),
    var(--cream);
}

.hero__inner {
  max-width: 54rem;
  text-align: center;
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.hero__logo {
  width: min(100%, 34rem);
  margin: 0 auto clamp(1.5rem, 3vw, 2.25rem);
}

.hero__title {
  font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.9rem);
  margin-bottom: 0.45em;
}

.hero__lede {
  max-width: 38rem;
  margin: 0 auto 2rem;
  color: var(--ink-2);
  font-size: clamp(1.06rem, 1rem + 0.5vw, 1.3rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
}

.hero__note {
  color: var(--ink-3);
  font-size: 0.95rem;
  margin: 0;
}

/* ------------------------------------------------------------------ strip */
.strip {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
}

.strip__list {
  display: grid;
  gap: 0.85rem 2rem;
  grid-template-columns: 1fr;
}

.strip__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--ink-2);
}

.strip__item .icon {
  color: var(--rust);
}

@media (min-width: 40rem) {
  .strip__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .strip__list {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ------------------------------------------------------------------ cards */
.cards {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 2.4vw, 1.9rem);
  transition:
    translate 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.card:hover {
  translate: 0 -2px;
  border-color: var(--rust-lt);
  box-shadow: var(--shadow-md);
}

.card__icon {
  width: 2.9rem;
  height: 2.9rem;
  padding: 0.65rem;
  margin-bottom: 1rem;
  color: var(--rust);
  background: var(--cream-2);
  border-radius: 999px;
}

.card__title {
  font-size: 1.28rem;
  margin-bottom: 0.4em;
}

.card__text {
  color: var(--ink-2);
  font-size: 0.97rem;
  margin: 0;
}

/* ------------------------------------------------------------------ steps */
.steps {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.5rem);
  grid-template-columns: 1fr;
  counter-reset: step;
}

@media (min-width: 52rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
  }
}

.step {
  position: relative;
  text-align: center;
}

.step__num {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.1rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--rust);
  background: var(--paper);
  border: 1.5px solid var(--rust-lt);
  border-radius: 999px;
}

/* stitched connector between the numbers on wide screens */
@media (min-width: 52rem) {
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.75rem;
    left: calc(50% + 2.5rem);
    width: calc(100% - 5rem);
    height: 2px;
    background: repeating-linear-gradient(
      90deg,
      var(--rust-lt) 0 0.6rem,
      transparent 0.6rem 1.15rem
    );
  }
}

.step__title {
  font-size: 1.22rem;
  margin-bottom: 0.4em;
}

.step__text {
  color: var(--ink-2);
  font-size: 0.97rem;
  max-width: 24rem;
  margin-inline: auto;
}

.steps__cta {
  text-align: center;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
}

/* ------------------------------------------------------------------ work grid */
.work {
  display: grid;
  gap: clamp(0.85rem, 2vw, 1.5rem);
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 52rem) {
  .work {
    grid-template-columns: repeat(3, 1fr);
  }
}

.work__item {
  margin: 0;
}

.work__slot,
.work__img {
  aspect-ratio: 1;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.work__img {
  object-fit: cover;
}

/* placeholder tile: cream with a faint stitched weave, so an empty grid still reads
   as intentional before the photos go in */
.work__slot {
  display: grid;
  place-items: center;
  color: var(--rust-lt);
  background-color: var(--cream-2);
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(63, 42, 29, 0.05) 0 2px,
      transparent 2px 10px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(63, 42, 29, 0.05) 0 2px,
      transparent 2px 10px
    );
}

.work__slot .icon {
  width: 2rem;
  height: 2rem;
}

.work__caption {
  margin: 0.7rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.work__note {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.93rem;
}

/* ------------------------------------------------------------------ about */
.about {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 56rem) {
  .about {
    grid-template-columns: 0.85fr 1fr;
  }
}

.about__slot,
.about__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.about__img {
  object-fit: cover;
}

.about__slot {
  display: grid;
  place-items: center;
  color: var(--rust-lt);
  background: var(--paper);
}

.about__slot .icon {
  width: 3rem;
  height: 3rem;
}

.about__body p {
  color: var(--ink-2);
}

.about__sign {
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  color: var(--rust);
  margin-top: 1.25rem;
  line-height: 1.3;
}

/* ------------------------------------------------------------------ notify */
.notify {
  background: var(--brown-dk);
  color: var(--cream);
}

.notify__inner {
  max-width: 44rem;
  text-align: center;
}

.notify .section__title {
  color: var(--cream);
}

.notify__lede {
  color: color-mix(in srgb, var(--cream) 78%, transparent);
  font-size: clamp(1.02rem, 1rem + 0.35vw, 1.15rem);
  margin: 0 auto 2rem;
  max-width: 34rem;
}

.notify__form {
  margin: 0 auto;
  max-width: 30rem;
  text-align: left;
}

.notify__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--cream) 70%, transparent);
  margin-bottom: 0.5rem;
}

.notify__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.notify__input {
  flex: 1 1 13rem;
  min-width: 0;
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid transparent;
  border-radius: 999px;
}

.notify__input::placeholder {
  color: var(--ink-3);
}

.notify__input:focus-visible {
  outline: 2px solid var(--rust-lt);
  outline-offset: 2px;
}

.notify__status {
  margin: 0.85rem 0 0;
  min-height: 1.4em;
  font-size: 0.92rem;
  color: var(--rust-lt);
}

.notify__status.is-ok {
  color: #9ec49a;
}

.notify__alt {
  margin: 2rem 0 0;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--cream) 70%, transparent);
}

/* ------------------------------------------------------------------ contact */
.contact {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: 1fr;
}

@media (min-width: 52rem) {
  .contact {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2.6vw, 2rem);
  text-align: center;
}

.contact__icon {
  width: 2.6rem;
  height: 2.6rem;
  margin: 0 auto 0.9rem;
  padding: 0.55rem;
  color: var(--rust);
  background: var(--cream-2);
  border-radius: 999px;
}

.contact__title {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.5em;
}

.contact__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: break-word;
}

a.contact__value:hover {
  color: var(--rust-dk);
}

.contact__value--plain {
  cursor: default;
}

.contact__text {
  margin: 0.6rem 0 0;
  color: var(--ink-2);
  font-size: 0.92rem;
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  background: var(--ink);
  color: color-mix(in srgb, var(--cream) 80%, transparent);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--cream);
  text-decoration: underline;
}

.site-footer__inner {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  padding-block: clamp(2.75rem, 6vw, 4rem);
  grid-template-columns: 1fr;
}

@media (min-width: 52rem) {
  .site-footer__inner {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--cream);
  margin: 0;
  line-height: 1.2;
}

.wordmark__sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--rust-lt);
  margin-top: 0.35rem;
}

.site-footer__tag {
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: color-mix(in srgb, var(--cream) 70%, transparent);
  margin: 0.9rem 0 0;
}

.site-footer__nav ul,
.site-footer__contact {
  display: grid;
  gap: 0.55rem;
  font-size: 0.95rem;
}

.site-footer__contact {
  align-content: start;
}

.social {
  display: flex;
  gap: 0.75rem;
  margin: 0.5rem 0 0;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding-block: 1.25rem;
  border-top: 1px solid rgba(251, 245, 234, 0.14);
  font-size: 0.84rem;
  color: color-mix(in srgb, var(--cream) 60%, transparent);
}

.site-footer__legal p {
  margin: 0;
}

/* ------------------------------------------------------------------ reveal */
/* Hidden only once JS is running, so the page is fully readable without it. */
html.js .reveal {
  opacity: 0;
  translate: 0 0.875rem;
  transition:
    opacity 0.6s var(--ease),
    translate 0.6s var(--ease);
}

html.js .reveal.is-in {
  opacity: 1;
  translate: none;
}

/* stagger siblings inside a grid or row */
html.js .reveal:nth-child(2) {
  transition-delay: 0.07s;
}
html.js .reveal:nth-child(3) {
  transition-delay: 0.14s;
}
html.js .reveal:nth-child(4) {
  transition-delay: 0.21s;
}
html.js .reveal:nth-child(5) {
  transition-delay: 0.28s;
}
html.js .reveal:nth-child(6) {
  transition-delay: 0.35s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------------ print */
@media print {
  .site-header,
  .navtoggle,
  .nav,
  .notify__form,
  .skip {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
