/* The Slide Roaster website (index.html, about.html).
   Colours are taken from the logo so the site and the add-in icon match. */

:root {
  --ink: #17242e;
  --ink-soft: #4a5862;
  --paper: #fbfaf6;
  --paper-deep: #f3efe6;
  --card: #ffffff;
  --line: #e4ded2;
  --ember: #c24428;
  --ember-dark: #a3361e;
  --flame: #f4a93c;
  --slate: #aeb8bf;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 36, 46, 0.06), 0 8px 24px rgba(23, 36, 46, 0.08);
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

img { height: auto; } /* keep proportions when max-width shrinks an image */

a { color: var(--ember); }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Nav ---------------------------------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand svg { width: 40px; height: 40px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}

.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] { color: var(--ink); }

/* ---- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ember);
  color: #fff;
  box-shadow: 0 2px 0 var(--ember-dark);
}

.btn-primary:hover { background: var(--ember-dark); }

.btn-primary:disabled {
  background: var(--slate);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover { background: #24384a; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}

.btn-ghost:hover { border-color: var(--ink-soft); }

.btn-sm { padding: 10px 16px; font-size: 14px; }

.btn svg { width: 18px; height: 18px; }

/* ---- Hero --------------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

h1 { font-size: clamp(38px, 5.4vw, 60px); }

h1 em {
  font-style: italic;
  color: var(--ember);
}

h2 { font-size: clamp(28px, 3.6vw, 40px); }

h3 { font-size: 21px; letter-spacing: -0.01em; }

.lede {
  margin: 20px 0 28px;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 34ch;
}

/* ---- Roaster card (upload + results) ------------------------------------ */

.roaster {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 280px;
  padding: 28px 20px;
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: var(--paper);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragging {
  border-color: var(--ember);
  background: #fff7f2;
  outline: none;
}

.dropzone .icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fbe3d6;
  color: var(--ember);
}

.dropzone .icon svg { width: 26px; height: 26px; }

.dropzone strong { font-size: 17px; }

kbd {
  font: 600 12px/1 var(--sans);
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
}

.preview {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-deep);
}

.preview img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.preview.is-roasting img { filter: saturate(0.6); }

.preview.is-roasting::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(244, 169, 60, 0.35), rgba(194, 68, 40, 0) 70%);
  animation: heat 1.6s ease-in-out infinite alternate;
}

@keyframes heat {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

.roaster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.roaster-actions .btn-primary { flex: 1 1 auto; }

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-soft);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid #fbe3d6;
  border-top-color: var(--ember);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdecea;
  color: #8a2a17;
  font-size: 15px;
}

.privacy-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* Results */

.results { margin-top: 20px; }

.results-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}

.results-head svg { width: 24px; height: 24px; }

.roast-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.roast {
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ember);
  animation: rise 0.35s ease both;
}

.roast:nth-child(2) { animation-delay: 0.08s; }
.roast:nth-child(3) { animation-delay: 0.16s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.roast p { margin: 0; font-size: 16px; }

.roast .fix {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--flame);
  color: var(--ink-soft);
  font-size: 15px;
}

.roast .fix b { color: var(--ink); }

.summary {
  margin: 14px 0 0;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
}

.summary b { color: var(--flame); }

.upsell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 10px;
  background: #fbe3d6;
  font-size: 15px;
}

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

.section { padding: 72px 0; }

.section-alt {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-head p {
  margin: 14px 0 0;
  font-size: 18px;
  color: var(--ink-soft);
}

.step {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.step p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
}

/* Add-in call to action */

.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: center;
  padding: 40px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
}

.cta p {
  margin: 14px 0 24px;
  color: #c9d2d8;
  font-size: 17px;
}

.cta .btn-primary { box-shadow: none; }

.cta img {
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.fine {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: #93a1ab;
}

/* ---- About page --------------------------------------------------------- */

.story {
  max-width: 680px;
  padding: 56px 0 24px;
}

.story h1 { font-size: clamp(36px, 5vw, 54px); }

.story p {
  margin: 0 0 20px;
  font-size: 19px;
  line-height: 1.7;
}

.story .lede { max-width: none; margin-bottom: 36px; }

.story .pull {
  margin: 36px 0;
  padding: 4px 0 4px 24px;
  border-left: 4px solid var(--ember);
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.check {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.check p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.check q {
  display: block;
  margin-top: 12px;
  font-style: italic;
  font-size: 15px;
  color: var(--ember-dark);
  quotes: "\201C" "\201D";
}

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

.footer {
  padding: 32px 0 48px;
  color: var(--ink-soft);
  font-size: 14px;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer nav {
  display: flex;
  gap: 20px;
}

.footer a { color: var(--ink-soft); }

[hidden] { display: none !important; }

/* ---- Small screens ------------------------------------------------------ */

@media (max-width: 860px) {
  .cta { grid-template-columns: 1fr; }

  .cta { padding: 28px 24px; gap: 28px; }

  .checks { grid-template-columns: 1fr; }

  .section { padding: 56px 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }

  .wrap { padding-left: 16px; padding-right: 16px; }

  .nav-links { gap: 14px; }

  .nav-links .btn { padding: 9px 12px; font-size: 13px; }

  .brand span { display: none; }

  .roaster { padding: 14px; }

  .dropzone { min-height: 220px; }

  .story p { font-size: 17px; }

  .story .pull { font-size: 22px; }
}

/* Two buttons side by side in a call-to-action box */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
