/* Etsy Seller Starter Hub — visual system v1
   Palette: warm off-white + charcoal + muted terracotta + soft sage
   Typography: clean editorial business-toolkit
*/

:root {
  --bg:           #faf6f0;
  --bg-card:      #ffffff;
  --charcoal:     #2d2d2d;
  --charcoal-mute:#555555;
  --terracotta:   #b45a46;
  --terracotta-2: #c97160;
  --sage:         #829b82;
  --sage-2:       #9bb29c;
  --line:         #e6dfd4;
  --warning:      #a3542f;
  --shadow:       0 1px 2px rgba(45,45,45,.04), 0 6px 16px rgba(45,45,45,.05);
  --radius:       14px;
  --radius-sm:    8px;
  --max-width:    1040px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--charcoal);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--terracotta); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--terracotta-2); }

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.site-header .brand { font-weight: 700; letter-spacing: -0.01em; color: var(--charcoal); text-decoration: none; }
.site-header nav a { margin-left: 18px; color: var(--charcoal); text-decoration: none; }
.site-header nav a:hover { color: var(--terracotta); }

.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 32px 0; color: var(--charcoal-mute); font-size: 14px; }

/* Sections */
section { padding: 64px 0; }
section h1 { font-size: 40px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
section h2 { font-size: 30px; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 12px; }
section h3 { font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
section p  { margin: 0 0 14px; }
section .lead { font-size: 18px; color: var(--charcoal-mute); margin-bottom: 22px; }
section hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

.eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 10px; }

/* CTA */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: var(--terracotta-2); color: #fff; }
.btn-secondary { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.btn-secondary:hover { color: var(--terracotta); border-color: var(--terracotta); }
.btn-disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* Card / grid */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
/* UI-001: hard-coded narrow-viewport type sizes — clamp()/vw didn't
   reliably scale inside headless Chrome at 320-390px, so we set explicit
   small values. Desktop sizes are preserved by the larger breakpoint above. */
@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  section h1 { font-size: 26px; line-height: 1.18; }
  section h2 { font-size: 22px; }
  section h3 { font-size: 19px; }
  section p, section .lead { font-size: 16px; }
  /* UI-001: header & text overflow fix at narrow viewports */
  .site-header .container { flex-wrap: wrap; row-gap: 10px; }
  .site-header .brand { flex-basis: 100%; }
  .site-header nav { width: 100%; display: flex; flex-wrap: wrap; column-gap: 16px; row-gap: 6px; }
  .site-header nav a { margin-left: 0; }
  section h1, section h2, section h3, section p, .lead, .hero p, .card, .form-card, .plan-card {
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
  }
}
/* Extra-narrow viewports (≤ 380px) — the headline text is long enough that
   even 26px overflows at 320-360px widths. Drop further. */
@media (max-width: 380px) {
  section h1 { font-size: 22px; }
  section h2 { font-size: 20px; }
  section h3 { font-size: 18px; }
  section p, section .lead { font-size: 15px; }
  .container { padding: 0 16px; }
}

/* Hero */
.hero { padding: 80px 0 56px; }
.hero p.lead { max-width: 640px; }
.hero .ctas { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Section heading bar */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }

/* Calculator mock / preview blocks */
.mock {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  font-variant-numeric: tabular-nums;
}
.mock .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.mock .row:last-child { border-bottom: 0; }
.mock .row .label { color: var(--charcoal-mute); }
.mock .row .v { font-weight: 600; }

/* Plan cards (operations) */
.plan-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg-card);
}
.plan-card .badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ece7df;
  color: var(--charcoal-mute);
  margin-bottom: 8px;
}

/* Forms */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.form-card label { display: block; margin: 12px 0 4px; font-weight: 600; }
.form-card input[type=email], .form-card input[type=text] {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
}
.form-card .small { font-size: 13px; color: var(--charcoal-mute); margin-top: 6px; }
.form-card .error { color: var(--warning); font-size: 14px; margin-top: 8px; }
.form-card .success { color: var(--sage); font-size: 14px; margin-top: 8px; }

/* Utility */
.muted { color: var(--charcoal-mute); }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 32px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checklist li:last-child { border-bottom: 0; }
.checklist input[type=checkbox] { margin-top: 5px; transform: scale(1.05); accent-color: var(--sage); }
.checklist .label { font-weight: 600; }
.checklist .section { background: #f4ecde; font-weight: 700; color: var(--charcoal); }
.checklist .progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.checklist .progress > div { height: 100%; background: var(--sage); transition: width .25s ease; }
