:root {
  --plum: #4a1e3c;
  --ink: #241813;
  --crust: #241813;
  --paper: #fbf8f3;
  --flour: #f4efe7;
  --warm: #7a6a5f;
  --rule: #dcd1c1;
  --gold: #8a682f;
  --champagne: #e0cda8;
  --text-on-dark-secondary: rgb(244 239 231 / 74%);
  --text-on-plum-secondary: rgb(244 239 231 / 82%);
  --rule-on-dark: rgb(244 239 231 / 16%);
  --shell: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-space: clamp(72px, 8.5vw, 112px);
  --type-display: 76px;
  --type-statement: 44px;
  --type-heading: 32px;
  --type-heading-small: 28px;
  --type-subheading: 20px;
  --type-body: 17px;
  --type-small: 14px;
  --type-action: 16px;
  --type-proof: 12px;
  --type-sku: 28px;
  --leading-display: 1.08;
  --leading-statement: 1.14;
  --leading-body: 1.6;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.dialog-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

p,
h1,
h2,
h3 {
  overflow-wrap: break-word;
}

::selection {
  background: var(--champagne);
  color: var(--ink);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 1000;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
}

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

.shell {
  width: min(100%, var(--shell));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section-paper {
  background: var(--paper);
}

.section-flour {
  background: var(--flour);
}

.section-crust {
  background: var(--crust);
  color: var(--flour);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(251 248 243 / 94%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--rule);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: block;
  width: 156px;
  flex: none;
  line-height: 0;
}

.wordmark img {
  display: block;
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 30px);
  font-size: var(--type-small);
}

.site-nav > a:not(.button) {
  padding-block: 22px;
}

.site-nav > a:not(.button):hover,
.site-nav > a:not(.button):focus-visible {
  color: var(--plum);
}

.menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: var(--plum);
  cursor: pointer;
  padding: 10px 0;
}

.button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  padding: 16px 36px;
  font-size: var(--type-action);
  font-weight: 500;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button-primary {
  background: var(--plum);
  color: var(--flour);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--ink);
}

.button-secondary {
  background: transparent;
  border-color: var(--rule);
  color: var(--plum);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--plum);
}

.button-paper {
  background: var(--flour);
  color: var(--plum);
}

.button-paper:hover,
.button-paper:focus-visible {
  background: var(--champagne);
  color: var(--ink);
}

.button-small {
  min-height: 36px;
  padding: 9px 20px;
  font-size: var(--type-small);
}

.eyebrow,
.meta,
.section-label,
.loaf-spec,
.application-form label > span {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--type-proof);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--warm);
  font-weight: 400;
}

.eyebrow,
.meta,
.section-label,
.loaf-spec {
  margin: 0;
}

.eyebrow-gold {
  color: var(--gold);
}

.meta-gold {
  color: var(--warm);
}

.section-label {
  display: flex;
  gap: 16px;
  color: var(--warm);
  margin-bottom: clamp(34px, 4.5vw, 52px);
}

.section-label-light {
  color: var(--champagne);
}

.section-label-plum {
  color: var(--text-on-plum-secondary);
}

.hero {
  background: var(--paper);
  min-height: calc(100svh - 68px);
  display: flex;
  align-items: center;
}

.hero .shell {
  padding-block: var(--section-space);
}

.hero h1 {
  max-width: 1000px;
  margin: 28px 0 0;
  font-size: var(--type-display);
  font-weight: 400;
  letter-spacing: -0.024em;
  line-height: var(--leading-display);
}

.hero-line {
  display: block;
}

.hero-copy {
  max-width: 750px;
  margin: 24px 0 clamp(36px, 3vw, 40px);
  color: var(--ink);
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: clamp(72px, 9vw, 108px);
}

.fact,
.comparison article,
.loaf {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}

.fact .meta {
  color: var(--warm);
  margin-bottom: 12px;
}

