/* Watery Apps: the home, support and 404 pages. Each app's own page brings its own look. */

:root {
  --paper: #f2f6f6;
  --raised: #ffffff;
  --ink: #0f2a31;
  --ink-soft: #4c6870;
  --line: #d3e0e2;
  --tide: #17717d;
  --focus: #17717d;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1a1e;
    --raised: #12252a;
    --ink: #e4eff0;
    --ink-soft: #9bb3b8;
    --line: #22383d;
    --tide: #5cc0cc;
    --focus: #5cc0cc;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0c1a1e;
  --raised: #12252a;
  --ink: #e4eff0;
  --ink-soft: #9bb3b8;
  --line: #22383d;
  --tide: #5cc0cc;
  --focus: #5cc0cc;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

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

.wrap {
  width: min(880px, 100% - 32px);
  margin-inline: auto;
}

/* Header and footer */

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

.site-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 22px;
  font-weight: 500;
}

.site-header nav a {
  text-decoration: none;
  color: var(--ink-soft);
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 96px;
  padding-block: 28px 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0;
}

/* Home */

.intro {
  padding-top: clamp(40px, 9vw, 96px);
}

.intro h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 6.25rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.intro p {
  max-width: 34ch;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 2.4vw, 1.3125rem);
  line-height: 1.45;
}

/* The one watery thing: a line that ripples once, like a surface settling. */
.waterline {
  display: block;
  width: 100%;
  height: 28px;
  margin-top: clamp(36px, 7vw, 64px);
  color: var(--tide);
  overflow: visible;
}

.waterline path {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .waterline path {
    animation: settle 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
  }

  @keyframes settle {
    from {
      stroke-dashoffset: 1;
    }
  }
}

.apps {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.app {
  border-bottom: 1px solid var(--line);
}

.app a {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 4px 20px;
  padding-block: 26px;
  text-decoration: none;
}

.app img {
  grid-row: 1 / span 3;
  align-self: start;
  width: 72px;
  height: 72px;
  border-radius: 17px;
  box-shadow: 0 0 0 1px var(--line);
}

.app h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.app p {
  margin: 0;
  color: var(--ink-soft);
}

.app .status {
  display: block;
  grid-column: 2;
  margin-top: 4px;
  color: var(--tide);
  font-size: 0.9375rem;
  font-weight: 600;
}

.app a:hover h2 {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

@media (min-width: 640px) {
  .app a {
    grid-template-columns: 88px 1fr auto;
    gap: 4px 28px;
  }

  .app img {
    grid-row: 1 / span 2;
    align-self: center;
    width: 88px;
    height: 88px;
    border-radius: 20px;
  }

  .app .status {
    grid-column: 3;
    grid-row: 1 / span 2;
    margin: 0;
    text-align: right;
  }
}

/* Support and simple pages */

.page-head {
  padding-top: clamp(32px, 7vw, 72px);
}

.page-head h1 {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.page-head p {
  max-width: 46ch;
  margin: 16px 0 0;
  color: var(--ink-soft);
}

.form {
  display: grid;
  gap: 20px;
  max-width: 560px;
  margin-top: 40px;
}

.form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--raised);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.form textarea {
  resize: vertical;
}

.form .note {
  margin: -6px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.form .note[hidden] {
  display: none;
}

.honeypot {
  position: absolute;
  left: -10000px;
}

.button {
  justify-self: start;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

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