/* perfolio.ca: the same tokens as the app (web/src/index.css, docs/DESIGN.md). Light theme only;
   the brand blue is the one accent; no gradients, no shadows. */

:root {
  --canvas: #f7f9fc;
  --surface: #ffffff;
  --sunken: #f8fafc;
  --heading: #14245a;
  --fg: #1e293b;
  --fg-muted: #64748b;
  --fg-subtle: #94a3b8;
  --line: #e3eaf5;
  --line-strong: #cbd5e1;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: #eaf1fe;
  --inverse: #ffffff;
  --positive: #16a364;
  --positive-soft: #e8f6ef;
  --negative: #dc3545;
  --negative-soft: #fcecee;
  --overlay: rgba(20, 36, 90, 0.55); /* the heading navy over the page */
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1080px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  color: var(--heading);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 28px;
  font-weight: 700;
}

h3 {
  font-size: 18px;
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.muted {
  color: var(--fg-muted);
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.skip:focus {
  top: 16px;
  z-index: 10;
}

/* buttons: the app's primary and quiet */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: var(--inverse);
}

.btn-primary:hover {
  background: var(--brand-hover);
  color: var(--inverse);
}

.btn-quiet {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--line);
}

.btn-quiet:hover {
  background: var(--sunken);
  border-color: var(--line-strong);
  color: var(--fg);
}

.btn:disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* header */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 28px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 12px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--brand);
  text-decoration: none;
  background: var(--brand-soft);
}

.site-nav .btn {
  padding: 8px 14px;
  font-size: 14px;
}

/* hero */

.hero {
  padding: 64px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-soft, #eaf1fe);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero h1 {
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 18ch;
}

.hero-lede {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 56ch;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-offer {
  font-size: 13px;
  font-weight: 600;
  color: var(--positive, #16a364);
  background: var(--positive-soft, #e8f6ef);
  padding: 6px 10px;
  border-radius: 999px;
}

.hero-proof {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 14.5px;
  color: var(--fg);
}

.hero-proof li {
  position: relative;
  padding-left: 26px;
  color: var(--fg-muted);
}

.hero-proof li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  background: no-repeat center / 16px 16px
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 7-7' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.hero-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--fg-subtle, #8a97ad);
}

.hero-shot {
  margin: 0;
  min-width: 0;
}

.hero-shot figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--fg-muted);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero {
    padding: 40px 0 40px;
  }
}

/* the three feature sections */

.feature {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.feature .wrap {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 48px;
  align-items: center;
}

.feature.flip .feature-text {
  order: 2;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
}

.feature h2 {
  margin-bottom: 16px;
}

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

.feature li {
  position: relative;
  padding-left: 24px;
  font-size: 16px;
}

.feature li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand);
}

.feature li strong {
  font-weight: 600;
  color: var(--heading);
}

.feature .lede {
  margin-bottom: 16px;
  color: var(--fg-muted);
}

/* a screenshot in a card; the card itself is the placeholder when the file is missing */

.shot {
  margin: 0;
}

.shot-frame {
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1512 / 792;
  display: grid;
  place-items: center;
}

.shot img,
.hero-shot img {
  width: 100%;
  height: auto;
  display: block;
}

.shot img.missing,
.hero-shot img.missing {
  display: none;
}

.shot-frame:has(img.missing)::after {
  content: "Screenshot to come";
  font-size: 14px;
  color: var(--fg-subtle);
}

.shot figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--fg-muted);
}

/* how it works */