.fact > p:last-child {
  margin: 0;
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.gap-section .shell,
.membership-section .shell,
.community-section .shell,
.breads-section .shell {
  padding-block: var(--section-space);
}

.breads-section .shell {
  min-height: calc(100svh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gap-section .shell {
  min-height: calc(100svh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gap-title,
.section-intro h2,
.community-layout h2,
.partner-layout h2 {
  margin: 0;
  font-size: var(--type-statement);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: var(--leading-statement);
}

.comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(44px, 7vw, 88px);
  margin-top: clamp(48px, 6vw, 76px);
}

.comparison .meta {
  margin-bottom: 18px;
}

.comparison article > p:last-child {
  max-width: 43ch;
  margin: 0;
  font-size: var(--type-subheading);
  line-height: 1.5;
}

.gap-close {
  max-width: none;
  margin: clamp(48px, 5vw, 64px) 0 0;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
  color: var(--plum);
  font-size: var(--type-heading-small);
  line-height: 1.35;
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(40px, 8vw, 100px);
  align-items: end;
}

.section-intro > p {
  max-width: 48ch;
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.section-intro-light > p {
  color: var(--text-on-dark-secondary);
}

.section-intro-light {
  display: block;
}

.section-intro-light > p {
  max-width: none;
  margin-top: 18px;
}

.loaf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3.4vw, 44px);
  margin-top: clamp(54px, 7vw, 84px);
}

.loaf {
  border-top-color: var(--rule-on-dark);
  display: flex;
  flex-direction: column;
}

.loaf-spec {
  color: var(--champagne);
}

.loaf h3 {
  margin: 18px 0 22px;
  color: var(--flour);
  font-size: var(--type-sku);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.08;
}

.loaf > p:last-child {
  margin: 0;
  color: var(--text-on-dark-secondary);
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.product-note {
  max-width: none;
  margin: clamp(48px, 5vw, 64px) 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--rule-on-dark);
  color: var(--text-on-dark-secondary);
  font-size: var(--type-small);
  line-height: var(--leading-body);
}

.membership-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(64px, 8vw, 112px);
  align-items: center;
  min-height: calc(100svh - 68px);
  padding-block: var(--section-space);
}

.membership-copy .section-label {
  margin-bottom: 32px;
}

.membership-copy h2 {
  max-width: 720px;
  margin: 0;
  font-size: var(--type-statement);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: var(--leading-statement);
}

.membership-benefits {
  margin-top: clamp(44px, 5vw, 62px);
}

.membership-benefits article {
  padding: 20px 0 22px;
  border-top: 1px solid var(--rule);
}

.membership-benefits h3 {
  margin: 0 0 8px;
  font-size: var(--type-subheading);
  font-weight: 500;
  line-height: 1.3;
}

.membership-benefits p {
  max-width: 46ch;
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.membership-device {
  display: grid;
  min-width: 0;
  margin: 0;
  place-items: center;
}

.membership-device img {
  display: block;
  width: min(88%, 310px);
  height: auto;
}

.model-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(64px, 7vw, 96px);
  align-items: center;
  min-height: calc(100svh - 68px);
  padding-block: var(--section-space);
}

.model-definition .section-label {
  margin-bottom: 32px;
}

.model-definition h2 {
  max-width: none;
  margin: 0;
  font-size: var(--type-statement);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: var(--leading-statement);
}

.model-lead {
  max-width: 40ch;
  margin: 26px 0 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.model-principles {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.model-principles article {
  width: 100%;
  padding: 20px 0 24px;
  border-top: 1px solid var(--rule);
}

.model-principles h3 {
  margin: 0 0 10px;
  font-size: var(--type-subheading);
  font-weight: 500;
  line-height: 1.3;
}

.model-principles p {
  max-width: 44ch;
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.community-section {
  border-top: 1px solid var(--rule);
}

.community-layout h2 {
  max-width: 16ch;
}

.community-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: calc(100svh - 68px);
  align-items: stretch;
}

.community-copy-wrap {
  display: flex;
  align-items: center;
  padding-left: max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter)));
  padding-right: clamp(44px, 6vw, 88px);
}

.community-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.community-copy .section-label {
  margin-bottom: 32px;
}

.community-copy > p:last-child {
  max-width: 40ch;
  margin: 28px 0 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.community-image {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--flour);
}

.community-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
  filter: saturate(0.92) contrast(0.98);
}

.partner-section {
  background: var(--plum);
  color: var(--flour);
  min-height: clamp(480px, 62svh, 560px);
}

.partner-layout {
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-block: var(--section-space);
}

.partner-layout .section-label {
  margin-bottom: 32px;
}

.partner-layout h2 {
  max-width: 760px;
}

.partner-layout > p:last-of-type {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--text-on-plum-secondary);
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.partner-layout .button {
  margin-top: 38px;
}

.site-footer {
  background: var(--plum);
  color: var(--flour);
  border-top: 1px solid rgb(244 239 231 / 18%);
}

.footer-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-block: 22px;
}

.footer-inner p {
  margin: 0;
}

.footer-brand {
  margin: 0;
  width: 142px;
  aspect-ratio: 3057 / 300;
  background: url("assets/breadwell-wordmark-plum.png") center / contain no-repeat;
  filter: brightness(0) invert(1);
}

@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
  .footer-brand {
    background: var(--flour);
    filter: none;
    -webkit-mask: url("assets/breadwell-wordmark-plum.png") center / contain no-repeat;
    mask: url("assets/breadwell-wordmark-plum.png") center / contain no-repeat;
  }
}

