/* Gavrish Services — static homepage. System fonts only. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-band: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --btn-bg: #0071e3;
  --btn-bg-hover: #0077ed;
  --btn-text: #ffffff;
  --bar-bg: rgba(255, 255, 255, 0.72);
  --bar-border: rgba(0, 0, 0, 0.08);
  --tile-bg: #ffffff;
  --tile-border: rgba(0, 0, 0, 0.06);
  --tile-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --focus: #0071e3;
  --bar-h: 48px;
  --wrap: 1060px;
  --pad: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-band: #000000;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --accent: #2997ff;
    --accent-hover: #54a9ff;
    --btn-bg: #0071e3;
    --btn-bg-hover: #147ce5;
    --btn-text: #ffffff;
    --bar-bg: rgba(22, 22, 23, 0.72);
    --bar-border: rgba(255, 255, 255, 0.14);
    --tile-bg: #1d1d1f;
    --tile-border: rgba(255, 255, 255, 0.08);
    --tile-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --focus: #2997ff;
  }
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus {
  outline: none;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
}

.skip:focus-visible {
  top: 8px;
}

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

/* Thin translucent top bar */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--bar-h);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--bar-border);
}

.bar {
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.7;
}

.topbar nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar nav a {
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-decoration: none;
  opacity: 0.85;
}

.topbar nav a:hover {
  opacity: 1;
  text-decoration: none;
}

/* Hero */
.hero {
  padding: calc(var(--bar-h) + 96px) 0 80px;
  text-align: center;
  background: var(--bg);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.lede {
  margin: 16px 0 0;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--muted);
}

.not-found {
  padding-bottom: 160px;
}

.not-found .btn {
  margin-top: 32px;
}

/* Sections */
.band {
  padding: 92px 0;
  text-align: center;
  background: var(--bg-band);
}

#products.band {
  padding-top: 56px;
}

.band h2 {
  margin: 0 0 36px;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.quiet {
  margin: 0 auto;
  max-width: 28rem;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.about-link {
  margin: 18px 0 0;
  font-size: 17px;
}

.contact-address {
  margin-bottom: 0;
}

.contact-action {
  margin: 28px 0 0;
}

/* Product tile */
.tile {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 44px 36px 40px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: 28px;
  box-shadow: var(--tile-shadow);
  text-align: center;
}

/* Service tiles: equal cards in a row, stack on small screens */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.tiles .tile {
  width: auto;
  margin: 0;
  padding: 36px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.tiles .tile h3 {
  font-size: 21px;
  max-width: 14em;
}

.tiles .tile p {
  margin: 10px 0 0;
  max-width: 18em;
}

@media (max-width: 800px) {
  .tiles {
    grid-template-columns: 1fr;
    width: min(520px, 100%);
    margin: 0 auto;
  }

  .tiles .tile h3,
  .tiles .tile p {
    max-width: none;
  }
}

.tile-icon {
  width: 128px;
  height: 128px;
  margin: 0 auto 20px;
}

.tile h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tile p {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.4;
}

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 980px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
}

.btn:hover {
  background: var(--btn-bg-hover);
  text-decoration: none;
}

.btn:focus-visible {
  outline-offset: 3px;
}

/* Footer */
.footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--bar-border);
  background: var(--bg-band);
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 0 0 14px;
}

.footer-links a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

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

.footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}

/* Legal pages */
.legal {
  padding: calc(var(--bar-h) + 80px) 0 96px;
  background: var(--bg);
}

.legal .wrap {
  width: min(720px, 100% - (var(--pad) * 2));
}

.legal h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.legal .updated {
  margin: 12px 0 2rem;
  color: var(--muted);
  font-size: 15px;
}

.legal h2 {
  margin: 2.25rem 0 0.7rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.legal p,
.legal li {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
}

.legal p {
  margin: 0 0 1rem;
}

.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.25em;
}

.legal li {
  margin: 0 0 0.4rem;
}

.legal a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal code {
  font-size: 0.92em;
}

/* Phone width */
@media (max-width: 640px) {
  :root {
    --pad: 20px;
    --bar-h: 52px;
  }

  .bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
  }

  .topbar {
    height: auto;
    min-height: var(--bar-h);
  }

  .bar {
    height: auto;
    padding: 10px 0 12px;
  }

  .hero {
    padding: calc(84px + 72px) 0 80px;
  }

  .band {
    padding: 72px 0;
  }

  #products.band {
    padding-top: 64px;
  }

  .band h2 {
    margin-bottom: 28px;
  }

  .tile {
    padding: 36px 24px 32px;
    border-radius: 22px;
  }

  .quiet {
    font-size: 19px;
  }

  .legal {
    padding: calc(84px + 48px) 0 72px;
  }
}
