/* Rimu website. Colours are the app's "Rimu Light" theme (Figma "Rimu color",
   mode Rimu Light); layout follows the Figma page "Website". */

:root {
  --bg: #ffffff;
  --wash-top: #e4efd6;
  --wash-mid: #f3f8ec;
  --text-primary: #1a240c;
  --text-secondary: #546440;
  --text-tertiary: #899778;
  --text-accent: #34690f;
  --text-on-accent: #ffffff;
  --accent: #3f7f1b;
  --accent-hover: #37701a;
  --accent-soft: #dbe7d4;
  --border-subtle: #dde5d5;
  --border-strong: #c3cfb7;
  /* Where the green wash at the top of the page ends. */
  --wash-end: 360px;
  --page-pad: 64px;
  --content: 1152px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image: linear-gradient(
    to bottom,
    var(--wash-top) 0,
    var(--wash-mid) var(--wash-end),
    rgba(255, 255, 255, 0) calc(var(--wash-end) + 220px)
  );
  background-repeat: no-repeat;
}

body.home {
  --wash-end: 974px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

/* Navigation */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--page-pad);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
}

.nav-links {
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--text-secondary);
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--text-primary);
}

.nav-links a[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

/* Home: hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 72px var(--page-pad) 0;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: 72px;
  font-weight: 700;
  line-height: 80px;
  letter-spacing: -0.025em;
}

.hero .subhead {
  margin: 0;
  font-size: 21px;
  line-height: 32px;
  color: var(--text-secondary);
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
}

.button {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

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

.cta-caption {
  margin: 0;
  font-size: 13px;
  line-height: 16px;
  color: var(--text-tertiary);
}

.window-crop {
  width: 100%;
  max-width: var(--content);
  /* Room for the window's shadow. */
  padding: 0 0 8px;
}

.app-window {
  width: 100%;
  margin-top: 48px;
  border-radius: 12px;
  outline: 1px solid var(--border-strong);
  box-shadow:
    0 24px 64px -8px rgba(20, 31, 5, 0.16),
    0 4px 12px rgba(20, 31, 5, 0.08);
}

/* Home: the four features */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  max-width: calc(var(--content) + 2 * var(--page-pad));
  margin: 0 auto;
  padding: 120px var(--page-pad);
}

.feature img {
  width: 24px;
  height: 24px;
  margin-bottom: 16px;
}

.feature h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.feature p {
  margin: 0;
  font-size: 15px;
  line-height: 23px;
  color: var(--text-secondary);
}

/* Features page */

.page-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 72px var(--page-pad) 24px;
  text-align: center;
}

.page-heading h1 {
  margin: 0;
  font-size: 56px;
  font-weight: 700;
  line-height: 64px;
  letter-spacing: -0.025em;
}

.page-heading p {
  margin: 0;
  font-size: 20px;
  line-height: 30px;
  color: var(--text-secondary);
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 96px;
  max-width: calc(var(--content) + 2 * var(--page-pad));
  margin: 0 auto;
  padding: 64px var(--page-pad) 120px;
}

.row {
  display: flex;
  align-items: center;
  gap: 72px;
}

.row:nth-child(even) {
  flex-direction: row-reverse;
}

.row-text {
  flex: 1;
  min-width: 0;
}

.row img {
  flex: none;
  width: 680px;
  border-radius: 16px;
}

.kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-accent);
}

.row h2,
.more h2 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -0.015em;
}

.row p {
  margin: 0;
  font-size: 17px;
  line-height: 27px;
  color: var(--text-secondary);
}

.more {
  max-width: calc(var(--content) + 2 * var(--page-pad));
  margin: 0 auto;
  padding: 0 var(--page-pad) 120px;
}

