/* Ocelot File Manager: the website.
   The palette comes from the app icon: white, a light blue folder front, a deeper
   blue folder back. The gold of the eyes stays in the icon. The one big idea is the
   hero: the icon's folder at full size, with the app window sitting inside it. */

:root {
  color-scheme: light dark;

  --page: #ffffff;
  --ink: #0c2744;
  --muted: #47607a;
  --rule: #d6e4f2;
  --tint: #eef6fd;

  --folder-back: #3f86d8;
  --folder-front: #93cdf8;
  --on-front: #0c2744;
  --on-front-muted: #173f68;
  --front-edge: rgba(255, 255, 255, 0.55);

  --band: #0f3a66;
  --on-band: #ffffff;
  --on-band-muted: #c9dcf0;

  --button: #1a62b8;
  --button-hover: #14508f;
  --on-button: #ffffff;
  --link: #1a62b8;
  --field: #ffffff;
  --field-edge: #7a93ad;

  --shadow-window: 0 24px 60px rgba(4, 24, 43, 0.28), 0 2px 8px rgba(4, 24, 43, 0.14);
  --shadow-shot: 0 12px 32px rgba(4, 24, 43, 0.16), 0 1px 3px rgba(4, 24, 43, 0.12);
  --shadow-front: 0 -10px 28px rgba(4, 24, 43, 0.22);

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1240px;
  --pad: clamp(24px, 5vw, 64px);
  --section: clamp(72px, 11vw, 144px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0a0e18;
    --ink: #e9f1fa;
    --muted: #a5b6ca;
    --rule: #25324a;
    --tint: #121a2b;

    --folder-back: #1f4069;
    --folder-front: #2f639f;
    --on-front: #ffffff;
    --on-front-muted: #dce9f7;
    --front-edge: rgba(255, 255, 255, 0.22);

    --band: #121a2b;
    --on-band: #e9f1fa;
    --on-band-muted: #a5b6ca;

    --button: #5aa9ee;
    --button-hover: #7dbdf3;
    --on-button: #06192c;
    --link: #7dbdf3;
    --field: #121a2b;
    --field-edge: #6b83a1;

    --shadow-window: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-shot: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-front: 0 -10px 28px rgba(0, 0, 0, 0.5);
      }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.16em;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--button);
  color: var(--on-button);
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.028em;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.012em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

kbd {
  font: inherit;
  white-space: nowrap;
}

/* Top bar */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}

/* On the home page the big icon and the name are the top bar's left side. */
.bar-home {
  position: relative;
  z-index: 3;
  height: 0;
  padding: 0;
  justify-content: end;
  align-items: start;
}

.bar-home nav {
  padding-top: clamp(20px, 3vw, 40px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.bar nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  font-size: 1rem;
}

.bar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.bar nav a:hover {
  text-decoration: underline;
}

.bar nav .bar-call {
  color: var(--link);
  font-weight: 600;
}

/* Hero */

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(20px, 3vw, 32px) clamp(32px, 6vw, 88px);
  align-items: start;
  padding-block: clamp(12px, 2vw, 24px) clamp(24px, 3vw, 32px);
}

.hero-copy h1 {
  grid-column: 1 / -1;
}

.app-icon {
  flex: none;
  width: clamp(72px, 7vw, 104px);
  height: auto;
  margin-left: -9px;
}

h1 .name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(12px, 2vw, 20px);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h1 .claim {
  display: block;
  font-size: clamp(1.875rem, 4vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

h1 .claim span {
  display: block;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
}

/* Form */

.status {
  margin-bottom: 14px;
}

.notify-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 600;
}

.field {
  display: flex;
  gap: 8px;
}

input,
textarea,
button {
  font: inherit;
}

input[type="email"],
textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--field-edge);
  border-radius: 10px;
}

textarea {
  min-height: 180px;
  resize: vertical;
}

input::placeholder {
  color: var(--muted);
  opacity: 1;
}

button {
  flex: none;
  min-height: 48px;
  padding: 10px 18px;
  color: var(--on-button);
  background: var(--button);
  border: 0;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--button-hover);
}

.trap {
  position: absolute;
  left: -9999px;
}

.note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.note a {
  color: inherit;
}

