:root {
  --green-950: #0b2f24;
  --green-900: #123c2f;
  --green-700: #27624e;
  --green-100: #e8f0ed;
  --orange: #f47920;
  --orange-dark: #d95f0b;
  --ink: #13251f;
  --muted: #62716c;
  --line: #dfe7e3;
  --surface: #f4f7f5;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(18, 60, 47, 0.1);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 4%, rgba(244, 121, 32, 0.09), transparent 20rem),
    var(--white);
}

button, input, textarea { font: inherit; }

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

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--green-900);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark { width: 32px; height: 32px; position: relative; display: inline-block; }
.brand-mark i, .brand-mark b { position: absolute; display: block; border-radius: 1px; transform: skewY(-28deg); }
.brand-mark i { width: 13px; height: 23px; left: 2px; top: 4px; background: var(--green-900); }
.brand-mark b { width: 13px; height: 23px; right: 2px; top: 4px; background: var(--orange); }

.topbar-label {
  color: var(--green-700);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--green-100);
}

main { width: min(1180px, 90vw); margin: 0 auto; }

.intro { padding: 64px 0 38px; max-width: 760px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--green-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2 { margin-top: 0; color: var(--green-950); }

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.intro-text {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 0 0 72px;
}

.product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product-card:hover { transform: translateY(-5px); border-color: #c8d6d0; box-shadow: var(--shadow); }

.product-image-wrap { position: relative; aspect-ratio: 1 / 0.92; overflow: hidden; background: var(--surface); }

.product-image { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 320ms ease; }
.product-card:hover .product-image { transform: scale(1.025); }

.badge {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--green-950);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.product-body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.product-body h2 { margin-bottom: 10px; font-size: 1.35rem; letter-spacing: -0.02em; }
.product-body p { min-height: 4.5em; margin: 0 0 22px; color: var(--muted); line-height: 1.5; }

.order-button, .submit-button, .secondary-button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 13px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.order-button, .submit-button { color: var(--white); background: var(--orange); box-shadow: 0 8px 18px rgba(244, 121, 32, 0.2); }
.order-button { margin-top: auto; }
.order-button:hover, .submit-button:hover { background: var(--orange-dark); }
.order-button:active, .submit-button:active, .secondary-button:active { transform: translateY(1px); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 5vw calc(28px + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, 0.75);
  background: var(--green-950);
  font-size: 0.86rem;
}

.order-dialog {
  width: min(510px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 28px 90px rgba(5, 27, 20, 0.3);
}

.order-dialog::backdrop { background: rgba(8, 28, 22, 0.58); backdrop-filter: blur(4px); }
.dialog-panel { position: relative; padding: 30px; background: var(--white); }
.dialog-panel h2 { margin-bottom: 24px; padding-right: 36px; font-size: 1.7rem; line-height: 1.15; }

.close-button {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--green-900);
  background: var(--green-100);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: var(--green-950); font-size: 0.9rem; font-weight: 750; }
.optional { margin-left: 5px; color: var(--muted); font-size: 0.78rem; font-weight: 500; }

input, textarea {
  width: 100%;
  border: 1px solid #cdd9d4;
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  color: var(--ink);
  background: var(--white);
  resize: vertical;
}

input:focus, textarea:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(39, 98, 78, 0.12); }

.quantity-control { display: grid; grid-template-columns: 48px 1fr 48px; overflow: hidden; border: 1px solid #cdd9d4; border-radius: 12px; }
.quantity-control button { border: 0; color: var(--green-900); background: var(--green-100); font-size: 1.35rem; cursor: pointer; }
.quantity-control input { border: 0; border-radius: 0; text-align: center; appearance: textfield; }
.quantity-control input::-webkit-inner-spin-button { appearance: none; }

.success-view { text-align: center; }
.success-view h2 { margin-bottom: 18px; }
.success-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; color: var(--white); background: var(--green-700); font-size: 1.8rem; font-weight: 800; }

#order-summary {
  margin: 0 0 18px;
  padding: 16px;
  overflow: auto;
  border-radius: 13px;
  color: var(--green-950);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
}

.secondary-button { margin-top: 10px; color: var(--green-900); background: var(--green-100); box-shadow: none; }
.secondary-button:hover { background: #dce9e4; }
.copy-status { min-height: 1.4em; margin: 12px 0 0; color: var(--green-700); font-size: 0.86rem; }
.form-status { min-height: 1.4em; margin: -4px 0 0; color: #a63b19; font-size: 0.88rem; line-height: 1.45; }
.submit-button:disabled { cursor: wait; opacity: 0.7; }

:focus-visible { outline: 3px solid rgba(244, 121, 32, 0.55); outline-offset: 3px; }

@media (max-width: 820px) {
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog .product-card:last-child { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; }
  .catalog .product-card:last-child .product-image-wrap { aspect-ratio: auto; min-height: 300px; }
}

@media (max-width: 560px) {
  .topbar { min-height: 62px; padding-inline: 18px; }
  .topbar-label { display: none; }
  main { width: min(100% - 28px, 460px); }
  .intro { padding: 40px 0 28px; }
  h1 { font-size: clamp(2.15rem, 12vw, 3.3rem); }
  .intro-text { font-size: 1rem; }
  .catalog { grid-template-columns: 1fr; gap: 16px; padding-bottom: 48px; }
  .catalog .product-card:last-child { grid-column: auto; display: flex; }
  .catalog .product-card:last-child .product-image-wrap { aspect-ratio: 1 / 0.92; min-height: 0; }
  .product-body p { min-height: 0; }
  footer { flex-direction: column; gap: 6px; padding-inline: 18px; }
  .order-dialog { width: 100%; max-width: none; max-height: calc(100vh - 12px); margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .dialog-panel { padding: 26px 20px calc(24px + env(safe-area-inset-bottom)); }
}

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