/* Fabian Camera case study — page styles (built on css/tokens.css) */

:root {
  --cs-brown: #6b4a2f;
  --cs-brown-dark: #563b26;
  --cs-brown-soft: #c4b7ac;
  --cs-gold: #b97a1c;
  --cs-added: #6d8365;
  --cs-removed: #974336;
  --cs-radius: 16px;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 20px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: inherit; }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.container {
  width: min(var(--content-width), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 8px 16px;
  background: var(--color-surface);
  color: var(--color-ink);
}
.skip-link:focus { left: 16px; top: 16px; }

/* Header */

.site-header { position: relative; z-index: 10; height: 80px; display: flex; align-items: center; }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 22px;
  line-height: 38px;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav { display: flex; align-items: center; gap: 40px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.btn--primary {
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--color-accent);
  color: #fff;
  white-space: nowrap;
}
.btn--primary:hover { background: #26443d; }
.btn--primary:focus-visible { outline-color: var(--color-ink); }

.btn--figma {
  align-self: flex-start;
  min-height: 48px;
  padding: 8px 16px;
  border: 1px solid var(--cs-brown);
  border-radius: 12px;
  background: var(--cs-brown);
  color: #fff;
  font-weight: 400;
  font-size: 20px;
  line-height: 32px;
}
.btn--figma:hover { background: var(--cs-brown-dark); }

/* Hero */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 358px;
  overflow: hidden;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 57%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
}

.hero__logo {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.hero__logo img:first-child { width: 394px; max-width: 62vw; height: auto; }
.hero__logo img:last-child { width: 284px; max-width: 45vw; height: auto; }

/* Quote and tagline */

.tagline,
.quote {
  margin: 0;
  padding: 56px 48px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 36px;
  line-height: 48px;
  color: var(--cs-gold);
  text-align: center;
}

.quote--final { max-width: 1440px; margin-inline: auto; }

/* Sections */

.section-title {
  margin: 0;
  padding-top: 72px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
}

.subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 38px;
}

.block {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-block: 56px;
}

.prose { display: flex; flex-direction: column; gap: 24px; }
.prose p { margin: 0; }

.prose__title {
  margin: 0;
  font-size: 25px;
  font-weight: 700;
  line-height: 28px;
}

.prose__title--lg { font-size: 28px; }

/* Solution */

.solution { display: flex; flex-direction: column; gap: 40px; }

.shots { display: grid; gap: 24px; }

.shots--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 888px;
  margin-inline: auto;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Research insights */

.insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: insight;
  color: var(--cs-brown);
}

.insight {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--cs-brown);
  border-radius: var(--cs-radius);
  counter-increment: insight;
}

.insight p { margin: 0; color: var(--cs-brown-dark); }

.insight__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 28px;
}
.insight__title::before { content: counter(insight) ". "; }

/* Persona */

.persona {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--cs-brown);
  border-radius: var(--cs-radius);
  color: var(--cs-brown);
}

.persona__top { display: flex; align-items: center; gap: 32px; }

.persona__photo {
  flex: 0 0 auto;
  width: 301px;
  height: 301px;
  border-radius: 16px;
  object-fit: cover;
}

.persona__intro { display: flex; flex-direction: column; gap: 8px; }

.persona__name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.persona__quote { margin: 0; }

.persona__label {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.persona__list {
  margin: 0;
  padding-left: 30px;
  font-size: 20px;
  line-height: 1.5;
}

.persona__details { display: flex; flex-direction: column; gap: 8px; }
.persona__details .persona__label:not(:first-child) { margin-top: 8px; }

/* Carousels */

.carousel { padding-bottom: 24px; }

.carousel__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.carousel__controls { display: flex; gap: 16px; }

.carousel__btn {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 8px;
  border: 1px solid var(--cs-brown);
  border-radius: 50%;
  background: var(--color-surface);
  cursor: pointer;
}
.carousel__btn:hover:not(:disabled) {
  background: var(--cs-brown-soft);
  border-color: var(--cs-brown-dark);
}
.carousel__btn:disabled { opacity: 0.35; cursor: default; }

.carousel__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 8px;
}
.carousel__track:focus-visible { outline-offset: -3px; }

.carousel__track > * {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}

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

.slide__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 28px;
  color: var(--cs-brown);
}

.slide__desc {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  color: var(--cs-brown);
}

.slide--stacked { gap: 16px; }
.slide--stacked .shots { margin-top: 8px; }

.slide--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

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

.slide__shots { display: flex; gap: 24px; }

.slide__shots img {
  display: block;
  width: 280px;
  min-width: 0;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Design changes */

.slide--change { gap: 24px; }

.change-pair {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.change-pair--triple { gap: 8px; }

.change-screen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 300px;
  min-width: 0;
  max-width: 300px;
  margin: 0;
}

.change-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  line-height: 28px;
}
.change-label--removed { color: var(--cs-removed); }
.change-label--added { color: var(--cs-added); }

.change-screen__frame { position: relative; }

.change-screen__frame img:not(.mark) {
  display: block;
  width: 100%;
  height: auto;
}

.mark {
  position: absolute;
  height: auto;
  pointer-events: none;
}

/* Annotation positions taken from the Figma layers, as % of the screen frame */
.mark--a { left: 57.75%; top: 26.70%; width: 6.72%; }
.mark--b { left: 58.83%; top: 26.86%; width: 6.50%; }
.mark--c { left: 20.83%; top: 61.50%; width: 30.55%; }
.mark--d { left: 24.17%; top: 60.72%; width: 24.16%; }
.mark--e { left: 80.50%; top: 71.40%; width: 4.60%; }
.mark--f { left: 79.40%; top: 18.90%; width: 4.50%; }

