/* KALEMPRO – hand-written stylesheet (no frameworks) */

:root {
  --ink: #111111;
  --ink-2: #2b2b2b;
  --gold: #ffc400;       /* yellow fills: always pair with black text */
  --gold-dark: #e6ae00;
  --gold-ink: #8a6400;   /* yellow-family text on light backgrounds */
  --gold-soft: #fff3c4;
  --paper: #fafaf7;
  --card: #ffffff;
  --line: #e6e4de;
  --text: #1a1a1a;
  --muted: #5e5e5e;
  --wa: #1f9d55;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .08);
  --wrap: 1180px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.65 var(--sans);
  color: var(--text);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink-2); }
a:hover { color: var(--gold-ink); }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--ink); color: #cfcfcf; font-size: .85rem; }
.topbar .wrap { display: flex; gap: 18px; justify-content: flex-end; align-items: center; min-height: 36px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: var(--gold); }

/* No backdrop-filter/transform/filter here: any of them would make the header the
   containing block of the fixed mobile drawer and shrink it to the header's height. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand img { height: 52px; width: auto; }

.nav-toggle {
  display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
}
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; gap: 4px; align-items: center; }
.nav a {
  display: block; padding: 10px 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; letter-spacing: .02em;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--gold-soft); color: var(--ink); }
.nav .has-sub { position: relative; }
.nav .sub {
  position: absolute; left: 0; top: 100%; min-width: 250px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s;
}
.nav .has-sub:hover > .sub, .nav .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.nav .sub a { font-weight: 500; }
.nav .cta { background: var(--ink); color: #fff; }
.nav .cta:hover { background: var(--gold); color: var(--ink); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .nav {
    position: fixed; top: 0; right: 0; z-index: 2;
    width: min(340px, 88vw); height: 100vh; height: 100dvh; background: #fff;
    padding: 72px 16px 24px; overflow-y: auto; overscroll-behavior: contain;
    box-shadow: -8px 0 32px rgba(0, 0, 0, .18);
    transform: translateX(100%); visibility: hidden;
    transition: transform .2s ease, visibility .2s;
  }
  .nav.open { transform: none; visibility: visible; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .nav .sub {
    position: static; opacity: 1; visibility: inherit; transform: none; min-width: 0;
    box-shadow: none; border: 0; border-left: 2px solid var(--gold-soft); border-radius: 0;
    margin: 0 0 6px 14px; padding: 0 0 0 6px;
  }
  .nav .sub a { font-size: .95rem; padding: 9px 12px; }
  .nav .cta { text-align: center; margin-top: 10px; }
  .nav-close { position: absolute; top: 16px; right: 16px; }
  .nav-backdrop {
    position: fixed; inset: 0; z-index: 1; background: rgba(0, 0, 0, .55);
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  }
  body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }
  body.nav-open .wa-float, body.nav-open .call-float { display: none; }
}
@media (min-width: 961px) { .nav-close, .nav-backdrop { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer; font: inherit; font-weight: 600;
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.light { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn.light:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--ink); }
.btn.wa { background: var(--wa); border-color: var(--wa); }
.btn.wa:hover { background: #157a41; border-color: #157a41; }
.btn.sm { padding: 8px 14px; font-size: .88rem; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.hero picture, .hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero img.bg { object-fit: cover; opacity: .38; }
.hero .wrap { position: relative; padding-top: clamp(72px, 12vw, 140px); padding-bottom: clamp(72px, 12vw, 140px); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero p.lead { font-size: 1.15rem; max-width: 52ch; color: #e8e8e8; }
.hero .eyebrow { color: var(--gold); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--gold-ink); margin-bottom: .6em; }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { color: var(--muted); max-width: 60ch; margin: 0; }

.page-head { background: linear-gradient(180deg, #fff, var(--paper)); border-bottom: 1px solid var(--line); padding: 36px 0 28px; }
.page-head p { color: var(--muted); max-width: 70ch; margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold-ink); }
.crumbs span[aria-hidden] { margin: 0 6px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--ink); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Category tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.tile {
  position: relative; display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.tile .ph { aspect-ratio: 1; background: #fff; display: grid; place-items: center; padding: 14px; }
.tile .ph img { width: 100%; height: 100%; object-fit: contain; }
.tile .tx { padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.tile .tx b { display: block; font-family: var(--serif); font-size: 1.08rem; }
.tile .tx small { color: var(--muted); }

/* ---------- Product cards ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.search {
  flex: 1 1 260px; max-width: 420px; padding: 12px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font: inherit;
}
.search:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.count { color: var(--muted); font-size: .9rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.card .ph {
  position: relative; aspect-ratio: 1; background: #fff; padding: 12px; border: 0; cursor: zoom-in; width: 100%;
}
.card .ph img { width: 100%; height: 100%; object-fit: contain; }
.card .more {
  position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .8); color: #fff;
  font-size: .75rem; padding: 3px 9px; border-radius: 999px;
}
.card .body { padding: 14px 16px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 1.02rem; }
.card .desc { color: var(--muted); font-size: .88rem; margin: 0; }
.card .code { font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--gold-ink); }
.card .actions { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.empty { display: none; padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Two-column content ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.split.rev > :first-child { order: 2; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose blockquote {
  margin: 1.5em 0; padding: 18px 22px; background: var(--gold-soft); border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--serif); font-size: 1.15rem; color: var(--ink);
}

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.service img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.service div { padding: 18px 20px 20px; }
.service p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .services { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.info-card h3 { margin-bottom: .3em; }
.info-card p { color: var(--muted); }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.info-list a { font-weight: 600; text-decoration: none; }
.map { border: 0; width: 100%; min-height: 380px; border-radius: var(--radius); background: #e9e6df; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Order form ---------- */
.form { display: grid; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ink); }
.form input, .form textarea {
  font: inherit; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); width: 100%;
}
.form input:focus, .form textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; background: #fff; }
.form .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.form .note, .info-card .note { color: var(--muted); font-size: .88rem; margin: 0; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #e8e8e8; border-radius: calc(var(--radius) + 6px); padding: clamp(28px, 5vw, 48px); display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .3em; }
.cta-band p { margin: 0; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: #0a0a0a; color: #bdbdbd; margin-top: 0; padding: 56px 0 24px; font-size: .94rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer h3 { color: #fff; font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 32px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-logo { background: #fff; border-radius: 10px; padding: 8px 12px; display: inline-block; margin-bottom: 14px; }
.foot-logo img { height: 44px; width: auto; }
.copy { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Floating contact buttons ---------- */
.call-float {
  position: fixed; right: 18px; bottom: 86px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
  background: var(--gold); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.call-float svg { width: 26px; height: 26px; fill: var(--ink); }
.call-float:hover { background: var(--gold-dark); }
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
  background: var(--wa); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.wa-float:hover { background: #157a41; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 900px); width: 100%; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox figure { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; }
.lightbox img { width: 100%; max-height: 72vh; object-fit: contain; background: #fff; }
.lightbox figcaption { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.lightbox .lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); font-size: 1.4rem; cursor: pointer; color: var(--ink);
}
.lightbox .lb-prev { left: 8px; }
.lightbox .lb-next { right: 8px; }
.lightbox .lb-close { position: absolute; top: 8px; right: 8px; transform: none; }

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

/* ---------- Small utilities ---------- */
[data-stack] { display: grid; gap: clamp(32px, 6vw, 64px); }
.btn.light-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn.light-ghost:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.info-card .btn { margin: 4px 6px 0 0; }
.info-list { margin-bottom: 18px; }

/* ---------- Phones: denser catalogue ---------- */
@media (max-width: 560px) {
  .grid, .tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card .body, .tile .tx { padding: 10px 12px 12px; }
  .card h3 { font-size: .92rem; }
  .card .desc { font-size: .8rem; }
  .card .actions .btn { flex: 1 1 100%; padding: 7px 10px; font-size: .82rem; }
  .tile .tx small { display: none; }
  .topbar .mail { display: none; }
  .brand img { height: 44px; }
}

/* ---------- Homepage slider ---------- */
/* Slides share one grid cell, so the slider is as tall as its tallest slide (no clipped text). */
.slider { display: grid; }
.slider .slide {
  grid-area: 1 / 1; position: relative; overflow: hidden;
  opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s;
}
.slider .slide.active { opacity: 1; visibility: visible; z-index: 1; }
.slider .slide::after {             /* readable white text on light photos */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .55) 55%, rgba(0, 0, 0, .2) 100%);
}
.slider .slide img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; }
.slider .slide .wrap { position: relative; z-index: 1; }
.slider h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 18ch; }

.slider-arrow {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .85); color: var(--ink); font-size: 1.6rem; line-height: 1;
}
.slider-arrow:hover { background: #fff; }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }
.slider-dots {
  position: absolute; left: 0; right: 0; bottom: 18px; z-index: 3;
  display: flex; justify-content: center; gap: 10px;
}
.slider-dots button {
  width: 12px; height: 12px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 2px solid #fff; background: transparent; transition: width .2s, background .2s;
}
.slider-dots button.active { background: var(--gold); border-color: var(--gold); width: 28px; }
/* Aim each wide (2000x550) banner's crop at its subject. */
.slider .slide:nth-child(1) img.bg { object-position: 62% 50%; }  /* fountain-pen nib */
.slider .slide:nth-child(2) img.bg { object-position: 55% 50%; }  /* stylus tip */
.slider .slide:nth-child(3) img.bg { object-position: 72% 70%; }  /* pens in tray */
.slider .slide:nth-child(4) img.bg { object-position: 35% 50%; }  /* gift box */

/* Phones: a tall, narrow slide would zoom the banner ~4x. Show the photo as its own
   2:1 band on top and put the caption below it instead of over it. */
@media (max-width: 760px) {
  .slider-arrow { display: none; }
  .slider .slide { background: var(--ink); }
  .slider .slide::after { display: none; }
  .slider .slide img.bg { position: relative; inset: auto; height: auto; aspect-ratio: 2 / 1; }
  .slider .slide .wrap { padding-top: 22px; padding-bottom: 56px; }
  .slider h1, .slider h2 { font-size: 1.7rem; max-width: none; }
  .slider p.lead { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .slider .slide { transition: none; } }
