/* Extruded Solutions – site styles
   One family (Archivo) used at different widths: wide and heavy for headings, normal for reading. */

:root {
  --pla: #EEF1F0;        /* page background, like white PLA */
  --surface: #FFFFFF;
  --ink: #14212B;        /* deep slate text */
  --muted: #5B6873;
  --line: #D3D9DC;
  --cobalt: #2348D9;     /* links and buttons */
  --cobalt-dark: #1A37A8;
  --glow: #FFC46B;       /* lithophane lamp light – used sparingly */
  --ok: #1E7A4C;
  --warn: #A4510F;
  --error: #B42318;
  --radius-s: 6px;
  --radius-l: 14px;
  --max: 1160px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--pla);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--cobalt); text-underline-offset: 3px; }
a:hover { color: var(--cobalt-dark); }

:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.3rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0 0 1em; max-width: 66ch; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 58ch; }
.small { font-size: 0.9rem; color: var(--muted); }

/* The signature: headings carved with print layer lines */
.layered {
  background-image: repeating-linear-gradient(
    to bottom,
    var(--ink) 0px, var(--ink) 3px,
    transparent 3px, transparent 4px
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.on-dark .layered {
  background-image: repeating-linear-gradient(
    to bottom,
    #fff 0px, #fff 3px,
    transparent 3px, transparent 4px
  );
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .layered { color: var(--ink); background: none; }
}
@media (forced-colors: active) {
  .layered { color: CanvasText; background: none; }
}

/* ---------- Header ---------- */

.site-header { background: var(--pla); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-name { font-variation-settings: "wdth" 125; font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.brand-name span { display: block; font-variation-settings: "wdth" 100; font-weight: 500; font-size: 0.78rem; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: var(--radius-s); font-weight: 500; font-size: 0.97rem; }
.nav a:hover { background: var(--surface); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--cobalt); border-radius: 0; }
.nav .basket-link { margin-left: 6px; border: 1px solid var(--line); background: var(--surface); }
.basket-count { display: inline-block; min-width: 1.4em; text-align: center; background: var(--cobalt); color: #fff; border-radius: 99px; font-size: 0.78rem; padding: 0 6px; margin-left: 4px; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--pla); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--cobalt); padding-left: 14px; }
  .nav .basket-link { margin: 10px 0 0; border-radius: var(--radius-s); }
}

/* ---------- Buttons & forms ---------- */

.btn {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--cobalt); color: #fff; border: 2px solid var(--cobalt);
  padding: 12px 22px; border-radius: var(--radius-s); line-height: 1.2;
}
.btn:hover { background: var(--cobalt-dark); border-color: var(--cobalt-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.on-dark .btn.ghost { color: #fff; border-color: #fff; }
.on-dark .btn.ghost:hover { background: #fff; color: var(--ink); }
.btn.small { padding: 7px 14px; font-size: 0.92rem; }
.btn.danger { background: var(--error); border-color: var(--error); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

label { display: block; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; display: block; margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid #B9C2C7; border-radius: var(--radius-s); padding: 11px 12px;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(35,72,217,.3); border-color: var(--cobalt); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -5000px; } /* spam trap */

.flash { padding: 12px 16px; border-radius: var(--radius-s); margin: 18px 0; border-left: 5px solid; background: var(--surface); }
.flash.success { border-color: var(--ok); }
.flash.error { border-color: var(--error); }
.flash.info { border-color: var(--cobalt); }

/* ---------- Sections ---------- */

section { padding: 72px 0; }
.on-dark { background: var(--ink); color: #E6ECEF; }
.on-dark a { color: #AFC1FF; }
.on-dark .lead, .on-dark .small { color: #A9B7C0; }

.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; }
.hero .lead { margin-top: 18px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 340px; }
}

.page-head { padding: 56px 0 28px; }
.page-head .lead { margin-top: 10px; }

/* Services as rows separated by layer lines */
.rows { border-top: 4px solid transparent; border-image: repeating-linear-gradient(to bottom, var(--ink) 0 1px, transparent 1px 3px) 4; }
.row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) 160px; gap: 28px; align-items: start;
  padding: 30px 0; border-bottom: 1px solid var(--line);
}
.row h3 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-variation-settings: "wdth" 125; font-weight: 800; margin: 0; }
.row p { margin: 0; color: var(--muted); }
.row .btn { white-space: nowrap; justify-self: end; }
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; gap: 10px; }
  .row .btn { justify-self: start; margin-top: 6px; }
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

.ticks { list-style: none; padding: 0; margin: 0 0 1em; max-width: 66ch; }
.ticks li { padding: 9px 0 9px 30px; position: relative; border-bottom: 1px solid var(--line); }
.on-dark .ticks li { border-color: #2C3B47; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 7px; border-left: 2px solid var(--cobalt); border-bottom: 2px solid var(--cobalt); transform: rotate(-45deg); }
.on-dark .ticks li::before { border-color: var(--glow); }

.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 40px; }
.feature-list div { padding: 22px 0; border-top: 1px solid var(--line); }
.feature-list h3 { margin-bottom: 6px; }
.feature-list p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .feature-list { grid-template-columns: 1fr; } }

/* Steps are a real sequence, so numbering is meaningful here */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.steps li { counter-increment: step; padding-top: 14px; border-top: 3px solid var(--ink); }
.steps li::before { content: counter(step); display: block; font-variation-settings: "wdth" 125; font-weight: 800; font-size: 2rem; line-height: 1; margin-bottom: 8px; }
.on-dark .steps li { border-color: var(--glow); }

.callout { background: var(--surface); border-radius: var(--radius-l); padding: 34px; }
.callout h2 { margin-top: 0; }

/* Lithophane band */
.litho-band { position: relative; overflow: hidden; }
.litho-band::after {
  content: ""; position: absolute; right: -10%; top: 10%; width: 60%; height: 80%;
  background: radial-gradient(closest-side, rgba(255,196,107,.22), transparent);
  pointer-events: none;
}
.litho-band .wrap { position: relative; z-index: 1; }
.price-tag { font-variation-settings: "wdth" 125; font-weight: 800; font-size: 1.6rem; color: var(--glow); }

/* ---------- Shop ---------- */

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px; }
.product { background: var(--surface); border-radius: var(--radius-l); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); border: 1px solid var(--line); }
.product:hover { border-color: var(--ink); color: var(--ink); }
.product .art { background: var(--ink); aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 24px; }
.product .art img { width: 100%; height: 100%; object-fit: cover; }
.product .info { padding: 16px 18px 20px; }
.product h3 { font-size: 1.08rem; margin: 0 0 4px; }
.product .price { font-weight: 700; }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: #E3E8FF; color: var(--cobalt-dark); margin-left: 6px; vertical-align: 2px; }
.badge.low { background: #FFF0DD; color: var(--warn); }
.badge.out { background: #F3D9D7; color: var(--error); }

.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.product-page .art { background: var(--ink); border-radius: var(--radius-l); padding: 40px; }
@media (max-width: 860px) { .product-page { grid-template-columns: 1fr; } .product-page .art { padding: 24px; } }

.photo-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 8px; }
.photo-slot { border: 2px dashed #B9C2C7; border-radius: var(--radius-s); background: var(--surface); aspect-ratio: 1/1; position: relative; overflow: hidden; display: grid; place-items: center; text-align: center; font-size: 0.85rem; color: var(--muted); padding: 6px; }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-slot.filled { border-style: solid; border-color: var(--cobalt); }

table.basket { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-l); overflow: hidden; }
table.basket th, table.basket td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.basket th { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
table.basket td.num, table.basket th.num { text-align: right; white-space: nowrap; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.thumbs img { width: 46px; height: 46px; object-fit: cover; border-radius: 4px; }
.totals { margin: 18px 0 0 auto; max-width: 340px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .grand { border-top: 2px solid var(--ink); font-weight: 800; font-size: 1.15rem; padding-top: 10px; }
@media (max-width: 640px) {
  table.basket thead { display: none; }
  table.basket tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.basket td { display: block; border: 0; padding: 6px 16px; }
  table.basket td.num { text-align: left; }
}

.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .checkout-grid { grid-template-columns: 1fr; } }
.summary { background: var(--surface); border-radius: var(--radius-l); padding: 24px; position: sticky; top: 90px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: #A9B7C0; padding: 52px 0 30px; font-size: 0.95rem; }
.site-footer a { color: #E6ECEF; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 3px 0; }
.footer-base { margin-top: 36px; padding-top: 18px; border-top: 1px solid #2C3B47; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Admin ---------- */

.admin-bar { background: var(--ink); color: #fff; }
.admin-bar .wrap { display: flex; gap: 18px; align-items: center; min-height: 54px; flex-wrap: wrap; }
.admin-bar a { color: #fff; text-decoration: none; font-weight: 600; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 0.95rem; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { background: #E3E8EA; }
.table-scroll { overflow-x: auto; border-radius: var(--radius-s); }
.status { font-weight: 600; font-size: 0.85rem; padding: 2px 9px; border-radius: 99px; background: #E3E8EA; white-space: nowrap; }
.status.paid { background: #DDF2E6; color: var(--ok); }
.status.printing { background: #E3E8FF; color: var(--cobalt-dark); }
.status.dispatched { background: #D7DDE1; color: var(--ink); }
.status.awaiting_payment { background: #FFF0DD; color: var(--warn); }
.status.cancelled { background: #F3D9D7; color: var(--error); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photo-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius-s); }

@media (prefers-reduced-motion: no-preference) {
  .cube-glow { animation: warm 2.4s ease-out 1 both; }
  @keyframes warm { from { opacity: .15; } to { opacity: 1; } }
}
