/* RingSmith site. Colours come from the app's brand tokens (app/lib/core/theme/brand_tokens.dart). */

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #0c1527;
  --ink-muted: #4b5563;
  --paper: #ffffff;
  --mist: #f4f6f9;
  --line: #e3e7ee;
  --orange: #d93a06; /* links and buttons: white on it reads 4.6:1 */
  --orange-deep: #a8320a; /* orange text on the tint */
  --tint: #fff4ec;
  --signature: linear-gradient(135deg, #ffc044 0%, #ff781b 45%, #f9420b 80%, #f43a0a 100%);
  --display: "Outfit", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  --gutter: clamp(20px, 5vw, 48px);
  --page: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--body);
}

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

a {
  color: var(--orange);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--orange-deep);
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--paper);
  padding: 8px 12px;
}

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

/* Header and footer */

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

.site-header .logo img {
  height: 40px;
  width: auto;
}

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

.site-header nav a:hover {
  color: var(--orange);
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(64px, 10vw, 120px);
  color: var(--ink-muted);
  font-size: 15px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 28px;
  padding-bottom: 36px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.site-footer a:hover {
  color: var(--orange);
  text-decoration: underline;
}

/* Store badges: Apple's and Google's artwork, drawn at the same height. */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stores a {
  display: block;
  border-radius: 9px;
}

.stores img {
  height: 52px;
  width: auto;
}

/* Home: hero */

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  padding-top: clamp(24px, 6vw, 72px);
  padding-bottom: clamp(48px, 8vw, 104px);
}

.hero h1 {
  font-size: clamp(42px, 6.4vw, 76px);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.hero .lede {
  margin-top: 24px;
  max-width: 34em;
  font-size: clamp(18px, 1.6vw, 20px);
  color: var(--ink-muted);
}

.hero .stores {
  margin-top: 36px;
}

.hero .note {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink-muted);
}

/* The lock screen: a missed call becoming a booked job. The one moving thing on the site. */

.lock {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 40px;
  background: var(--ink);
  color: #fff;
  padding: 34px 18px 22px;
  min-height: 560px;
  max-width: 420px;
  width: 100%;
  justify-self: end;
  box-shadow: 0 40px 80px -40px rgba(12, 21, 39, 0.55);
}

.lock::before {
  /* The icon's orange, low in the frame like light from below. */
  content: "";
  position: absolute;
  inset: auto -30% -45% -30%;
  height: 80%;
  background: var(--signature);
  filter: blur(60px);
  opacity: 0.55;
  z-index: -1;
}

.lock .clock {
  text-align: center;
  font-family: var(--display);
}

.lock .clock .day {
  font-size: 17px;
  font-weight: 500;
  opacity: 0.85;
}

.lock .clock time {
  display: block;
  font-size: 88px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.lock ol {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.alert {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 12px 14px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.4;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.alert .from {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}

.alert strong {
  display: block;
  font-weight: 600;
}

.alert .icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.alert .icon.phone {
  display: grid;
  place-items: center;
  background: #34c759;
}

.alert .icon.phone svg {
  width: 22px;
}

.alert.missed {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.alert.missed .from {
  color: rgba(255, 255, 255, 0.7);
}

.alert dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  margin: 8px 0 0;
}

.alert dt {
  color: var(--ink-muted);
}

.alert dd {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .lock .alert {
    animation: arrive 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .lock li:nth-child(1) .alert {
    animation-delay: 0.5s;
  }

  .lock li:nth-child(2) .alert {
    animation-delay: 1.9s;
  }

  .lock li:nth-child(3) .alert {
    animation-delay: 3.1s;
  }

  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(-14px) scale(0.97);
    }
  }
}

/* Home: what happens to a missed call */

.section {
  padding-top: clamp(56px, 8vw, 104px);
}

.section h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  max-width: 18em;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 2px solid var(--ink);
}

.steps li {
  counter-increment: step;
  padding: 26px 32px 0 0;
}

.steps li + li {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.steps li::before {
  content: counter(step);
  display: inline-block;
  padding-right: 0.08em;
  font-family: var(--display);
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 18px;
  background: var(--signature);
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.steps h3,
.features dt {
  font-size: 22px;
  letter-spacing: -0.01em;
}

.steps p,
.features dd {
  margin-top: 10px;
  color: var(--ink-muted);
}

/* Home: what it does */

.mist {
  background: var(--mist);
  margin-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(56px, 8vw, 104px);
}

.mist + .section {
  padding-top: clamp(48px, 7vw, 88px);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 48px;
  margin: 44px 0 0;
}

.features div {
  border-top: 1px solid #cfd5df;
  padding-top: 20px;
}

.features dt {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
}

.features dd {
  margin-left: 0;
}

/* Home: get the app */

.get {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px 40px;
}

.get > img {
  width: 128px;
  height: 128px;
}

.get p {
  max-width: 34em;
  margin-top: 10px;
  color: var(--ink-muted);
}

.get .stores {
  margin-top: 24px;
}

/* Text pages: support, privacy, terms, 404 */

.doc {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  padding-top: clamp(24px, 5vw, 56px);
}

.doc h1 {
  font-size: clamp(36px, 5vw, 52px);
  letter-spacing: -0.03em;
}

.doc .updated {
  margin-top: 12px;
  color: var(--ink-muted);
  font-size: 15px;
}

.doc .intro {
  margin-top: 24px;
  font-size: 19px;
}

.doc h2 {
  font-size: 26px;
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.doc h3 {
  font-size: 19px;
  margin-top: 30px;
  letter-spacing: -0.01em;
}

.doc p,
.doc ul,
.doc ol,
.doc table {
  margin-top: 14px;
}

.doc ul,
.doc ol {
  padding-left: 1.3em;
}

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

.doc .contents {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--mist);
  border-radius: 14px;
}

.doc .contents h2 {
  font-size: 17px;
  margin: 0;
  padding: 0;
  border: 0;
}

.doc .contents ol {
  margin: 10px 0 0;
  columns: 2 16em;
  column-gap: 32px;
}

.doc .contents li {
  break-inside: avoid;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}

.doc th {
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

.doc .contact {
  margin-top: 28px;
  padding: 20px 24px;
  border-radius: 14px;
  background: var(--tint);
}

.doc .contact p {
  margin: 0;
}

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

.doc details:first-of-type {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.doc summary {
  cursor: pointer;
  padding: 18px 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style-position: outside;
  margin-left: 1.1em;
}

.doc details > :not(summary) {
  margin-left: 1.1em;
}

.doc details > :last-child {
  margin-bottom: 20px;
}

/* Details still to fill in before launch (site/README.md). Loud on purpose. */

.todo {
  background: #fff176;
  color: var(--ink);
  outline: 2px dashed #b45309;
}

/* Narrow screens */

@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .lock {
    justify-self: center;
    min-height: 0;
  }

  .steps,
  .features {
    grid-template-columns: 1fr;
  }

  .steps li,
  .steps li + li {
    padding: 24px 0;
    border-left: 0;
  }

  .steps li + li {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .site-header .logo img {
    height: 34px;
  }

  .lock {
    border-radius: 32px;
    padding: 26px 12px 14px;
  }

  .lock .clock time {
    font-size: 72px;
  }

  .stores img {
    height: 46px;
  }

  .get {
    grid-template-columns: 1fr;
  }

  .get > img {
    width: 96px;
    height: 96px;
  }
}
