@font-face {
  font-family: "Custom Logo Poppins";
  src: url("./assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Custom Logo Poppins";
  src: url("./assets/fonts/Poppins-ExtraBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  color: #17201c;
  background: #f4f2ec;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --green: #00cc66;
  --ink: #17201c;
  --muted: #66716b;
  --line: #d8d8d0;
  --paper: #fffef9;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

button, input, select { font: inherit; }

button, select { cursor: pointer; }

main { width: min(1440px, 100%); margin: auto; padding: 0 clamp(20px, 5vw, 72px) 80px; }

.hero { max-width: none; padding: clamp(32px, 5vw, 66px) 0 52px; }
.eyebrow { margin: 0 0 14px; color: #008c46; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(40px, 5.6vw, 80px); line-height: .95; letter-spacing: -.06em; white-space: nowrap; }
.hero > p:last-child { max-width: none; margin: 30px 0 0; color: var(--muted); font-size: clamp(15px, 1.45vw, 20px); line-height: 1.55; white-space: nowrap; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr); border: 1px solid var(--line); background: var(--paper); box-shadow: 0 24px 70px rgb(31 43 36 / 8%); }
.preview-panel { min-width: 0; padding: clamp(20px, 3vw, 40px); border-right: 1px solid var(--line); }
.preview-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.field-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.background-control { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
select { padding: 8px 30px 8px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; }
.preview { min-height: 390px; display: grid; place-items: center; padding: 40px; overflow: hidden; background-size: 20px 20px; transition: background-color .2s; }
.preview.light { background: #fff; }
.preview.dark { background: #151917; }
.preview.transparent { background-color: #fff; background-image: linear-gradient(45deg, #e6e6e2 25%, transparent 25%), linear-gradient(-45deg, #e6e6e2 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e6e6e2 75%), linear-gradient(-45deg, transparent 75%, #e6e6e2 75%); background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.preview svg { display: block; width: 100%; height: auto; max-height: 350px; outline: 1px dashed rgb(23 32 28 / 14%); outline-offset: -1px; filter: drop-shadow(0 8px 14px rgb(0 0 0 / 7%)); }
.preview.dark svg { outline-color: rgb(255 255 255 / 21%); }
.preview-options { display: flex; align-items: stretch; justify-content: space-between; gap: 12px; margin-top: 16px; }
.colour-controls { min-width: 0; flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f7f7f2; }
.colour-control { min-width: 126px; display: grid; grid-template-columns: 34px auto; align-items: center; column-gap: 9px; padding: 8px 10px; border-radius: 8px; color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgb(20 30 24 / 7%); font-size: 12px; font-weight: 750; }
.colour-control > span { grid-column: 1 / -1; margin-bottom: 6px; }
.colour-control input[type="color"] { width: 34px; height: 30px; padding: 2px; border: 1px solid #c9cec9; border-radius: 7px; background: #fff; cursor: pointer; }
.colour-control input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.colour-control input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.colour-control input[type="color"]::-moz-color-swatch { border: 0; border-radius: 4px; }
.colour-control output { color: var(--muted); font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; }
.preset-button { align-self: center; min-height: 38px; padding: 8px 15px; border: 1px solid #9fc9b2; border-radius: 999px; color: #075c32; background: linear-gradient(180deg, #fff 0%, #f5fff9 100%); box-shadow: 0 2px 6px rgb(20 70 43 / 9%); font-size: 12px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; transition: border-color .15s, background-color .15s, box-shadow .15s, transform .15s; }
.preset-button:hover { border-color: #008c46; background: #edfff5; box-shadow: 0 3px 9px rgb(0 140 70 / 14%); transform: translateY(-1px); }
.preset-button[aria-pressed="false"]::before { content: "↺"; display: inline-block; margin-right: 7px; color: #008c46; font-size: 15px; line-height: 0; vertical-align: -1px; }
.preset-button[aria-pressed="true"] { border-color: #008c46; color: #073c23; background: #dff9eb; box-shadow: inset 0 0 0 1px #008c46; }
.preset-button[aria-pressed="true"]::before { content: "✓"; margin-right: 6px; color: #008c46; }
.circle-picker { flex: 0 0 auto; min-width: 188px; display: flex; flex-direction: column; justify-content: center; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f7f7f2; }
.circle-picker-label { display: block; margin: 0 0 8px; color: var(--ink); font-size: 12px; font-weight: 750; }
.circle-tabs { display: grid; grid-template-columns: repeat(2, 1fr); padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f1f1ec; }
.circle-tabs button { min-width: 72px; padding: 9px 10px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }
.circle-tabs button[aria-pressed="true"] { color: var(--ink); background: #fff; box-shadow: 0 1px 5px rgb(20 30 24 / 12%); }

.editor-panel { display: flex; flex-direction: column; gap: 30px; padding: clamp(28px, 4vw, 52px); }
.editor-panel h2 { margin: 0; font-size: 29px; letter-spacing: -.035em; }
.editor-panel .editor-title { color: #008c46; font-size: clamp(20px, 2vw, 26px); font-weight: 750; line-height: 1; letter-spacing: -.04em; white-space: nowrap; }
.form-intro { margin: 12px 0 0; color: var(--muted); line-height: 1.5; }
.style-picker { margin: 0; padding: 0; border: 0; }
.style-picker legend { margin-bottom: 9px; padding: 0; font-size: 12px; font-weight: 700; }
.legend-note { color: var(--muted); font-weight: 500; }
.style-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f1f1ec; }
.style-tab { min-width: 0; padding: 9px 6px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }
.style-tab[aria-pressed="true"] { color: var(--ink); background: #fff; box-shadow: 0 1px 5px rgb(20 30 24 / 12%); }
.padding-picker { margin: 0; padding: 0; border: 0; }
.padding-picker legend { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0; font-size: 12px; font-weight: 700; }
.reset-button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; font-size: 17px; line-height: 1; }
.reset-button:hover { border-color: var(--green); color: #008c46; background: #f2fff8; }
.padding-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.padding-tab { min-width: 0; padding: 9px 3px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 700; }
.padding-tab:hover { border-color: #98a29c; color: var(--ink); }
.padding-tab[aria-pressed="true"] { border-color: #008c46; color: #073c23; background: #dff9eb; box-shadow: inset 0 0 0 1px #008c46; }
.range-row { display: grid; grid-template-columns: minmax(0, 1fr) 58px; align-items: center; gap: 12px; margin-top: 15px; }
.range-row input { width: 100%; accent-color: var(--green); }
.range-row output { color: var(--ink); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
.control-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.line-fields { display: grid; gap: 17px; }
.line-field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; }
.line-field input { width: 100%; padding: 12px 2px; border: 0; border-bottom: 1px solid #b8beb9; border-radius: 0; outline: none; background: transparent; font-size: 18px; font-weight: 650; text-transform: uppercase; }
.line-field input::placeholder { color: #a9afab; font-weight: 400; opacity: 1; text-transform: none; }
.line-field input:focus { border-color: var(--green); box-shadow: 0 1px 0 var(--green); }
.actions { display: grid; gap: 10px; margin-top: auto; }
.actions button { min-height: 48px; padding: 12px 16px; border-radius: 7px; font-weight: 750; }
.raster-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.primary-button { border: 1px solid var(--green); background: var(--green); color: #062b18; }
.primary-button:hover { background: #10dc76; }
.primary-button:disabled { cursor: wait; opacity: .6; }
.secondary-button { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.secondary-button:hover { border-color: var(--ink); }
.status { min-height: 20px; margin: -16px 0 0; color: var(--muted); font-size: 13px; }

.details { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-top: 0; }
.details article { min-height: 220px; padding: 32px; }
.details article + article { border-left: 1px solid var(--line); }
.detail-number { color: #009b4e; font-size: 12px; font-weight: 800; }
.details h2 { margin: 50px 0 10px; font-size: 18px; }
.details p { margin: 0; color: var(--muted); line-height: 1.55; }
@media (max-width: 900px) {
  .hero h1, .hero > p:last-child { white-space: normal; }
  .workspace { grid-template-columns: 1fr; }
  .preview-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .preview { min-height: 300px; }
  .details { grid-template-columns: 1fr; }
  .details article { min-height: 0; }
  .details article + article { border-left: 0; border-top: 1px solid var(--line); }
  .details h2 { margin-top: 28px; }
}

@media (max-width: 520px) {
  .preview-toolbar { align-items: start; flex-direction: column; }
  .preview { min-height: 240px; padding: 40px; }
  .preview-options { align-items: start; flex-direction: column; }
  .colour-controls, .circle-picker { width: 100%; }
}

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