/* Tanio
   Forest #10291E · Ivory #F5F3ED · Sage #A6AD98 · Charcoal #292D29 · Lime #C6D56A */

:root {
  --forest: #10291e;
  --ivory: #f5f3ed;
  --sage: #a6ad98;
  --charcoal: #292d29;
  --lime: #c6d56a;
  --display: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Inter", "Helvetica Neue", "Segoe UI", sans-serif;
  --rule: color-mix(in srgb, var(--sage) 72%, var(--forest));
  --measure: min(68rem, calc(100% - 2 * max(clamp(1.25rem, 5vw, 3.5rem), env(safe-area-inset-left))));
}

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

* {
  margin: 0;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 55% at 100% 0%, color-mix(in srgb, var(--sage) 35%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, color-mix(in srgb, var(--lime) 18%, transparent), transparent 50%),
    var(--ivory);
  color: var(--charcoal);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

a {
  color: inherit;
}

::selection {
  background: var(--lime);
  color: var(--forest);
}

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

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

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

  .button span,
  .code-caret {
    transition: none;
    animation: none;
  }
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 5;
  background: var(--forest);
  color: var(--ivory);
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: var(--measure);
  margin-inline: auto;
}

.brand-bar {
  height: 4px;
  background: var(--forest);
  flex: none;
}

.site-header {
  border-bottom: 1px solid var(--rule);
  flex: none;
}

.header-inner {
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.65rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--forest);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
}

.wordmark-mark {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--lime);
  flex: none;
}

.header-side {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-label {
  color: var(--charcoal);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.header-link {
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--lime);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: 0.15rem;
}

.header-link:hover {
  background: var(--lime);
}

h1,
h2,
h3 {
  color: var(--forest);
  font-family: var(--display);
  font-weight: 700;
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: clamp(2rem, 5vw, 3.5rem);
  min-height: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  width: var(--measure);
}

.hero-copy {
  max-width: 28rem;
}

.hero h1,
.missing h1 {
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.lead {
  margin-top: 1rem;
  max-width: 22rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--charcoal) 88%, var(--sage));
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 48px;
  margin-top: 1.5rem;
  padding: 0.85rem 1.1rem;
  background: var(--forest);
  color: var(--ivory);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
}

.button span {
  transition: transform 160ms ease;
}

.button:hover {
  background: var(--lime);
  color: var(--forest);
}

.button:hover span {
  transform: translateX(4px);
}

.code-panel {
  min-width: 0;
  align-self: stretch;
}

.code-block {
  margin: 0;
  box-sizing: border-box;
  height: 19rem;
  padding: 1.35rem 1.4rem;
  background: var(--forest);
  color: color-mix(in srgb, var(--ivory) 92%, var(--sage));
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.65;
  white-space: pre;
  overflow: hidden;
}

.code-block code {
  font-family: inherit;
}

.code-caret {
  display: inline-block;
  width: 0.55ch;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--lime);
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.practice {
  flex: none;
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
}

.services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.service {
  min-width: 0;
  padding: 1rem 2rem 1.25rem;
  border-right: 1px solid var(--rule);
}

.service:last-child {
  border-right: 0;
  padding-right: 0;
}

.service:first-child {
  padding-left: 0;
}

.service-accent h3 {
  color: color-mix(in srgb, var(--forest) 82%, #5a6b20);
}

.service h3 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.service p {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--charcoal) 80%, var(--sage));
}

.contact {
  flex: none;
  padding-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  padding: clamp(1.15rem, 2.5vw, 1.6rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--forest);
  color: var(--ivory);
}

.contact :focus-visible {
  outline-color: var(--lime);
}

.contact h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ivory);
}

.contact-copy {
  display: flex;
  justify-content: flex-end;
}

.contact .button {
  margin-top: 0;
}

.button-on-dark {
  background: var(--lime);
  color: var(--forest);
}

.button-on-dark:hover {
  background: var(--ivory);
  color: var(--forest);
}

.site-footer {
  border-top: 1px solid var(--rule);
  flex: none;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.85rem 1rem;
  color: var(--charcoal);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-inner a {
  color: var(--forest);
  text-decoration-color: var(--lime);
  text-underline-offset: 0.28em;
}

.footer-inner a:hover {
  background: var(--lime);
  text-decoration: none;
}

.missing {
  padding-block: clamp(4rem, 10vw, 7rem);
}

.missing .label {
  margin-bottom: 0.9rem;
  color: var(--charcoal);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Desktop: lock to one screen, no page scroll */
@media (min-width: 900px) {
  html,
  body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  body {
    min-height: 100dvh;
  }
}

@media (max-width: 899px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .code-panel {
    max-width: 22rem;
  }

  .code-block {
    height: 7.25rem;
    padding: 0.95rem 1.05rem;
    font-size: 0.8rem;
    line-height: 1.55;
  }

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

  .service {
    border-right: 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
  }

  .service:nth-child(odd) {
    padding-right: 1.75rem;
  }

  .service:nth-child(even) {
    padding-left: 1.75rem;
    border-left: 1px solid var(--rule);
  }

  .service:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }

  .contact-copy {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-label {
    display: none;
  }

  .button {
    width: 100%;
  }

  .code-panel {
    max-width: none;
  }

  .code-block {
    height: 6.75rem;
    padding: 0.85rem 1rem;
    font-size: 0.78rem;
  }

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

  .service:nth-child(odd),
  .service:nth-child(even) {
    padding-inline: 0;
    border-left: 0;
  }

  .service {
    border-bottom: 1px solid var(--rule);
  }

  .service:last-child {
    border-bottom: 0;
  }
}