.change-arrow {
  flex: 0 0 auto;
  width: 119px;
  height: auto;
  align-self: center;
  margin-top: 28px;
}

/* Design system */

.ds-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.ds-block {
  display: flex;
  flex: 1 1 320px;
  flex-direction: column;
  gap: 40px;
  max-width: 439px;
}

.ds-block__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 28px;
}

.ds-type { display: flex; flex-direction: column; gap: 32px; }

.ds-type__heading {
  margin: 0 0 40px;
  font-family: "Montserrat", var(--font-sans);
  font-weight: 700;
  font-size: clamp(48px, 5.5vw, 76px);
  line-height: 1.21;
}
.ds-type__heading:nth-of-type(2) { margin-bottom: 0; }

.ds-type__body {
  margin: 0 0 12px;
  font-family: "Open Sans", var(--font-sans);
  font-size: 20px;
  line-height: 32px;
}
.ds-type__body:last-child { margin-bottom: 0; }

.swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 120px));
  margin: 0;
  padding: 0;
  list-style: none;
}

.swatch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 140px;
  padding: 50px 8px 0;
  text-align: center;
}

.swatch--primary { background: #6b4a2f; color: #fff; }
.swatch--black { background: #000; color: #fff; }
.swatch--white { background: #fff; color: #111; border: 1px solid #000; }

.swatch__step {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(10, 10, 10, 0.6);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.swatch__contrast {
  font-size: 10px;
  font-weight: 500;
  line-height: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.swatch__hex { font-size: 12px; font-weight: 500; line-height: 18px; }

/* Going forward */

.columns { display: flex; gap: 40px; }
.columns > .prose { flex: 1 1 0; min-width: 0; }

.list { margin: 0; padding-left: 30px; font-size: 20px; line-height: 32px; }

/* Footer */

.site-footer { padding-block: 21px; }

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.site-footer__contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 16px;
  font-weight: 500;
  line-height: 38px;
}

.site-footer__contact span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-footer__contact a { text-decoration: none; }
.site-footer__contact a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__linkedin { text-decoration: underline !important; text-underline-offset: 2px; }

/* Contact popover */

.site-nav__action {
  position: relative;
}

.contact-dialog {
  position: absolute;
  inset: 0 auto auto 0;
  margin: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 32px);
  padding: 16px;
  border: 0;
  border-radius: 8px;
  background: var(--color-bg);
  box-shadow: 0 4px 4px 4px rgb(0 0 0 / 0.25);
  overflow: auto;
}

@media (max-width: 768px) {
  /* Keep the popover inside the viewport where the trigger sits near the right edge */
  .contact-dialog {
    inset: 0 0 auto auto;
  }
}

.contact-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contact-dialog__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 38px;
  color: var(--color-accent);
}

.contact-dialog__close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 4px;
  border: 0;
  background: none;
  color: var(--color-ink);
  line-height: 0;
  cursor: pointer;
}

.contact-dialog__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  font-weight: 500;
  line-height: 38px;
}

.contact-dialog__list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Feather (MIT) stroke icons, 24px grid scaled down */
.contact-dialog__list svg,
.site-footer__contact svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-dialog__list a { text-decoration: none; }
.contact-dialog__list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact-dialog__linkedin { text-decoration: underline !important; text-underline-offset: 2px; }

/* Responsive */

@media (max-width: 1024px) {
  .section-title { font-size: 36px; }
  .block { padding-block: 48px; }
}

@media (max-width: 900px) {
  .site-nav { gap: 24px; }
  .insights { grid-template-columns: 1fr; gap: 24px; }
  .persona__top { flex-direction: column; align-items: flex-start; gap: 24px; }
  .persona__photo { width: min(301px, 100%); height: auto; aspect-ratio: 1; }
  .ds-grid { flex-direction: column; gap: 48px; }
  .ds-block { max-width: 100%; }
  .columns { flex-direction: column; gap: 32px; }
}

@media (max-width: 768px) {
  body { font-size: 18px; line-height: 26px; }
  .section-title { font-size: 32px; padding-top: 56px; }
  .subtitle { font-size: 18px; line-height: 30px; }
  .prose__title { font-size: 22px; }
  .prose__title--lg { font-size: 24px; }
  .insight__title,
  .slide__title { font-size: 22px; }
  .slide__desc { font-size: 18px; line-height: 26px; }
  .slide--split { grid-template-columns: 1fr; align-items: start; }
  .slide__shots img { width: auto; flex: 0 1 280px; }
  .tagline,
  .quote { font-size: 30px; line-height: 40px; padding: 48px 24px; }
  .persona__list { font-size: 18px; }
  .list { font-size: 18px; line-height: 28px; }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  .hero { height: 260px; }
  .change-pair { flex-direction: column; align-items: center; }
  .change-arrow { display: none; }
  .change-screen { width: min(300px, 100%); max-width: 100%; }
  .change-pair--triple .change-screen { width: min(300px, 100%); }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
  .site-footer__contact { flex-direction: column; align-items: flex-start; }
  .persona__photo { width: min(150px, 100%); }
}

@media (max-width: 560px) {
  .site-header { height: auto; padding-block: 14px; }
  .site-header__inner { flex-wrap: wrap; gap: 12px 16px; }
  .site-nav { margin-left: auto; gap: 16px; }
  .btn--primary { font-size: 16px; padding: 8px 12px; }
  .brand { font-size: 20px; }
}

@media (max-width: 480px) {
  .section-title { font-size: 28px; }
  .prose__title--lg { font-size: 22px; }
  .shots { gap: 12px; }
  .tagline,
  .quote { font-size: 24px; line-height: 32px; padding: 40px 16px; }
  .carousel__btn { width: 48px; height: 48px; }
  .ds-type__heading { font-size: 44px; }
}