/* The folder. Back panel, then the window, then the front panel over the window's lower edge. */

.folder {
  --window-width: min(100% - 2 * var(--pad), var(--wrap));
  position: relative;
  width: min(100% - 2 * var(--gutter), 1400px);
  margin-inline: auto;
  padding-top: 72px;
}

.folder-tab {
  position: absolute;
  top: 16px;
  left: 0;
  width: min(44%, 560px);
  height: 57px;
  color: var(--folder-back);
}

.folder-back {
  position: absolute;
  inset: 72px 0 64px;
  background: var(--folder-back);
  border-radius: 0 28px 0 0;
}

.window {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100% - 2 * var(--pad), 1240px);
  margin-inline: auto;
  margin-top: -28px;
  border-radius: 24px;
  box-shadow: var(--shadow-window);
}

.window img {
  width: 100%;
  border-radius: 24px;
}

@media (prefers-reduced-motion: no-preference) {
  .window {
    animation: peek 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
}

@keyframes peek {
  from {
    transform: translateY(96px);
  }

  to {
    transform: none;
  }
}

.folder-front {
  position: relative;
  z-index: 2;
  margin-inline: -8px;
  margin-top: -12%;
  padding: var(--pad) var(--pad) 0;
  overflow: hidden;
  color: var(--on-front);
  background: var(--folder-front);
  border-radius: 24px;
  box-shadow: var(--shadow-front);
}

.folder-front::before {
  content: "";
  position: absolute;
  inset: 12px 32px auto;
  height: 6px;
  background: var(--front-edge);
  border-radius: 3px;
}

.folder-front .feature-copy p {
  color: var(--on-front-muted);
}

/* Features */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.feature-copy h2 {
  margin-bottom: 20px;
}

.feature-copy p + p {
  margin-top: 14px;
}

.feature-copy p {
  color: var(--muted);
  max-width: 34em;
}

.folder-front .feature {
  padding-bottom: var(--pad);
}

.shot-bleed {
  margin-right: calc(-1 * var(--pad));
  border-radius: 14px 0 0 14px;
  overflow: hidden;
  box-shadow: var(--shadow-shot);
}

.shot-bleed img {
  width: 100%;
}

.section {
  padding-block: var(--section) 0;
}

.tree-row {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.tree-shot {
  justify-self: center;
  width: 230px;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow-shot);
}

.archive-row {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.habits {
  margin: 16px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
}

.habits li + li {
  margin-top: 6px;
}

/* An asterisk is already raised: no superscript on top of it. */
.note-ref {
  font-size: inherit;
  font-weight: 400;
  letter-spacing: 0;
  line-height: inherit;
  vertical-align: baseline;
}

.note-ref a {
  padding-inline: 0.1em;
  text-decoration: none;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  padding-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--rule);
}

.pair h2 {
  margin-bottom: 18px;
}

.pair h2,
h2.quiet {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
}

.pair p {
  color: var(--muted);
}

.pair p + p {
  margin-top: 14px;
}

/* What else */

.more-head {
  margin-bottom: clamp(32px, 4vw, 48px);
}

.archive-shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 16px;
}

.more-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px clamp(32px, 6vw, 88px);
  margin: 0;
}

.more-list dt {
  font-weight: 600;
}

.more-list dd {
  margin: 2px 0 0;
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

/* Trust band */

.band {
  margin-top: var(--section);
  padding-block: var(--section);
  color: var(--on-band);
  background: var(--band);
}

.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.band-grid h2 span {
  display: block;
}

.band-copy p {
  color: var(--on-band-muted);
}

.band-copy p + p {
  margin-top: 16px;
}

/* Downloads */

.downloads-status {
  margin-top: 12px;
  color: var(--muted);
}

.downloads-status strong {
  color: var(--ink);
}

.editions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--rule);
}

.edition {
  padding: 28px 0;
}

.edition + .edition {
  padding-left: clamp(24px, 4vw, 48px);
  border-left: 1px solid var(--rule);
}

.edition:first-child {
  padding-right: clamp(24px, 4vw, 48px);
}

.edition h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.edition p {
  color: var(--muted);
}

.editions-note {
  padding-top: 20px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
}

/* Questions, with disclosure triangles like the rows of the app's tree */

