/* ============================================================
   27 Claude Tips — landing page
   Recreates pages 1–2 of the PDF, then gates the rest.
   ============================================================ */

:root {
  --canvas:      #edeef0;
  --paper:       #ffffff;
  --ink:         #1a1a1a;
  --ink-soft:    #5f6368;
  --ink-faint:   #9aa0a6;
  --rule:        #dadce0;
  --hl-blue:     #bfd3f8;
  --hl-yellow:   #fcefc7;
  --gblue:       #1a73e8;   /* Google blue 600 — the capture box */
  --gblue-dark:  #1765cc;
  --gblue-ring:  rgba(26,115,232,.22);
  --danger:      #c5372c;
  --sheet-w:     820px;
  --shadow:      0 1px 3px rgba(60,64,67,.28), 0 4px 10px 2px rgba(60,64,67,.14);
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- highlights (as in the document) ---------- */
.hl-blue   { background: var(--hl-blue);   padding: 0 .06em; }
.hl-yellow { background: var(--hl-yellow); padding: .04em .12em; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar-doc { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-icon {
  width: 20px; height: 24px; flex: none; border-radius: 3px;
  background: #4285f4;
  box-shadow: inset 0 5px 0 -3px #fff, inset 0 10px 0 -3px #fff, inset 0 15px 0 -3px #fff;
}
.topbar-name {
  font-size: 16px; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.topbar-meta { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gblue); color: #fff;
  font-family: var(--sans); font-size: 16px; font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none; border: 0; border-radius: 8px;
  padding: 13px 22px; cursor: pointer;
  transition: background .15s ease, transform .06s ease, box-shadow .15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.14);
}
.btn:hover  { background: var(--gblue-dark); box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--gblue-ring); outline-offset: 2px; }
.btn--sm   { padding: 9px 16px; font-size: 14px; border-radius: 7px; }
.btn--lg   { padding: 15px 28px; font-size: 17px; }
.btn--full { width: 100%; padding: 15px 22px; font-size: 17px; }
.btn[disabled] { opacity: .72; cursor: default; }

/* spinner inside the submit button */
.spinner { display: none; width: 17px; height: 17px; flex: none;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation-duration: 2s; }
}

/* ---------- workspace: sidebar + pages ---------- */
.workspace {
  max-width: 1240px; margin: 0 auto; padding: 32px 24px 0;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px;
  align-items: start;
}

.toc {
  position: sticky; top: 78px; padding: 4px 8px 0 0;
  font-size: 14px; color: var(--ink-soft);
}
.toc-title { margin: 0 0 14px; font-size: 15px; font-weight: 400; color: var(--ink); }
.toc-tab {
  margin: 0 0 14px; padding: 9px 14px; border-radius: 999px;
  background: #d3e3fd; color: #041e49; font-weight: 700; font-size: 14px;
}
.toc-list { margin: 0; padding: 0 0 0 4px; list-style: none; counter-reset: tip; }
.toc-list li {
  counter-increment: tip; padding: 7px 14px 7px 0; line-height: 1.4;
}
.toc-list li::before { content: counter(tip) ". "; color: var(--ink-soft); }
.toc-more { margin: 10px 0 0; padding-left: 4px; color: var(--ink-faint); }
.toc-more span { margin-right: 6px; }

.pages { min-width: 0; }

/* ---------- paper sheets ---------- */
.sheet {
  background: var(--paper);
  box-shadow: var(--shadow);
  max-width: var(--sheet-w);
  margin: 0 auto 28px;
  padding: 76px 84px 64px;
}

/* page 1 — cover */
.sheet--cover {
  min-height: 900px; display: flex; flex-direction: column;
  padding-top: 132px;
}
.cover-block { max-width: 640px; }
.cover-title {
  margin: 0; font-size: 76px; line-height: 1.06; font-weight: 700;
  letter-spacing: -.022em;
}
.cover-sub {
  margin: 14px 0 0; font-size: 42px; line-height: 1.14; font-weight: 400;
  letter-spacing: -.014em;
}
.cover-body { margin: 52px 0 0; font-size: 19px; line-height: 1.62; }
.cover-body p { margin: 0 0 14px; }

.byline { margin-top: auto; padding-top: 72px; }
.byline-name { margin: 0; font-size: 19px; font-weight: 700; }
.byline-sub  { margin: 4px 0 0; font-size: 18px; color: var(--ink-faint); }

/* page 2 — tip */
.tip-title {
  margin: 0 0 30px; font-size: 34px; line-height: 1.2; font-weight: 700;
  letter-spacing: -.014em;
}
.body { margin: 0 0 22px; font-size: 18px; line-height: 1.62; }

