/* Claude Projects Hub
   Colors and fonts come from the Cru Cornerstone design system
   (cornerstone/bundle.css). Everything here is layout on top of that. */

:root {
  --font-heading: Sora, ui-sans-serif, system-ui, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, sans-serif;
  --page: 1120px;
  --gutter: 32px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cs-color-surface-default);
  color: var(--cs-color-text-normal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--cs-color-text-link); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--cs-color-focus);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

/* Screen reader only: present for assistive tech, invisible on screen. */
.sr {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Edit mode bar ---------- */

.editbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--cs-color-brand-fill-loud);
  color: var(--cs-color-brand-on-loud);
}
.editbar-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
  padding-top: 10px; padding-bottom: 10px;
}
.editbar-text { font-size: 14px; font-weight: 600; }
.editbar-actions { display: flex; align-items: center; gap: 12px; }
.savestate { font-size: 14px; font-weight: 600; }

/* ---------- Navy top ---------- */

.navy { background: var(--cs-color-navy); color: #ffffff; }

.topbar {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px 24px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-tick {
  display: block; width: 12px; height: 32px;
  background: var(--cs-color-brand-fill-loud);
}
.brand-name {
  font-family: var(--font-heading); font-weight: 600;
  font-size: 20px; line-height: 1.2;
}
.topbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.sections { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; }
.sections a { color: #ffffff; text-decoration: none; font-weight: 600; }
.sections a:hover { text-decoration: underline; }
.searchbox { width: 260px; max-width: 100%; }

.hero {
  display: flex; flex-direction: column; gap: 20px;
  padding-top: 24px; padding-bottom: 48px;
}
.hero h1 { font-size: clamp(34px, 5vw, 52px); max-width: 780px; }
.hero-accent { color: var(--cs-color-brand-fill-loud); }
.hero-sub { margin: 0; font-size: clamp(17px, 2vw, 20px); color: #e5e6e5; max-width: 680px; }

.counts { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 4px; }
.count {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 150px; padding: 16px 24px;
}
.count-num { font-family: var(--font-heading); font-weight: 600; font-size: 41px; line-height: 1.2; }
.count-label { font-size: 14px; }
.count-brand { background: var(--cs-color-brand-fill-loud); color: var(--cs-color-brand-on-loud); }
.count-warning { background: var(--cs-color-warning-fill-loud); color: var(--cs-color-warning-on-loud); }
.count-cyan { background: var(--cs-color-cyan); color: var(--cs-color-link-on); }

.stripe { display: flex; height: 12px; }
.stripe span { flex: 1; }
.stripe span:nth-child(1) { background: var(--cs-color-brand-fill-loud); }
.stripe span:nth-child(2) { background: var(--cs-color-orange); }
.stripe span:nth-child(3) { background: var(--cs-color-cerise); }
.stripe span:nth-child(4) { background: var(--cs-color-purple); }
.stripe span:nth-child(5) { background: var(--cs-color-turquoise); }
.stripe span:nth-child(6) { background: var(--cs-color-cyan); }
.stripe span:nth-child(7) { background: var(--cs-color-green); }

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

.band-main { background: var(--cs-color-brand-fill-quiet); }
.band-small { background: var(--cs-color-information-fill-quiet); }
.band[hidden] { display: none; }

.section {
  display: flex; flex-direction: column;
  padding-top: 48px; padding-bottom: 48px;
}
.band-main .section { gap: 28px; }
.band-small .section { gap: 24px; }
.section-title { font-size: clamp(26px, 3vw, 32px); }
.section-title-sm { font-size: 25px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.rows { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Cards ---------- */

.card-wrap {
  position: relative;
  border-radius: 6px;
  transition: box-shadow 150ms ease, transform 150ms ease;
}
.card-wrap.is-link:hover,
.card-wrap.is-link:focus-within {
  box-shadow: 0 0 0 3px var(--cs-color-brand-fill-loud);
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
  .card-wrap { transition: none; }
  .card-wrap.is-link:hover, .card-wrap.is-link:focus-within { transform: none; }
}

/* The invisible link that covers the whole card. */
.stretch {
  position: absolute; inset: 0; z-index: 2; border-radius: 6px;
}
.stretch:focus-visible { outline: 3px solid var(--cs-color-focus); outline-offset: 3px; }

.card { display: block; background: var(--cs-color-surface-raised); height: 100%; }

.card-media {
  height: 340px; display: flex; align-items: center;
  justify-content: center; padding: 32px;
}

.card-body { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.card-head {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
}
.card-title { font-size: 25px; }
.card-what { margin: 0; }
.card-why { margin: 0; color: var(--cs-color-text-quiet); flex-grow: 1; }
.card-link {
  display: flex; align-items: center; gap: 8px;
  padding-top: 14px; min-width: 0;
  border-top: 1px solid var(--cs-color-surface-border);
}
.card-link svg { flex-shrink: 0; }
.urlline {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600;
}
.url-live { color: var(--cs-color-text-link); }
.url-none { color: var(--cs-color-text-quiet); }

/* ---------- Device frames ---------- */

.laptop { width: 100%; max-width: 330px; display: flex; flex-direction: column; align-items: center; }
.laptop-lid {
  width: 100%; aspect-ratio: 16 / 10; padding: 8px 8px 10px;
  background: #0a0a0a; border-radius: 12px 12px 0 0; display: flex;
}
.laptop-base { width: 112%; height: 10px; background: #323232; border-radius: 0 0 12px 12px; }
.laptop-screen {
  flex: 1; min-width: 0; background: #1d1d1d;
  border-radius: 3px; overflow: hidden; display: flex; position: relative;
}

.phone {
  width: 156px; height: 312px; padding: 9px;
  background: #0a0a0a; border-radius: 12px; display: flex; flex-shrink: 0;
}
.phone-screen {
  flex: 1; min-width: 0; background: #1d1d1d;
  border-radius: 6px; overflow: hidden; display: flex; position: relative;
}

/* The screenshot area, which doubles as a drop target in edit mode. */
.drop {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 100%; overflow: hidden;
  text-align: center; color: #cacaca;
  font-size: 12px; line-height: 1.4; padding: 12px;
}
.drop.editable { cursor: pointer; }
.drop.dragover { outline: 3px dashed var(--cs-color-brand-fill-loud); outline-offset: -4px; }
.drop:focus-within { outline: 3px solid var(--cs-color-focus); outline-offset: 2px; }
.drop img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
}

/* ---------- Smaller project rows ---------- */

.row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 16px 32px; padding: 20px;
  background: var(--cs-color-surface-raised);
  border: 1px solid var(--cs-color-information-border-quiet);
  border-radius: 6px;
}
.row-media {
  flex: 0 0 200px; padding: 16px; border-radius: 3px;
  display: flex; flex-direction: column; align-items: center;
}
.row-media .laptop-lid { padding: 5px 5px 6px; border-radius: 6px 6px 0 0; }
.row-media .laptop-screen { border-radius: 0; }
.row-media .laptop-base { width: 110%; height: 6px; border-radius: 0 0 6px 6px; }
.row-media .drop { font-size: 10px; line-height: 1.3; padding: 4px; }
.row-body { flex: 999 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.row-title { font-family: var(--font-heading); font-weight: 600; font-size: 20px; line-height: 1.2; }
.row-why { color: var(--cs-color-text-quiet); }

/* ---------- Edit fields ---------- */

.fields { display: flex; flex-direction: column; gap: 12px; }
.row .fields { flex: 999 1 260px; min-width: 0; gap: 10px; }

/* ---------- Misc ---------- */

.noresults { padding-top: 64px; padding-bottom: 64px; font-size: 20px; color: var(--cs-color-text-quiet); }
.edithelp { padding-top: 48px; }
.edithelp-inner { display: flex; flex-direction: column; gap: 4px; }
.edithelp-inner strong { font-family: var(--font-heading); font-weight: 600; }
.edithelp-inner span { font-size: 14px; }

.spacer { flex-grow: 1; min-height: 48px; }

.footer { background: var(--cs-color-navy); color: #e5e6e5; font-size: 14px; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px 24px;
  padding-top: 20px; padding-bottom: 20px;
}

/* ---------- Owner sign in ---------- */

.owner-dot {
  position: fixed; left: 16px; bottom: 16px; z-index: 30;
  width: 14px; height: 14px; padding: 0; border: 0;
  border-radius: 50%; background: #949595; opacity: 0.7; cursor: pointer;
}
.owner-dot[hidden] { display: none; }

.signin {
  position: fixed; left: 16px; bottom: 16px; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px;
  padding: 12px; max-width: calc(100% - 32px);
  background: var(--cs-color-surface-raised);
  border: 1px solid var(--cs-color-surface-border);
  border-radius: 6px;
}
.signin[hidden] { display: none; }
.signin-fields { display: flex; flex-direction: column; gap: 8px; width: 200px; }
.signin-buttons { display: flex; gap: 8px; }
.signin-msg {
  width: 100%; font-size: 14px; font-weight: 600;
  color: var(--cs-color-danger-on-quiet);
}
.signin-msg[hidden] { display: none; }

/* ---------- Narrow screens ---------- */

@media (max-width: 640px) {
  :root { --gutter: 16px; }

  /* Let the three count boxes share one row instead of stacking as
     tall, half width blocks. */
  .counts { gap: 12px; }
  .count {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 14px;
  }
  .count-num { font-size: 30px; }
  .count-label { font-size: 12px; }

  .hero { padding-bottom: 36px; }
  .section { padding-top: 36px; padding-bottom: 36px; }

  /* A 200px picture next to text leaves the text no room on a phone. */
  .row-media { flex: 1 1 100%; }
}

/* ---------- Set a password ----------
   Only shown after arriving on a one-time password reset link. */

.setpass {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(31, 31, 71, 0.75);
}
.setpass[hidden] { display: none; }
.setpass-card {
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px;
  background: var(--cs-color-surface-raised);
  border-radius: 6px;
}
.setpass-card h2 { font-size: 25px; }
.setpass-note { margin: 0; font-size: 14px; color: var(--cs-color-text-quiet); }
.setpass-buttons { display: flex; gap: 8px; padding-top: 4px; }
.setpass-msg { font-size: 14px; font-weight: 600; color: var(--cs-color-danger-on-quiet); }
.setpass-msg[hidden] { display: none; }