.how {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.how h2 {
  margin-bottom: 24px;
}

.how ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.how li {
  padding: 20px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.how .step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.how h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.how p {
  font-size: 14px;
  color: var(--fg-muted);
}

/* join */

.join {
  padding: 64px 0;
}

.join .wrap {
  max-width: 560px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
}

.card h2 {
  margin-bottom: 8px;
}

.card > p {
  color: var(--fg-muted);
  margin-bottom: 24px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.field label span {
  color: var(--fg-muted);
  font-weight: 400;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s;
}

.field input::placeholder {
  color: var(--fg-subtle);
}

.field input:hover {
  border-color: var(--line-strong);
}

.field input:focus {
  border-color: var(--brand);
  outline: none;
}

.field input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

/* the reasons: tap-to-toggle chips, several at once */
.reasons {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  min-width: 0;
}

.reasons legend {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  padding: 0;
  margin-bottom: 8px;
}

.reasons legend span {
  color: var(--fg-muted);
  font-weight: 400;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14.5px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.chip:hover {
  border-color: var(--line-strong);
}

.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip:has(input:checked) {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: var(--brand);
  font-weight: 500;
}

.chip:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.join-form .btn {
  width: 100%;
  margin-top: 8px;
}

.fine {
  margin-top: 16px;
  font-size: 13px;
  color: var(--fg-muted);
  text-align: center;
}

.status {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.status:empty {
  display: none;
}

.status.problem {
  background: var(--negative-soft);
  color: var(--negative);
}

.status.done {
  background: var(--positive-soft);
  color: var(--positive);
}

.join-done {
  text-align: center;
  padding: 16px 0;
}

.join-done h2 {
  color: var(--positive);
}

.join-done p {
  margin-top: 8px;
  color: var(--fg-muted);
}

/* the demo dialog: the app's Modal, a 14px panel on a navy overlay, no shadow */

.modal {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--fg);
}

.modal::backdrop {
  background: var(--overlay);
}

.modal-panel {
  padding: 28px;
}

.modal-panel h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.modal-panel > p {
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.modal .join-form .btn {
  width: auto;
  margin-top: 0;
}

.modal-skip {
  margin-top: 16px;
  text-align: center;
}

.text-link {
  padding: 4px 6px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  cursor: pointer;
  text-underline-offset: 3px;
}

.text-link:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

.text-link:disabled {
  opacity: 0.6;
  pointer-events: none;
}

.modal .fine {
  margin-top: 12px;
}

.modal-open {
  overflow: hidden;
}

/* footer */

.site-footer {
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-muted);
}

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

.site-footer nav {
  display: flex;
  gap: 16px;
}

/* the privacy and terms pages */

.doc {
  padding: 48px 0 64px;
}

.doc .wrap {
  max-width: 720px;
}

.doc h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.doc .stamp {
  color: var(--fg-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.doc h2 {
  font-size: 20px;
  margin: 32px 0 8px;
}

.doc p,
.doc li {
  font-size: 16px;
  margin-bottom: 8px;
}

.doc ul {
  padding-left: 20px;
  margin: 0 0 8px;
}

.doc .notice {
  margin-top: 40px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  color: var(--fg-muted);
}

/* responsive */

@media (max-width: 900px) {
  .how ol {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .wrap {
    padding: 0 16px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 24px;
  }

  .hero {
    padding: 48px 0 40px;
    text-align: left;
  }

  .hero-lede {
    margin-top: 14px;
    font-size: 17px;
  }

  .hero h1 {
    font-size: 31px;
    line-height: 1.12;
  }

  /* the screenshot sits right under the buttons; the proof points and the note follow it */
  .hero-text {
    display: contents;
  }

  .hero-badge {
    justify-self: start;
  }

  .hero-grid {
    gap: 0;
  }

  .hero-shot {
    order: 5;
    margin-top: 28px;
  }

  .hero-proof {
    order: 6;
    margin-top: 24px;
  }

  .hero-note {
    order: 7;
    margin-top: 16px;
  }

  /* tap targets: 44px on a phone */
  .btn,
  .site-nav .btn,
  .text-link,
  .site-footer nav a {
    min-height: 44px;
  }

  .text-link,
  .site-footer nav a {
    display: inline-flex;
    align-items: center;
  }

  .field input {
    min-height: 44px;
  }

  /* the dialog as a sheet from the bottom, where a thumb reaches */
  .modal {
    width: 100%;
    max-width: none;
    max-height: calc(100% - 24px);
    margin: auto 0 0;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .feature .wrap {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature.flip .feature-text {
    order: 0;
  }

  .site-nav .nav-link {
    display: none;
  }

  .card {
    padding: 24px 20px;
  }

  .site-footer .wrap {
    flex-direction: column;
  }

  .modal-panel {
    padding: 24px 20px;
  }
}

/* the two things to open now: the demo and Lens, side by side, stacked on a phone */
.try {
  padding: 8px 0 56px;
}

.try h2 {
  margin-bottom: 20px;
}

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

.try-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s;
}

.try-card:hover,
.try-card:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.try-card p {
  margin: 0;
  color: var(--fg-muted);
}

.try-tag {
  justify-self: start;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

.try-go {
  margin-top: 8px;
  color: var(--brand);
  font-weight: 600;
}

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

@media (max-width: 480px) {
  .try-card {
    padding: 22px;
  }

  .how ol {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero h1 {
    font-size: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .field input {
    transition: none;
  }
}