.codeblock {
  margin: 0 0 26px; padding: 20px 24px;
  background: #f8f9fa; border: 1px solid var(--rule); border-radius: 10px;
  font-family: var(--mono); font-size: 19px; font-weight: 700;
  overflow-x: auto;
}
.codeblock code { font: inherit; }

.figure { margin: 0 0 26px; }
.figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--rule); border-radius: 8px;
}

.page-foot {
  display: flex; justify-content: space-between; gap: 16px;
  margin: 56px 0 0; padding-top: 18px;
  font-size: 14px; color: var(--ink-faint);
}

/* ============================================================
   THE GATE — blurred pages, no scroll past this point
   ============================================================ */
.gate {
  position: relative;
  max-width: var(--sheet-w); margin: 0 auto;
  padding-bottom: 40px;
}

/* The stack scrolls. Every sheet is blurred at build time, so the real text
   never reaches the browser and no CSS tweak can reveal it. */
.gate-stack { position: relative; }
.gate-sheet {
  display: block; width: 100%; height: auto; margin-bottom: 28px;
  box-shadow: var(--shadow);
  user-select: none; pointer-events: none;
}
.gate-sheet:last-of-type { margin-bottom: 0; }

/* Only the very bottom fades, so the last page doesn't end on a hard edge. */
.gate-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 300px;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(237,238,240,0) 0%,
    rgba(237,238,240,.72) 58%,
    var(--canvas) 100%);
}

/* Pinned over the stack for its whole length. 100vh tall so the card sits
   centred; the negative margin keeps it out of the layout height. */
.gate-overlay {
  position: sticky; top: 0; z-index: 3;
  height: 100vh; margin-bottom: -100vh;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

.gate-card {
  pointer-events: auto;
  width: min(444px, calc(100% - 40px));
  background: var(--paper);
  border: 1px solid #e3e5e8;
  border-radius: 8px;
  padding: 32px 32px 28px; text-align: center;
  box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 8px 28px 4px rgba(60,64,67,.22);
  /* On short viewports (landscape phones) the card must never grow past the
     screen — the overlay is pinned, so anything overflowing is unreachable. */
  max-height: calc(100vh - 32px); overflow-y: auto;
}

.gate-h {
  margin: 0 0 10px; font-size: 26px; line-height: 1.24; font-weight: 700;
  letter-spacing: -.012em; color: #202124;
}
.gate-p { margin: 0 0 20px; font-size: 15.5px; line-height: 1.56; color: #3c4043; }
.gate-p--sm { font-size: 15px; color: var(--ink-soft); }
.gate-sent-icon { margin: 0 0 10px; font-size: 38px; line-height: 1; }

.gate-form { margin: 0; }
.gate-form input[type="email"] {
  width: 100%; margin: 0 0 12px; padding: 13px 15px;
  font-family: var(--sans); font-size: 15.5px; color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: 8px;
}
.gate-form input[type="email"]::placeholder { color: #80868b; }
.gate-form input.invalid { border-color: var(--danger); border-width: 2px; }
.hp { position: absolute !important; left: -9999px !important; }

.gate-error {
  margin: 12px 0 0; font-size: 13.5px; font-weight: 700; color: var(--danger);
}
.gate-fine {
  margin: 16px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-faint);
}

/* ---------- footer ---------- */
.footer {
  max-width: var(--sheet-w); margin: 0 auto; padding: 30px 24px 56px;
  text-align: center; font-size: 15px; color: var(--ink-soft);
}
.footer p { margin: 0; }
.footer-sub { margin-top: 4px !important; color: var(--ink-faint); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .workspace { padding: 18px 14px 0; }
  .sheet { padding: 44px 28px 40px; margin-bottom: 20px; }
  .sheet--cover { padding-top: 64px; min-height: 0; }
  .cover-title { font-size: 46px; }
  .cover-sub   { font-size: 26px; }
  .cover-body  { margin-top: 34px; font-size: 17px; }
  .byline      { padding-top: 52px; }
  .byline-name { font-size: 17px; }
  .byline-sub  { font-size: 16px; }
  .tip-title   { font-size: 26px; margin-bottom: 22px; }
  .body        { font-size: 17px; }
  .codeblock   { font-size: 16px; padding: 16px 18px; }
  .topbar-meta { display: none; }
  .gate-card    { padding: 26px 22px 24px; width: calc(100% - 28px); }
  .gate-sheet   { margin-bottom: 20px; }
  .gate-h       { font-size: 22px; }
  .gate-h      { font-size: 23px; }
  .page-foot   { font-size: 12px; }
}
