:root {
  --bg: #f6f1ea;
  --bg-soft: #fefcf9;
  --text: #1e1b16;
  --muted: #5a5147;
  --accent: #c06b4e;
  --accent-dark: #944636;
  --surface: #ffffff;
  --line: rgba(30, 27, 22, 0.12);
  --focus: #1146a6;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-sm: 0.75rem;
  --shadow-soft: 0 24px 50px rgba(30, 27, 22, 0.12);
}

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

body {
  margin: 0;
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
      circle at 15% 10%,
      rgba(192, 107, 78, 0.18),
      transparent 55%
    ),
    radial-gradient(
      circle at 85% 0%,
      rgba(241, 223, 208, 0.7),
      transparent 45%
    ),
    linear-gradient(160deg, rgba(255, 255, 255, 0.35), transparent 55%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform 0.2s ease;
  z-index: 1000;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.site-header {
  padding: var(--space-3) clamp(1.5rem, 6vw, 6rem) 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-2);
  flex-wrap: nowrap;
  position: relative;
}

.nav__menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  margin-left: auto;
}

.nav__toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
  min-width: 2.5rem;
  min-height: 2.5rem;
}

.nav__icon {
  width: 1.2rem;
  height: 2px;
  background: var(--text);
  display: inline-block;
  position: relative;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav__icon::before,
.nav__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, top 0.2s ease;
}

.nav__icon::before {
  top: -6px;
}

.nav__icon::after {
  top: 6px;
}

.nav__toggle.is-open .nav__icon {
  background: transparent;
}

.nav__toggle.is-open .nav__icon::before {
  top: 0;
  transform: rotate(45deg);
}

.nav__toggle.is-open .nav__icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--text);
}

