/* Section 04 try it with your restaurant (#perso), owner S2 — design v5 sections/04-try.html (sizes, colours, timings
   as its inline styles). Left: badge, title, text, the name field, the style switch and the colour swatches. Right:
   the decorative browser window (540 x 444, scaled down to the column on narrow screens like the design's zoom), the
   faint blob behind it and, from 760px, the mascot with its speech bubble. The current style carries .is-on; the
   accent colour and the blob shape are custom properties on .try__show (--try-accent, --try-radius). */

.try {
  padding: clamp(56px, 8vw, 120px) var(--mc-gutter);
  overflow-x: clip; /* the blob and the mascot never widen the page */
}
.try__wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}
.try__text { flex: 1 1 420px; min-width: 0; }

/* ---------------------------------------------------------------- text & controls */
.try-badge { margin: 0; }
.try-title { margin-top: 18px; }
.try-intro {
  margin: 16px 0 0;
  max-width: 470px;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--mc-text);
  text-wrap: pretty;
}

.try-label {
  display: block;
  margin-top: 30px;
  padding-left: 6px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
}
.try-label--group { margin-top: 24px; }

.try-input {
  display: block;
  margin-top: 8px;
  width: 100%;
  max-width: 440px;
  height: 60px;
  padding: 0 24px;
  border-radius: 999px;
  border: 2px solid rgba(46, 20, 8, .18);
  background: var(--mc-paper);
  font-family: var(--mc-serif);
  font-size: 22px;
  color: var(--mc-ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.try-input:focus { border-color: var(--mc-ink); box-shadow: 0 0 0 4px rgba(229, 154, 47, .35); }

.try-styles {
  margin-top: 8px;
  display: flex;
  width: 100%;
  max-width: 440px;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--mc-sand);
}
.try-style {
  flex: 1 1 0;
  min-width: 0;
  height: 48px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mc-ink);
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .16s var(--mc-ease-out);
}
.try-style:active { transform: scale(.97); }
.try-style[aria-pressed="true"] { background: var(--mc-ink); color: var(--mc-on-dark); }

.try-swatches { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.try-swatch {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--try-swatch);
  box-shadow: 0 0 0 3px var(--mc-cream), 0 0 0 4px rgba(46, 20, 8, .12);
  cursor: pointer;
  transition: box-shadow .2s ease, transform .16s var(--mc-ease-out);
}
.try-swatch:active { transform: scale(.94); }
.try-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--mc-cream), 0 0 0 6px var(--mc-ink); }
.try-swatch:focus-visible { outline-offset: 7px; } /* outside the ring, so focus never looks like "picked" */

/* ---------------------------------------------------------------- mock-up column */
.try__show {
  flex: 1 1 540px;
  min-width: 0;
  position: relative;
  display: flex;
  justify-content: center;
  padding: 28px 0;
  container-type: inline-size;
}

.try-blob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(460px, 96%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}
.try-blob__shape {
  width: 100%;
  height: 100%;
  background: var(--try-accent);
  opacity: .2;
  border-radius: var(--try-radius);
  transition: background-color .5s ease, border-radius 1.1s var(--mc-ease-inout);
}

.try-mascot {
  position: absolute;
  right: max(0px, calc(50% - 300px));
  bottom: 6px;
  z-index: 3;
  width: 128px;
}
.try-mascot__bubble {
  position: absolute;
  right: 30px;
  bottom: calc(100% - 8px);
  padding: 10px 14px;
  font-size: 15px;
  white-space: nowrap;
}

/* The browser window keeps its 540 x 444 design and is scaled to the column: k = min(1, column / 560px), as the
   design's zoom (window width - 36px) / 560 on phones. The frame takes the scaled size in the layout. */
