/* Good Name Domains: shared styles for every page (catalog, name pages, 404).
 Page-specific styles stay inside each page. */

@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Syne"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/syne-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Bebas Neue"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/bebas-neue-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Shrikhand"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/shrikhand-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }

:root {
  --black: #000000;
  --white: #FFFFFF;
  --green: #12B76A;
  --green-hover: #0FA25D;
  --mist: #F4F4F6;
  --graphite: #6E6E78;
  --body: #4A4A55;
  --line: #ECECEF;
  --wrap: 1200px;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* Wordmark */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
  color: var(--black);
}
.brand-word { font-weight: 700; font-size: 30px; letter-spacing: -0.055em; line-height: 1; }
.brand-dot { color: var(--green); }
.brand-sub { font-weight: 500; font-size: 15px; color: var(--graphite); }

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 16px;
  font-weight: 500;
}
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 12px;
  background: var(--black);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease;
}
.button:hover { background: #2A2A30; }

.button-green { background: var(--green); color: var(--black); }
.button-green:hover { background: var(--green-hover); }

.button-quiet { background: var(--mist); color: var(--black); }
.button-quiet:hover { background: #E7E7EB; }

.button-sm { min-height: 44px; padding: 0 18px; border-radius: 10px; font-size: 15px; }

.text-link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* Tiles */
.tile {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  scroll-margin-top: 24px;
}

.tile.is-target { box-shadow: 0 0 0 3px var(--green); border-color: transparent; }

.tile-art {
  position: relative;
  height: 210px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}

.tile-logo { display: block; line-height: 1; white-space: nowrap; }

.tile-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
}

.tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tile-name { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.tile-price { font-weight: 700; font-size: 19px; white-space: nowrap; }
.tile-price.is-offer { font-weight: 500; font-size: 16px; color: var(--graphite); }
.tile-cat { margin-top: -8px; font-size: 14px; color: var(--graphite); }
.tile-note { margin: 0; flex: 1; font-size: 15px; line-height: 1.5; color: var(--body); }

.tile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 4px; }
.tile-actions .text-link { font-size: 15px; }

/* Sections */
.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--line); }

.section h2 {
  margin: 0 0 36px;
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 700;
}

/* Steps */
.steps h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.02em; font-weight: 700; }
.steps p { margin: 0; color: var(--body); }
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  font-size: 19px;
}

/* Contact */
.contact { background: var(--black); color: var(--white); }
.section.contact { border-top: 0; }
.contact h2 { color: var(--white); margin-bottom: 14px; }
.contact p { margin: 0 0 30px; max-width: 36em; color: #C4C4CC; font-size: 20px; }
.contact-mail {
  font-weight: 700;
  font-size: clamp(28px, 4.6vw, 58px);
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 9px;
  text-decoration-color: var(--green);
  overflow-wrap: anywhere;
}
.contact :focus-visible { outline-color: var(--green); }

.site-footer { background: var(--black); color: #9A9AA4; font-size: 15px; }
.site-footer .wrap { padding-bottom: 34px; }
.site-footer .footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.site-footer .brand { color: var(--white); }
.site-footer .brand-word { font-size: 22px; }
.site-footer p { margin: 0; }

/* Responsive */
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .wrap { padding: 0 20px; }
  .site-nav .nav-mail, .site-nav .nav-how { display: none; }
  .section { padding: 68px 0; }
  .tile-art { height: 180px; }
  .contact-mail { font-size: 5.6vw; text-decoration-thickness: 3px; text-underline-offset: 6px; }
}

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

/* Names link to their own page */
a.tile-art { text-decoration: none; }
a.tile-name { text-decoration: none; }
a.tile-name:hover { text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Price with a monthly plan under it */
.tile-price-box { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.tile-plan { font-size: 13px; font-weight: 500; color: var(--graphite); white-space: nowrap; }

/* Make an offer form */
html:has(dialog.offer[open]) { overflow: hidden; }

.offer {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--white);
  color: var(--black);
  box-shadow: 0 24px 64px -24px rgba(0, 0, 0, .45);
}
.offer::backdrop { background: rgba(0, 0, 0, .5); }
.offer-form { padding: 28px 28px 24px; }

.offer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.offer-title { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; overflow-wrap: anywhere; }
.offer-title:focus { outline: none; }
.offer-close {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: -4px -6px 0 0;
  border: 0;
  border-radius: 10px;
  background: var(--mist);
  color: var(--black);
  cursor: pointer;
}
.offer-close:hover { background: #E7E7EB; }
.offer-hint { margin: 8px 0 22px; font-size: 16px; color: var(--body); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-label { font-size: 15px; font-weight: 600; }
.field-label em { font-style: normal; font-weight: 400; color: var(--graphite); }
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--mist);
  color: var(--black);
  font: inherit;
  font-size: 16px;
}
.field textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.field textarea::placeholder { color: #85858F; }
.field input:focus-visible,
.field textarea:focus-visible { outline: 3px solid var(--green); outline-offset: 1px; border-color: transparent; }
.field.is-invalid input { border-color: #D92D20; background: #FEF3F2; }
.field-msg { font-size: 14px; color: #B42318; }
.field-msg:empty { display: none; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }

.money-input { position: relative; display: block; }
.money-input > span { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); font-weight: 600; color: var(--graphite); pointer-events: none; }
.money-input input { padding-left: 30px; font-weight: 600; }

.offer-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.offer-error { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: #FEF3F2; color: #B42318; font-size: 15px; }
.offer-error .text-link { color: #B42318; text-decoration-color: currentColor; }
.offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 6px; }
.offer-actions .button[disabled] { opacity: .6; cursor: default; }
.offer-note { font-size: 15px; color: var(--graphite); }
.offer-privacy { margin: 18px 0 0; font-size: 13px; color: var(--graphite); }

@media (max-width: 560px) {
  .offer-form { padding: 22px 20px 20px; }
  .offer-title { font-size: 22px; }
  .field-row { grid-template-columns: 1fr; }
}