.more h2 {
  margin-bottom: 32px;
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.more-grid h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.more-grid p {
  margin: 0;
  font-size: 15px;
  line-height: 23px;
  color: var(--text-secondary);
}

/* Privacy and Terms */

.article {
  max-width: calc(680px + 2 * var(--page-pad));
  margin: 0 auto;
  padding: 72px var(--page-pad) 120px;
}

.article h1 {
  margin: 0 0 12px;
  font-size: 48px;
  font-weight: 700;
  line-height: 56px;
  letter-spacing: -0.02em;
}

.updated {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
  color: var(--text-tertiary);
}

.summary {
  margin: 40px 0 0;
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
}

.article section {
  margin-top: 40px;
}

.article h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}

.article p,
.article li {
  font-size: 16px;
  line-height: 26px;
  color: var(--text-secondary);
}

.article p {
  margin: 0 0 12px;
}

.article ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.article li {
  margin-bottom: 8px;
}

.article section > :last-child {
  margin-bottom: 0;
}

.article a {
  color: var(--text-accent);
}

.article a:hover {
  text-decoration: underline;
}

/* Footer */

.footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px var(--page-pad) 36px;
  border-top: 1px solid var(--border-subtle);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copyright {
  margin: 0;
  font-size: 13px;
  line-height: 16px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 16px;
  color: var(--text-secondary);
}

.limited-use {
  max-width: 900px;
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-tertiary);
}

/* Tablet: the feature rows stack before the columns get too narrow. */

@media (max-width: 1100px) {
  .row,
  .row:nth-child(even) {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .row img {
    width: 100%;
    max-width: 680px;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Phone (Figma "Home — Mobile", 390 wide). */

@media (max-width: 640px) {
  :root {
    --page-pad: 24px;
    --wash-end: 260px;
  }

  body.home {
    --wash-end: 640px;
  }

  .nav {
    padding: 16px var(--page-pad);
  }

  .brand {
    gap: 8px;
    font-size: 17px;
  }

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

  .nav-links {
    gap: 20px;
  }

  /* The phone nav keeps one link; the rest are in the footer. */
  .nav-links li:not(.nav-primary) {
    display: none;
  }

  .hero {
    gap: 18px;
    padding-top: 40px;
  }

  .hero-icon {
    width: 72px;
    height: 72px;
  }

  .hero h1 {
    font-size: 44px;
    line-height: 50px;
  }

  .hero .subhead {
    font-size: 17px;
    line-height: 26px;
  }

  .hero .subhead br {
    display: none;
  }

  .cta {
    align-self: stretch;
    padding-top: 0;
  }

  .button {
    align-self: stretch;
    text-align: center;
  }

  /* The window bleeds off the right edge, cropped, as in the mock. */
  .window-crop {
    align-self: flex-start;
    width: calc(100% + var(--page-pad));
    max-width: none;
    height: 430px;
    margin: 22px calc(-1 * var(--page-pad)) 0 0;
    padding: 0;
    overflow: hidden;
  }

  .app-window {
    width: 893px;
    max-width: none;
    margin-top: 18px;
    border-radius: 8px;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 48px var(--page-pad) 64px;
    border-top: 1px solid var(--border-subtle);
  }

  .feature img {
    margin-bottom: 12px;
  }

  .page-heading {
    padding-top: 40px;
  }

  .page-heading h1,
  .article h1 {
    font-size: 40px;
    line-height: 46px;
  }

  .page-heading p {
    font-size: 17px;
    line-height: 26px;
  }

  .rows {
    gap: 56px;
    padding: 40px var(--page-pad) 72px;
  }

  .row h2,
  .more h2 {
    font-size: 26px;
    line-height: 32px;
  }

  .more {
    padding-bottom: 72px;
  }

  .more-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .article {
    padding: 40px var(--page-pad) 72px;
  }

  .footer {
    padding: 24px var(--page-pad) 32px;
  }

  .footer-row {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-links {
    gap: 24px;
    font-size: 14px;
  }

  /* On a phone the order is links, the Google line, then the copyright. */
  .footer {
    display: grid;
  }

  .footer-row {
    display: contents;
  }

  .footer-links {
    order: 1;
  }

  .limited-use {
    order: 2;
  }

  .copyright {
    order: 3;
  }
}