.try-frame {
  --try-k: 1;
  position: relative;
  width: calc(540px * var(--try-k));
  height: calc(444px * var(--try-k));
}
@supports (width: calc(1px * tan(atan2(1px, 1px)))) {
  .try-frame { --try-k: min(1, tan(atan2(100cqw, 560px))); }
}
/* Browsers without container units / atan2(): stepped scales (column = viewport - 36px below 600px). */
@supports not (width: calc(1px * tan(atan2(1px, 1px)))) {
  @media (max-width: 599.98px) { .try-frame { --try-k: .93; } }
  @media (max-width: 559.98px) { .try-frame { --try-k: .82; } }
  @media (max-width: 499.98px) { .try-frame { --try-k: .72; } }
  @media (max-width: 439.98px) { .try-frame { --try-k: .65; } }
  @media (max-width: 399.98px) { .try-frame { --try-k: .57; } }
  @media (max-width: 359.98px) { .try-frame { --try-k: .5; } }
}
.try-browser {
  position: absolute;
  top: 0;
  left: 0;
  width: 540px;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 60px 90px -40px rgba(46, 20, 8, .55), 0 0 0 1px rgba(46, 20, 8, .08);
  overflow: hidden;
  transform: scale(var(--try-k));
  transform-origin: 0 0;
}
.try-browser__bar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  background: var(--mc-sand);
}
.try-browser__dots { display: flex; gap: 6px; }
.try-browser__dots span { width: 11px; height: 11px; border-radius: 50%; background: #E3A88C; }
.try-browser__dots span:nth-child(2) { background: #EFCB80; }
.try-browser__dots span:nth-child(3) { background: #D9C2A3; }
.try-browser__url {
  flex: 1;
  min-width: 0;
  height: 28px;
  border-radius: 999px;
  background: var(--mc-paper);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mc-text);
}
.try-browser__url svg { flex: none; display: block; }
.try-browser__domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.try-browser__page { position: relative; height: 400px; overflow: hidden; }

.try-tpl { position: absolute; inset: 0; display: none; }
.try-tpl.is-on { display: flex; animation: mcFade .3s ease-out both; }

/* ---------------------------------------------------------------- style 1: Street */
.try-street {
  background: #FFF6EC;
  color: #2A1608;
  padding: 14px 18px;
  flex-direction: column;
  gap: 12px;
}
.try-street__nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.try-street__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.try-street__logo {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--try-accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  transition: background-color .25s ease;
}
.try-street__name {
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.try-street__links {
  flex: none;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #6B4A35;
}
.try-street__order {
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: #2A1608;
  color: #FFFFFF;
  display: flex;
  align-items: center;
}
.try-street__hero {
  border-radius: 22px;
  background: var(--try-accent);
  color: #FFFFFF;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  transition: background-color .25s ease;
}
.try-street__copy { min-width: 0; }
.try-street__title {
  font-weight: 800;
  font-size: 38px;
  line-height: .92;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.try-street__tagline { margin-top: 8px; font-size: 13px; font-weight: 600; }
.try-street__cta {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #2A1608;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.try-street__emoji { flex: none; font-size: 84px; line-height: 1; transform: rotate(-8deg); }
.try-street__items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.try-street__item { border-radius: 16px; background: #FFFFFF; padding: 10px; box-shadow: 0 6px 14px -10px rgba(46, 20, 8, .4); }
.try-street__pic {
  height: 56px;
  border-radius: 12px;
  background: var(--try-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}
.try-street__dish {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.try-street__price {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #6B4A35;
}
.try-street__add {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--try-accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ---------------------------------------------------------------- style 2: Gourmand */
.try-gourmand {
  background: #FFF1F5;
  color: #3B1426;
  padding: 16px 22px 22px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.try-gourmand__nav {
  align-self: stretch;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #7A4A5E;
}
.try-gourmand__logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--try-accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mc-serif);
  font-size: 16px;
  transition: background-color .25s ease;
}
.try-gourmand__welcome {
  margin-top: 16px;
  font-family: var(--mc-hand);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: var(--try-accent);
}
.try-gourmand__name {
  margin-top: 4px;
  max-width: 440px;
  font-family: var(--mc-serif);
  font-size: 38px;
  line-height: 1.02;
  overflow-wrap: anywhere;
}
.try-gourmand__tagline { margin-top: 6px; font-size: 13px; color: #7A4A5E; }
.try-gourmand__items { margin-top: 20px; display: flex; justify-content: center; gap: 18px; }
.try-gourmand__item { width: 110px; display: flex; flex-direction: column; align-items: center; }
.try-gourmand__pic {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--try-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 0 0 4px #FFFFFF, 0 12px 20px -12px rgba(59, 20, 38, .4);
}
.try-gourmand__dish { margin-top: 10px; font-size: 13px; font-weight: 700; }
.try-gourmand__price { margin-top: 2px; font-size: 12px; color: #7A4A5E; }
.try-gourmand__cta {
  margin-top: auto;
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--try-accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 13px;
  transition: background-color .25s ease;
}

/* ---------------------------------------------------------------- style 3: Minimal */
.try-minimal { background: #17141D; color: #F7EFE6; }
.try-minimal__side {
  flex: 0 0 46%;
  min-width: 0;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(247, 239, 230, .1);
}
.try-minimal__kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #BFB4A8;
}
.try-minimal__name {
  margin-top: 14px;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}
.try-minimal__rule {
  margin: 16px 0;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: var(--try-accent);
  transition: background-color .25s ease;
}
.try-minimal__tagline { font-size: 13px; line-height: 1.5; color: #BFB4A8; }
.try-minimal__pickup { margin-top: auto; font-size: 12px; color: #BFB4A8; }
.try-minimal__cta {
  margin-top: 10px;
  height: 40px;
  border-radius: 10px;
  background: var(--try-accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  transition: background-color .25s ease;
}
.try-minimal__menu { flex: 1; min-width: 0; padding: 24px 22px; display: flex; flex-direction: column; }
.try-minimal__items { margin-top: 6px; display: flex; flex-direction: column; }
.try-minimal__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(247, 239, 230, .08);
}
.try-minimal__emoji { font-size: 20px; line-height: 1; }
.try-minimal__dish { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.try-minimal__price { font-size: 13px; color: #BFB4A8; font-variant-numeric: tabular-nums; }
.try-minimal__hero {
  margin-top: auto;
  height: 104px;
  border-radius: 14px;
  background: #231F2B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 54px;
}

/* ---------------------------------------------------------------- phones (design: notMobile) */
@media (max-width: 759.98px) {
  .try-mascot { display: none; }
}
@media (max-width: 359.98px) {
  .try-style { padding: 0 4px; font-size: 14px; } /* "Gourmand" fits at 320px */
}
