:root {
  color-scheme: light;
  --ink: #2a3e66;
  --ink-soft: #626f8b;
  --ivory: #f4f5f7;
  --paper: #ffffff;
  --line: #d8dae0;
  --gold: #4e5b77;
  --gold-pale: #babcc3;
  --sage: #e7e9ed;
  --blush: #f0f1f4;
  --shadow: 0 24px 70px rgba(42, 62, 102, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(78, 91, 119, 0.3);
  outline-offset: 2px;
}

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

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: block;
}

.brand-logo {
  display: block;
  width: 210px;
  height: auto;
}

.private-badge {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-weight: 700;
}

.private-badge span {
  color: #79859c;
  font-size: 9px;
  margin-right: 5px;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 90px;
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 70px;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 470px;
  height: 470px;
  top: 20px;
  left: -250px;
  border: 1px solid var(--gold-pale);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgba(186, 188, 195, 0.17), 0 0 0 120px rgba(186, 188, 195, 0.1);
}

.eyebrow,
.step-label {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Playfair Display", serif;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(45px, 5.4vw, 72px);
  line-height: 0.98;
  font-weight: 600;
}

h1 em {
  color: var(--gold);
  font-weight: 500;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.06;
}

.intro {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}

.planner-card {
  padding: 32px;
  border: 1px solid rgba(216, 218, 224, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.card-heading,
.section-heading,
.panel-title,
.summary-item,
.summary-actions,
.summary-footer,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-heading {
  align-items: flex-start;
  gap: 20px;
}

.card-heading h2 {
  font-family: "DM Sans", sans-serif;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.text-button {
  border: 0;
  padding: 2px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--gold-pale);
  text-underline-offset: 4px;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 25px 0 20px;
  padding: 5px;
  border-radius: 14px;
  background: var(--ivory);
}

.preset {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  font-weight: 700;
}

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

.preset.active {
  border-color: var(--line);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 5px 15px rgba(42, 62, 102, 0.07);
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span:first-child {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.featured-field {
  grid-column: span 2;
}

.wide-field {
  grid-column: span 2;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  font-weight: 700;
}

.field input {
  padding: 0 66px 0 14px;
}

.field select {
  padding: 0 34px 0 14px;
}

.input-suffix {
  position: relative;
}

.input-suffix small {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--ink-soft);
  transform: translateY(-50%);
}

.quick-math {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.quick-math div {
  padding: 0 12px;
  border-right: 1px solid var(--line);
}

.quick-math div:first-child {
  padding-left: 0;
}

.quick-math div:last-child {
  border-right: 0;
  padding-right: 0;
}

.quick-math strong,
.quick-math span {
  display: block;
}

.quick-math strong {
  font-family: "Playfair Display", serif;
  font-size: 27px;
}

.quick-math span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.menu-section,
.summary-section {
  padding: 92px max(20px, calc((100vw - 1180px) / 2));
}

.menu-section {
  background: var(--ink);
  color: #fff;
}

.menu-section .step-label {
  color: #d8dae0;
}

.section-heading {
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 38px;
}

.section-heading > p,
.summary-heading > div > p:last-child {
  max-width: 430px;
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  line-height: 1.6;
}

.mix-panels {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}

.mix-panel {
  padding: 27px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.panel-title {
  margin-bottom: 18px;
}

.panel-title h3 {
  margin-bottom: 0;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-title span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--gold-pale);
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
}

.mix-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.soda-panel .mix-list {
  grid-template-columns: 1fr;
}

.mix-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
}

.mix-name,
.mix-percent {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.mix-name {
  min-width: 0;
  padding: 0 12px;
}

.mix-percent-wrap {
  position: relative;
}

.mix-percent {
  width: 100%;
  padding: 0 24px 0 9px;
}

.mix-percent-wrap::after {
  content: "%";
  position: absolute;
  right: 9px;
  top: 50%;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  transform: translateY(-50%);
  pointer-events: none;
}

.mix-name::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

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

.summary-heading {
  align-items: flex-end;
}

.summary-heading > div > p:last-child {
  margin-top: 10px;
  color: var(--ink-soft);
}

.summary-actions {
  gap: 10px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 11px;
  font-weight: 700;
}

.primary-button {
  border: 1px solid var(--ink);
  color: #fff;
  background: var(--ink);
}

.primary-button:hover {
  background: #1f3154;
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
}

.shopping-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.summary-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.summary-group-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--ivory);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-item {
  min-height: 94px;
  gap: 14px;
  padding: 17px 20px;
  border-bottom: 1px solid #e7e9ed;
}

.summary-item:last-child {
  border-bottom: 0;
}

.item-copy {
  min-width: 0;
}

.item-copy h3 {
  overflow: hidden;
  margin-bottom: 4px;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-copy p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.quantity-control {
  display: grid;
  grid-template-columns: 30px minmax(58px, auto) 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.quantity-control button {
  width: 30px;
  height: 38px;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 18px;
}

.quantity-control button:hover {
  color: var(--ink);
  background: var(--ivory);
}

.quantity-value {
  padding: 0 5px;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 19px;
  font-weight: 600;
  white-space: nowrap;
}

.summary-footer {
  align-items: flex-start;
  gap: 40px;
  margin-top: 24px;
}

.summary-footer p {
  max-width: 690px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  padding: 12px 17px;
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 46px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .mix-panels {
    grid-template-columns: 1fr;
  }

  .soda-panel .mix-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    width: min(100% - 28px, 1180px);
    padding: 18px 0;
  }

  .brand-logo {
    width: 168px;
  }

  .private-badge {
    padding: 7px 9px;
    font-size: 10px;
  }

  .hero {
    width: min(100% - 28px, 1180px);
    padding: 45px 0 65px;
  }

  h1 {
    font-size: 46px;
  }

  .planner-card,
  .mix-panel {
    padding: 21px;
    border-radius: 17px;
  }

  .card-heading,
  .section-heading,
  .summary-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-heading .text-button {
    align-self: flex-end;
    margin-top: -8px;
  }

  .controls-grid,
  .mix-list,
  .soda-panel .mix-list,
  .shopping-summary {
    grid-template-columns: 1fr;
  }

  .featured-field {
    grid-column: auto;
  }

  .wide-field {
    grid-column: auto;
  }

  .quick-math strong {
    font-size: 22px;
  }

  .menu-section,
  .summary-section {
    padding: 68px 14px;
  }

  .section-heading {
    align-items: flex-start;
    margin-bottom: 28px;
  }

  .summary-actions {
    width: 100%;
  }

  .summary-actions button {
    flex: 1;
  }

  .summary-item {
    padding: 15px;
  }

  .summary-footer {
    gap: 18px;
  }

  footer {
    width: calc(100% - 28px);
    gap: 15px;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  @page {
    margin: 0.55in;
  }

  body {
    background: #fff;
  }

  .site-header,
  .hero,
  .menu-section,
  footer,
  .summary-actions,
  .summary-footer .text-button,
  .quantity-control button,
  .toast {
    display: none !important;
  }

  .summary-section {
    padding: 0;
  }

  .summary-heading {
    display: block;
  }

  .shopping-summary {
    gap: 10px;
  }

  .summary-group,
  .summary-item {
    break-inside: avoid;
  }

  .quantity-control {
    border: 0;
    grid-template-columns: 1fr;
  }

  .summary-footer {
    display: block;
  }
}

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

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