/* Cork and Sip v2 — white retail, red / white / black / navy. No brown in the UI. */

:root {
  --bg: #ffffff;
  --bg-soft: #f3f5f8;
  --text: #101114;
  --muted: #4a5060;
  --line: #d5dae3;
  --red: #c8102e;
  --red-deep: #9d0c24;
  --navy: #001a70;
  --navy-2: #0a2a8a;
  --black: #111111;
  --white: #ffffff;
  --focus: #001a70;
  --danger: #9d0c24;
  --shadow: 0 18px 40px rgba(16, 17, 20, 0.12);
  --wrap: min(1120px, calc(100% - 48px));
  --header-h: 76px;
}

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }
button, input, select { font: inherit; }
a { color: var(--navy); }
a:hover { color: var(--red); }

h1, h2, h3, .brand-name, .uploader-title, .tagline {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1.12;
  margin: 0 0 20px;
  max-width: 18em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.2;
  margin: 0 0 12px;
}
h3 { font-size: 22px; line-height: 1.3; margin: 0 0 8px; }

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--red);
  color: #fff;
  padding: 8px 16px;
  z-index: 20;
}
.skip:focus { left: 16px; top: 16px; }

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 10px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--black);
  min-width: 0;
}
.brand:hover { color: var(--black); }
.brand-name {
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
}
.brand-name em { font-style: italic; }
.brand-sig {
  width: 36px;
  height: auto;
  opacity: 0.92;
}
.byline {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.byline strong { color: var(--black); font-weight: 700; }

nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
nav a:hover { color: var(--red); }
nav .nav-cta {
  text-decoration: none;
  margin-left: 4px;
}

#examples, #uploader, #how, #pricing, #faq, #designer {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 4px;
  font-family: "Source Sans 3", "Source Sans Pro", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled, .btn-checkout:disabled, .btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-checkout {
  background: var(--navy);
  color: #fff;
}
.nav-cta {
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Hero */
.hero {
  padding: 72px 0 32px;
  text-align: center;
  background: var(--bg);
}
.hero-copy { display: flex; flex-direction: column; align-items: center; }
.hero h1 { margin-inline: auto; }
.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.tagline {
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.3;
  margin: 0 auto 16px;
  max-width: 22em;
  color: var(--text);
}
.color-line {
  margin: 0 auto 28px;
  max-width: 32em;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
}
.color-swatches {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.color-swatches li { display: flex; align-items: center; gap: 8px; }

.swatch, .chip-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-block;
  flex: 0 0 18px;
}
.swatch-white { background: #fff; }
.swatch-red { background: var(--red); border-color: var(--red); }
.swatch-black { background: #111; border-color: #111; }
.swatch-navy { background: var(--navy); border-color: var(--navy); }

.hero-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: end;
  margin-top: 16px;
  max-width: 1120px;
}
.hero-products figure { margin: 0; text-align: center; }
.hero-products img {
  width: 100%;
  background: transparent;
  filter: none;
}
.hero-products figcaption {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

/* Examples */
.examples {
  padding: 88px 0;
  background: var(--bg-soft);
  text-align: center;
}
.section-lead {
  margin: 0 auto 40px;
  max-width: 42em;
  color: var(--muted);
}
.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0 auto 64px;
  justify-items: stretch;
}
.color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0 auto;
}
.colors-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(24px, 2.6vw, 32px);
  margin: 0 0 12px;
}
.example {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 16px 20px;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.example:hover { transform: translateY(-3px); box-shadow: 0 22px 44px rgba(16, 17, 20, 0.16); }
.example img { width: 100%; }
.example .caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}
.example .caption strong { font-size: 16px; }
.example .caption span { font-size: 13px; color: var(--muted); }

/* Uploader */
.designer {
  padding: 88px 0;
  background: var(--bg);
}
.uploader {
  background: var(--bg);
  border: 2px solid #c9d0dc;
  border-radius: 12px;
  padding: 40px 36px 36px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 1120px;
  margin-inline: auto;
}
.uploader-title { max-width: 18em; margin: 0 auto 12px; text-wrap: balance; }
.uploader-help {
  margin: 0 auto 32px;
  max-width: 42em;
  color: var(--muted);
}
.uploader-help.tight { margin: 0 0 16px; font-size: 14px; text-align: left; }

.uploader-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 32px;
  align-items: start;
  text-align: left;
}

