/* Indian Digitizer embroidery pricing calculator.
   Same cloth as the converter: denim, walnut and linen. The quote is a woven
   label sewn onto denim; everything around it stays quiet. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("vendor/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Josefin Sans";
  src: url("vendor/fonts/josefin-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}

:root {
  --denim: #22385a;
  --denim-deep: #182a45;
  --denim-tint: #eef2f7;
  --accent: #8c6046;
  --accent-dark: #6f4b36;
  --accent-wash: #f6efea;
  --accent-light: #d2ad96;
  --ink: #1b2431;
  --muted: #4a5566;
  --line: #d3dae4;
  --paper: #ffffff;
  --linen: #f2ede4;
  --linen-deep: #e6dccb;
  --wood: #c99560;
  --wood-dark: #8f6034;
  --error: #b42318;

  --font-display: "Josefin Sans", "Century Gothic", "Futura", sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --step-0: 1.1875rem;  /* 19px minimum body */
  --step-1: 1.375rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6;
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 0.6em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); padding-top: 4px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible, .ticket :focus-visible, .price-card :focus-visible,
.final-cta :focus-visible, .site-footer :focus-visible { outline-color: var(--accent-light); }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px; }
.skip-link:focus { top: 12px; }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0.55em 1.3em;
  border: 2px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: #fff;
  font: 700 var(--step-0)/1.2 var(--font-body);
  text-decoration: none; cursor: pointer; transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--big { min-height: 60px; font-size: 1.3125rem; padding: 0.6em 1.6em; }
.btn--small { min-height: 46px; padding: 0.35em 1.1em; font-size: 1.1875rem; }
.btn--outline { background: transparent; color: var(--accent); }
.btn--outline:hover { background: var(--accent-wash); color: var(--accent-dark); }
.btn--ghost-light { background: transparent; border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.link-btn {
  background: none; border: 0; padding: 8px 0; min-height: 44px; cursor: pointer;
  font: 600 var(--step-0) var(--font-body); color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--accent-dark); text-decoration-thickness: 2px; }

/* Header ------------------------------------------------------------------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand img { width: 190px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-nav a:not(.btn):hover { color: var(--accent); text-decoration: underline; }

/* Hero: the same denim twill and hem as the converter ---------------------- */
.hero {
  color: #fff; background-color: var(--denim);
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.06) 0 1px, transparent 1px 4px),
    radial-gradient(120% 90% at 85% 40%, #2b4670 0%, var(--denim) 55%, var(--denim-deep) 100%);
  padding: clamp(36px, 5vw, 64px) 0 clamp(40px, 5vw, 64px);
  border-bottom: 10px solid var(--denim-deep); position: relative;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--accent-light) 0 14px, transparent 14px 24px);
}
.hero h1 { font-size: var(--step-4); margin-bottom: 0.35em; }
.lede { font-size: 1.3125rem; line-height: 1.55; max-width: 52ch; color: #e6ecf5; margin: 0; }

/* Bench: the form on linen, the label beside it ---------------------------- */
.bench {
  background-color: var(--linen);
  background-image:
    repeating-linear-gradient(0deg, rgba(120, 100, 70, 0.045) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120, 100, 70, 0.04) 0 1px, transparent 1px 3px);
  padding: clamp(32px, 5vw, 64px) 0 clamp(48px, 6vw, 80px);
}
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: clamp(28px, 4vw, 56px); align-items: start; }
.calc__form { background: var(--paper); border: 1px solid var(--linen-deep); border-radius: 14px; padding: clamp(20px, 3vw, 36px); }

.group { border: 0; margin: 0; padding: 0 0 28px; min-width: 0; }
.group + .group { border-top: 1px solid var(--line); padding-top: 24px; }
.group:last-child { padding-bottom: 0; }
.group__title { font: 700 var(--step-2)/1.2 var(--font-display); padding: 4px 0 0; margin: 0 0 8px; float: left; width: 100%; }
.group__title + * { clear: both; }
.group__help { color: var(--muted); margin: 0 0 18px; max-width: 62ch; }

.fields { display: grid; gap: 18px 20px; margin-bottom: 8px; }
.fields--3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-weight: 700; line-height: 1.3; }
.field__note { font-size: 1rem; color: var(--muted); line-height: 1.4; }