.footer-contact {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  color: var(--text-on-plum-secondary);
  font-size: var(--type-small);
  white-space: nowrap;
}

.footer-contact a {
  color: var(--flour);
}

.application-dialog {
  width: min(100% - 32px, 600px);
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

.application-dialog::backdrop {
  background: rgb(36 24 19 / 66%);
  backdrop-filter: blur(4px);
}

.dialog-inner {
  position: relative;
  padding: clamp(28px, 5vw, 48px);
}

.dialog-close {
  position: absolute;
  top: 20px;
  right: 20px;
  border: 0;
  background: transparent;
  color: var(--warm);
  cursor: pointer;
  font-size: var(--type-small);
}

.dialog-close:focus-visible {
  outline: 1px solid var(--plum);
  outline-offset: 2px;
}

.dialog-inner h2 {
  max-width: 470px;
  margin: 20px 0 0;
  font-size: var(--type-heading);
  font-weight: 400;
  line-height: 1.15;
}

.application-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
  padding-top: 0;
  border-top: 0;
}

.application-form label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.application-form label > span {
  color: var(--warm);
}

.application-form input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  padding: 6px 0 11px;
  font-size: var(--type-body);
}

.application-form input:focus {
  border-bottom-color: var(--plum);
}

.form-submit {
  width: 100%;
}

.form-error {
  margin: 0;
  font-size: var(--type-small);
  line-height: 1.55;
}

.form-error {
  min-height: 20px;
  color: var(--plum);
}

.form-error:empty {
  display: none;
}

.success-view {
  padding-block: 18px 4px;
}

.success-view h2 {
  margin-top: 24px;
}

.success-view p {
  margin: 18px 0 28px;
  color: var(--ink);
  font-size: var(--type-small);
  line-height: var(--leading-body);
}

@media (min-width: 900px) {
  .gap-title {
    white-space: nowrap;
  }
}

@media (max-width: 800px) {
  :root {
    --section-space: 72px;
    --type-display: 60px;
    --type-statement: 32px;
    --type-heading: 24px;
    --type-heading-small: 24px;
    --type-body: 16px;
    --type-sku: 24px;
  }

  .header-inner {
    min-height: 62px;
  }

  .menu-button {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 12px var(--gutter) 20px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav > a:not(.button) {
    padding-block: 13px;
  }

  .site-nav .button {
    margin-top: 8px;
  }

  .hero {
    min-height: auto;
  }

  .hero .shell {
    padding-block: var(--section-space);
  }

  .hero-facts,
  .loaf-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .comparison,
  .section-intro,
  .model-layout,
  .membership-layout,
  .community-layout {
    grid-template-columns: 1fr;
  }

  .community-layout {
    align-items: start;
    min-height: 0;
    gap: 0;
  }

  .community-copy-wrap {
    padding: var(--section-space) var(--gutter);
  }

  .community-image {
    width: 100%;
    aspect-ratio: 4 / 5;
  }

  .model-layout {
    gap: 44px;
    align-items: start;
    min-height: auto;
  }

  .membership-layout {
    gap: 52px;
    align-items: start;
    min-height: auto;
  }

  .breads-section .shell {
    min-height: auto;
  }

  .gap-section .shell {
    min-height: auto;
  }

  .membership-copy {
    order: -1;
  }

  .model-definition h2 {
    max-width: 18ch;
  }

  .model-principles {
    margin-top: 0;
  }

  .section-intro {
    align-items: start;
    gap: 24px;
  }

  .loaf-grid {
    margin-top: 54px;
  }

  .partner-section {
    min-height: auto;
  }

  .footer-inner {
    min-height: 0;
    align-items: center;
  }

  .footer-contact {
    align-items: flex-end;
  }
}

@media (max-width: 520px) {
  :root {
    --type-display: 44px;
  }

  .hero-line {
    display: inline;
    margin-left: 0.22em;
  }

  .comparison article > p:last-child {
    font-size: var(--type-body);
    line-height: var(--leading-body);
  }

  .gap-close {
    font-size: var(--type-subheading);
    padding-top: 32px;
  }

  .button {
    width: 100%;
  }

  .dialog-inner h2 {
    font-size: var(--type-heading);
  }

  .wordmark {
    width: 142px;
  }

  .site-footer .shell {
    padding-inline: 12px;
  }

  .footer-inner {
    min-height: 72px;
    gap: 8px;
    padding-block: 18px;
  }

  .footer-brand {
    width: 120px;
  }

  .footer-contact {
    gap: 8px;
    font-size: clamp(10px, 2.8vw, var(--type-proof));
  }

  .comparison {
    gap: 38px;
  }

}

@media (max-width: 340px) {
  .footer-contact {
    font-size: 10px;
  }
}

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

  * {
    transition-duration: 0.01ms !important;
  }
}