.brand {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero {
  padding: var(--space-4) clamp(1.5rem, 6vw, 6rem) var(--space-5);
  min-height: calc(100svh - clamp(4.5rem, 9vh, 6.5rem));
  display: flex;
  align-items: center;
}

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

.hero__right {
  min-height: 0;
  align-self: start;
}

.hero__left {
  max-width: 560px;
}

.hero__right .about-card {
  height: auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-2);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.btn {
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.primary {
  background: var(--text);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn.primary:hover {
  transform: translateY(-2px);
}

.btn-cta {
  font-size: 1.05rem;
  padding: 1rem 2.2rem;
  background: #c0392b;
  box-shadow: 0 18px 35px rgba(192, 57, 43, 0.45);
}

.btn-cta:hover,
.btn-cta:focus-visible {
  background: #c0392b;
  box-shadow: 0 22px 40px rgba(192, 57, 43, 0.55);
}

.btn-cta:active {
  background: #a83226;
}

.btn.ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}

.about-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(30, 27, 22, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-sizing: border-box;
}

.about-card__header {
  margin-bottom: var(--space-3);
}

.about-card__title {
  display: inline-block;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.about-card__title:hover,
.about-card__title:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.about-card__snippet {
  margin: 0;
  color: var(--muted);
}

.carousel {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1 1 auto;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  min-height: 0;
}

.carousel__link {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.carousel__frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f2f2f2;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  max-height: clamp(260px, 44vh, 430px);
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.carousel__link:hover .carousel__frame,
.carousel__link:focus-visible .carousel__frame {
  box-shadow: 0 0 0 3px rgba(192, 107, 78, 0.35);
}

.carousel__track {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}

.carousel__slide {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 100%;
  height: 100%;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  margin: 0;
  display: block;
}

.carousel__slide--portrait-up img {
  object-position: 50% 0% !important;
  object-fit: cover !important;
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.carousel__dots {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.carousel__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
}

.carousel__dot[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
}

.carousel__about-btn {
  display: flex;
  width: fit-content;
  margin: var(--space-1) auto 0;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(192, 107, 78, 0.28);
}

.carousel__about-btn:hover,
.carousel__about-btn:focus-visible {
  background: var(--accent-dark);
  color: #fff;
}

.about-card__more {
  margin-top: var(--space-2);
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
}

.about-card__more summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.about-card__more summary::-webkit-details-marker {
  display: none;
}

.about-card__expanded {
  margin-top: var(--space-2);
  color: var(--muted);
}

.section {
  padding: var(--space-5) clamp(1.5rem, 6vw, 6rem);
}

.section__heading {
  max-width: 720px;
  margin-bottom: var(--space-4);
}

.section__subline {
  color: var(--muted);
  margin: 0;
}

.work__grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.work__card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: grid;
  gap: var(--space-2);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.work__card:hover,
.work__card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(30, 27, 22, 0.12);
  border-color: rgba(30, 27, 22, 0.25);
}

.work__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.case-detail__image {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: 0 auto var(--space-3);
  display: block;
}

.case-detail__content {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.case-detail .section__heading {
  max-width: 960px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.about-page .section__heading {
  text-align: center;
}

.about-page .about-card {
  max-width: 720px;
  margin: 0 auto;
  margin-bottom: var(--space-4);
}

.about-page .case-detail {
  padding-top: var(--space-3);
}

.about-lead {
  margin-top: 0;
}

.outcome-box {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(192, 107, 78, 0.12);
  border: 1px solid rgba(192, 107, 78, 0.25);
}

.outcome-box h2 {
  margin-top: 0;
}

.work__tags {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--accent-dark);
  margin: 0;
}

.text-link {
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.case-detail__back {
  display: flex;
  width: fit-content;
  margin: var(--space-4) auto 0;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  text-underline-offset: 0;
  box-shadow: 0 10px 24px rgba(192, 107, 78, 0.28);
}

.case-detail__back:hover,
.case-detail__back:focus-visible {
  background: var(--accent-dark);
  color: #fff;
}

.cases__list {
  display: grid;
  gap: var(--space-3);
}

.case {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  border: 1px solid var(--line);
  max-width: 720px;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}

.service-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.85);
  display: grid;
  gap: var(--space-2);
}

.service-card__list {
  color: var(--muted);
  margin: 0;
}

.service-card__trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact {
  background: var(--text);
  color: #fdf8f4;
  border-radius: 2.5rem 2.5rem 0 0;
}

.contact .section__heading p {
  color: rgba(253, 248, 244, 0.8);
}

.contact__form {
  display: grid;
  gap: var(--space-2);
  max-width: 520px;
}

.contact .btn-cta {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  background: #c0392b;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 22px 40px rgba(192, 57, 43, 0.55);
}

.contact .btn-cta:hover,
.contact .btn-cta:focus-visible {
  background: #c0392b;
  box-shadow: 0 22px 40px rgba(192, 57, 43, 0.55);
}

.form-placeholder {
  border: 1px dashed rgba(253, 248, 244, 0.5);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  margin: 0 0 var(--space-1);
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.9rem;
}

.field input,
.field textarea {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(253, 248, 244, 0.3);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.9rem 1rem;
  color: inherit;
  font-size: 1rem;
  font-family: inherit;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #ffb4a6;
  background: rgba(255, 180, 166, 0.15);
}

.field__error {
  min-height: 1.2em;
  color: #ffb4a6;
  font-size: 0.85rem;
}

.form__note {
  margin: 0;
  color: rgba(253, 248, 244, 0.75);
  font-size: 0.9rem;
}

.footer {
  padding: var(--space-3) clamp(1.5rem, 6vw, 6rem) var(--space-4);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.contact-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(192, 107, 78, 0.35);
  z-index: 100;
}

.contact-float:hover {
  background: var(--accent-dark);
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__right {
    order: 2;
  }

  .hero__left {
    order: 1;
  }
}

@media (max-width: 1024px) {
  .nav {
    align-items: center;
  }

  .nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-left: auto;
  }

  .nav__menu {
    display: none;
    width: min(100%, 320px);
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-2);
    margin: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 18px 30px rgba(30, 27, 22, 0.12);
    position: absolute;
    right: 0;
    top: calc(100% + 0.6rem);
    z-index: 200;
  }

  .nav__menu.is-open {
    display: flex;
  }

  .hero__cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-card {
    padding: var(--space-2);
  }

  .carousel,
  .carousel__controls {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