.questions {
  max-width: 820px;
  margin-top: clamp(24px, 3vw, 40px);
}

details {
  border-bottom: 1px solid var(--rule);
}

summary {
  position: relative;
  padding: 16px 8px 16px 28px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 1.45em;
  border-block: 5px solid transparent;
  border-left: 7px solid var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  summary::before {
    transition: transform 0.12s ease-out;
  }
}

details[open] summary::before {
  transform: rotate(90deg);
}

details p {
  padding: 0 8px 18px 28px;
  color: var(--muted);
}

/* Closing call, the folder once more */

.closing {
  position: relative;
  margin-top: var(--section);
  padding-top: 40px;
}

.closing .folder-tab {
  top: 0;
  width: min(36%, 340px);
  height: 41px;
  color: var(--folder-front);
}

.closing-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
  padding: var(--pad);
  color: var(--on-front);
  background: var(--folder-front);
  border-radius: 0 24px 24px;
}

.closing-panel p {
  margin-top: 14px;
  color: var(--on-front-muted);
}

.closing-panel .note {
  color: var(--on-front-muted);
}

.closing-panel input[type="email"] {
  color: #0c2744;
  background: #ffffff;
  border-color: #0c2744;
}

.closing-panel input::placeholder {
  color: #47607a;
}

.closing-panel button {
  color: #ffffff;
  background: #0c2744;
}

.closing-panel button:hover {
  background: #173f68;
}

/* Footer */

.foot {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 32px;
  margin-block: clamp(40px, 5vw, 64px) 32px;
  color: var(--muted);
  font-size: 1rem;
}

.foot nav {
  display: flex;
  gap: 24px;
  justify-content: end;
}

.foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
}

.foot strong {
  align-self: center;
  color: var(--ink);
  font-weight: 600;
}

.foot small {
  grid-column: 1 / -1;
  font-size: 0.875rem;
}

/* Short pages: privacy, contact, thanks, not found */

.page {
  padding-block: clamp(32px, 6vw, 72px) var(--section);
}

.page > * {
  max-width: 720px;
}

.page h1 {
  margin-bottom: 20px;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.page h2 {
  margin: 40px 0 10px;
  font-size: 1.5rem;
  letter-spacing: -0.016em;
}

.page p + p {
  margin-top: 12px;
}

.page ul {
  margin: 12px 0;
  padding-left: 1.2em;
}

.page li + li {
  margin-top: 8px;
}

.page form > * + * {
  margin-top: 16px;
}

.updated {
  color: var(--muted);
  font-size: 1rem;
}

/* Narrow windows: one column, with the picture after the words */

@media (max-width: 900px) {
  .hero-copy,
  .feature,
  .tree-row,
  .archive-row,
  .pair,
  .more-list,
  .band-grid,
  .closing-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .tree-row .tree-shot,
  .archive-row .archive-shot {
    order: 2;
  }

  .folder-front .feature {
    gap: 8px;
  }
}

/* The links would run into the app's name; the footer keeps Docs within reach. */
@media (max-width: 760px) {
  .bar nav {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1.0625rem;
  }

  .field {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .folder {
    width: 100%;
    padding-top: 56px;
  }

  .folder-tab {
    top: 8px;
    width: 62%;
    height: 49px;
  }

  .folder-back {
    inset: 56px 0 64px;
    border-radius: 0;
  }

  /* The window keeps its left part at a readable size and runs off the edge of the screen. */
  .window {
    width: calc(100% - var(--gutter));
    margin-left: var(--gutter);
    margin-right: 0;
    border-radius: 20px 0 0 20px;
  }

  .window img {
    border-radius: 20px 0 0 20px;
  }

  .folder-front {
    margin-inline: 0;
    margin-top: -24%;
    border-radius: 20px 20px 0 0;
  }

  .folder-front::before {
    inset: 10px 20px auto;
  }

  .editions-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .edition,
  .edition:first-child,
  .edition + .edition {
    padding-inline: 0;
    border-left: 0;
  }

  .edition + .edition {
    border-top: 1px solid var(--rule);
  }

  .closing {
    width: 100%;
  }

  .closing-panel {
    border-radius: 0;
  }

  .foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot nav {
    justify-content: start;
  }
}