.stage-wrap {
  position: relative;
  background: var(--bg-soft);
  border-radius: 12px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
}
#mockup {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
.stage-wrap.is-dragging #mockup { cursor: grabbing; }
.drop-message {
  position: absolute;
  left: 50%;
  top: 26%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
.drop-message p {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--navy);
  text-shadow: 0 1px 0 #fff;
}
.drop-message .file-btn { pointer-events: auto; }
.file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.controls { display: flex; flex-direction: column; gap: 16px; }
.control-block { margin: 0; border: 0; padding: 0; }
.control-block legend, .slider-row label, .ring-picker-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
  display: block;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip.is-on {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
  background: #fff5f6;
  color: var(--red-deep);
}
.chip-swatch-only { padding: 0 12px; }
.ring-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.ring-picker-label { margin: 0; }
#ring-color {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  cursor: pointer;
}
.control-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.slider-row {
  display: grid;
  grid-template-columns: 72px 1fr 56px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.slider-row input[type="range"] { width: 100%; accent-color: var(--red); }
.slider-row output { font-size: 13px; font-weight: 600; color: var(--muted); text-align: right; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.error { color: var(--danger); font-weight: 600; margin: 0; }

.summary {
  display: none;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.summary.is-open { display: block; }
.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
}
.summary-still {
  margin: 0;
  background: var(--bg-soft);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.summary-still img { width: 100%; border-radius: 12px; }
#summary-fields {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
  margin: 0 0 16px;
}
#summary-fields dt { font-weight: 700; color: var(--navy); }
#summary-fields dd { margin: 0; }
.tbd {
  display: inline;
  background: #fde8eb;
  color: var(--red-deep);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 13px;
  padding: 1px 8px;
  border-radius: 4px;
}
.checkout-note, .monitor-note, .price-note { font-size: 14px; color: var(--muted); }

/* How / pricing / faq */
.how {
  padding: 88px 0;
  background: var(--bg-soft);
  text-align: center;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}
.step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.step-num {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.pricing {
  padding: 88px 0;
  background: var(--bg);
  text-align: center;
}
.price-table {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 16px;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow);
}
.price-table th, .price-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.price-table th {
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.price-table tr:last-child td { border-bottom: 0; }
.price-note { max-width: 42em; margin: 16px auto 0; }

.faq-sec {
  padding: 88px 0 96px;
  background: var(--bg-soft);
  text-align: center;
}
.faq-list {
  max-width: 760px;
  margin: 32px auto 0;
  text-align: left;
}
.faq-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 12px;
}
.faq-item p { margin: 0; color: var(--muted); }

/* Footer */
footer {
  background: var(--navy);
  color: #e8ecf4;
  padding: 56px 0 48px;
}
footer a { color: #fff; }
footer a:hover { color: #ffd4da; }
.foot {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
}
.foot p { margin: 0 0 6px; }
.foot-by { margin-top: 12px; }
.foot-sig { width: 120px; height: auto; margin-bottom: 12px; opacity: 0.9; }

/* Phone */
@media (max-width: 860px) {
  :root { --wrap: calc(100% - 32px); --header-h: 112px; }
  body { font-size: 16px; }
  .nav { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 0 10px; }
  .brand { justify-content: center; }
  .brand-name { font-size: 26px; }
  nav { justify-content: center; flex-wrap: wrap; gap: 10px 14px; }
  .nav-rest { display: none; }
  .hero { padding: 28px 0 8px; }
  .hero h1 { font-size: clamp(30px, 8vw, 36px); margin-bottom: 12px; }
  .tagline { margin-bottom: 10px; font-size: 20px; }
  .color-line { margin-bottom: 16px; font-size: 16px; }
  .hero-cta { margin-bottom: 14px; }
  .hero-cta .btn-lg { min-height: 48px; }
  .color-swatches { margin-bottom: 8px; }
  .hero-products { grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 4px; }
  .hero-products .hero-third { display: none; }
  .hero-products figcaption { font-size: 12px; }
  .examples, .designer, .how, .pricing, .faq-sec { padding: 64px 0; }
  .example-grid, .color-grid, .steps, .uploader-grid, .summary-grid {
    grid-template-columns: 1fr;
  }
  .color-grid { grid-template-columns: 1fr 1fr; }
  .uploader { padding: 28px 18px; }
  .slider-row { grid-template-columns: 64px 1fr 48px; }
  .foot { flex-direction: column; align-items: flex-start; }
  .color-swatches { gap: 12px; }
  .drop-message { top: 14%; }
}