.input {
  width: 100%; min-height: 52px; padding: 10px 14px;
  border: 2px solid #b7c2d1; border-radius: 8px; background: var(--paper); color: var(--ink);
  font: 400 var(--step-0)/1.3 var(--font-body); font-variant-numeric: tabular-nums;
}
.input:hover { border-color: #8d9bb0; }
.input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
select.input {
  appearance: none; padding-right: 44px; cursor: pointer;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322385a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center/18px no-repeat;
}
.input[readonly] { background: var(--denim-tint); border-color: var(--line); }
.input--short { width: 6.5em; min-height: 46px; display: inline-block; }

/* Units sit inside the field so nobody types "$" or "%" themselves. */
.money, .pct { position: relative; display: block; }
.money .input { padding-left: 34px; }
.money::before { content: "$"; position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.pct { display: inline-block; }
.pct .input { padding-right: 38px; }
.pct::after { content: "%"; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.field .pct { display: block; }

/* Locations */
.locations { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.loc { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fbfaf7; }
.loc__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 14px 18px; align-items: end; }
.loc__remove { color: var(--muted); }
.loc__remove:hover { color: var(--error); }
.loc__est { margin-top: 12px; }
.loc__est summary { color: var(--accent); font-weight: 600; padding: 6px 0; min-height: 44px; display: flex; align-items: center; }
.loc__est[open] summary { margin-bottom: 12px; }
.loc__est-out { margin: 6px 0 0; color: var(--denim); font-weight: 600; min-height: 1.6em; }

/* Quantity breaks */
.breaks { margin-top: 22px; }
.breaks__title { font-weight: 700; margin: 0 0 8px; }
.breaks__table { border-collapse: collapse; }
.breaks__table th { text-align: left; font-weight: 600; color: var(--muted); padding: 0 28px 8px 0; font-size: 1.0625rem; }
.breaks__table td { padding: 5px 28px 5px 0; white-space: nowrap; }

/* The quote: a woven label sewn onto the page ------------------------------ */
.ticket-wrap { position: sticky; top: 20px; display: grid; gap: 16px; }
.ticket {
  position: relative; color: #fff;
  background-color: var(--denim);
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.07) 0 1px, transparent 1px 3px);
  border-radius: 4px 4px 14px 14px;
  padding: 34px 28px 26px;
  outline: 2px dashed rgba(210, 173, 150, 0.85); outline-offset: -10px;
  box-shadow: 0 1px 0 var(--denim-deep), 0 14px 30px rgba(24, 42, 69, 0.22);
}
/* The folded hem at the top, where the label is sewn in. */
.ticket::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background: var(--denim-deep); border-radius: 4px 4px 0 0;
}
.ticket__title { font: 700 var(--step-1)/1.3 var(--font-body); margin: 0 0 10px; color: var(--accent-light); }
.ticket__piece { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ticket__amount {
  font: 700 clamp(3rem, 2.2rem + 3vw, 4.25rem)/1 var(--font-display);
  font-variant-numeric: tabular-nums; padding-top: 6px; letter-spacing: 0;
}
.ticket__per { font-size: var(--step-1); color: #dbe3ef; }
.ticket__total { margin: 12px 0 18px; font-size: var(--step-1); color: #dbe3ef; }
.ticket__total strong { color: #fff; font-variant-numeric: tabular-nums; }
.ticket__lines { margin: 0 0 16px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.ticket__lines div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.ticket__lines dt { color: #e6ecf5; }
.ticket__lines dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ticket__note { display: block; font-size: 1rem; color: #b9c6d8; }
.ticket__machine { margin: 0; color: #dbe3ef; font-size: 1.0625rem; }
.ticket__machine:empty, .ticket__warn:empty { display: none; }
.ticket__warn { margin: 12px 0 0; padding: 10px 14px; border-radius: 8px; background: rgba(210, 173, 150, 0.18); color: #fff; }

.ticket-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ticket-actions .btn { flex: 1 1 auto; }

.ours { background: var(--paper); border: 1px solid var(--linen-deep); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 18px 20px; }
.ours__lead { font-weight: 700; margin: 0 0 4px; }
.ours__text { margin: 0 0 14px; color: #303b4b; }
.ours__btn { width: 100%; }

/* Small screens: a slim summary bar while the quote is off screen */
.sticky-sum {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--gutter); background: var(--denim-deep); color: #dbe3ef;
  box-shadow: 0 -6px 18px rgba(24, 42, 69, 0.25); font-size: 1.0625rem;
}
.sticky-sum strong { color: #fff; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.sticky-sum a { color: #fff; font-weight: 700; }

/* Content -------------------------------------------------------------------- */
.content { padding: clamp(48px, 7vw, 88px) 0; }
.guide__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.guide__text { max-width: 64ch; }
.guide__note { color: var(--muted); font-size: 1.0625rem; margin-top: 12px; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); }
.counts { width: 100%; border-collapse: collapse; }
.counts th, .counts td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.counts thead th { background: var(--denim); color: #fff; }
.counts tbody th { font-weight: 700; }
.counts td:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.counts tbody tr:last-child > * { border-bottom: 0; }

.digitize { background: var(--denim-tint); }
.digitize__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: clamp(32px, 6vw, 80px); align-items: start; }
.digitize__text { max-width: 64ch; }
.digitize__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.price-card {
  padding: 28px; border-radius: 14px; background: var(--denim); color: #fff;
  outline: 2px dashed rgba(210, 173, 150, 0.85); outline-offset: -10px;
}
.price-card h3 { margin-bottom: 4px; }
.price-card__sub { color: #c9d4e4; font-size: 1.0625rem; }
.price-list { margin: 18px 0; }
.price-list div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.price-list dt { color: #dbe3ef; }
.price-list dd { margin: 0; font: 700 1.375rem/1.2 var(--font-display); padding-top: 3px; }
.price-card__time { margin: 0; color: #dbe3ef; }
.price-card__time strong { color: #fff; }

.faq__inner { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 0; font-weight: 700; font-size: 1.25rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--line); font-size: 1.5rem; line-height: 1; color: var(--accent);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 22px; max-width: 70ch; color: #303b4b; }

.final-cta { background: var(--denim); color: #fff; padding: clamp(44px, 6vw, 72px) 0; }
.final-cta__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; }
.final-cta h2 { margin-bottom: 0.4em; }
.final-cta p { margin: 0; max-width: 60ch; color: #dbe3ef; }
.final-cta__actions { display: flex; flex-direction: column; gap: 12px; }
.final-cta .btn--big { background: var(--accent-light); border-color: var(--accent-light); color: var(--denim-deep); }
.final-cta .btn--big:hover { background: #e2c4b1; border-color: #e2c4b1; }

.site-footer { background: var(--denim-deep); color: #c9d4e4; padding: 48px 0 28px; font-size: 1.0625rem; }
.site-footer a { color: #fff; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.site-footer__logo { width: 180px; height: auto; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 8px 40px; }
.site-footer__credits { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.9375rem; color: #a9b6c9; }
.site-footer__credits p { margin: 0; }

/* Responsive ----------------------------------------------------------------- */
@media (max-width: 960px) {
  .calc, .guide__inner, .digitize__inner { grid-template-columns: 1fr; }
  .ticket-wrap { position: static; max-width: 560px; }
  .sticky-sum.is-on { display: flex; }
  .price-card { max-width: 480px; }
  .final-cta__inner { grid-template-columns: 1fr; }
  .final-cta__actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .site-nav a:not(.btn) { display: none; }
  .brand img { width: 136px; }
  .site-nav .btn { white-space: nowrap; font-size: 1.0625rem; padding: 0.3em 0.9em; min-height: 44px; }
  .loc__main { grid-template-columns: 1fr; }
  .loc__remove { justify-self: start; }
  .breaks__table td, .breaks__table th { padding-right: 14px; }
}

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

/* Print: just the quote, in ink ---------------------------------------------- */
@media print {
  .site-header, .hero, .calc__form, .ticket-actions, .ours, .sticky-sum, .content, .final-cta, .site-footer, .skip-link { display: none !important; }
  .bench { background: none; padding: 0; }
  .calc { display: block; }
  .ticket-wrap { position: static; }
  .ticket { background: none; color: #000; box-shadow: none; outline: 1px solid #000; outline-offset: 0; border-radius: 0; }
  .ticket::before { display: none; }
  .ticket__title, .ticket__per, .ticket__total, .ticket__lines dt, .ticket__note, .ticket__machine { color: #000; }
  .ticket__total strong { color: #000; }
  .ticket__lines, .ticket__lines div { border-color: #999; }
  .ticket__warn { display: none; }
}

/* "by Indian Digitizer" under the tool name */
.hero h1 .by { display: block; margin-top: 0.35em; font-family: var(--font-body); font-size: 1.1875rem; font-weight: 600; letter-spacing: 0; color: var(--accent-light); }
