/* PTAH LLC — ptahworks.com
   Display: Piazzolla (opsz 30, variable weight 300–700), Latin + Cyrillic
   Text:    Golos Text (variable weight 400–700), Latin + Cyrillic
   Both SIL OFL, self-hosted. */

@font-face {
  font-family: "Piazzolla";
  src: url("/assets/fonts/Piazzolla.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Golos Text";
  src: url("/assets/fonts/GolosText.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #0c1a3c;          /* deep navy derived from the brand blue */
  --ink-2: #4d5a78;
  --lapis: #1a3b7e;        /* brand blue — the cap of Ptah */
  --lapis-pale: #e9edf6;
  --placeholder: #e6e9f0;

  --display: "Piazzolla", "Times New Roman", Georgia, serif;
  --text: "Golos Text", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 72ch;
  --page-max: 1120px;
  --pad: clamp(20px, 6vw, 96px);
  --gap: 160px;
  --gap-band: 112px;
}

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

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--lapis);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

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

/* Skip link */
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  z-index: 10;
}
.skip:focus { top: 16px; }

/* Container */
.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--lapis);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.wordmark img { height: 44px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a {
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.site-nav .lang { color: var(--ink-2); }

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.hero .hero-body {
  width: 100%;
  margin-top: auto;
  padding-bottom: clamp(56px, 12vh, 140px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.hero-text { min-width: 0; }
.hero-mark {
  flex: 0 0 auto;
  height: clamp(200px, 32vh, 300px);
  width: auto;
  margin-bottom: 6px;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 420;
  font-size: clamp(72px, 12vw, 176px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  color: var(--lapis);
}
.hero h1 .w {
  display: inline-block;
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero h1 .w2 { animation-delay: 0.12s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 .w { animation: none; }
  html { scroll-behavior: auto; }
}
.hero .lead {
  font-size: 24px;
  line-height: 1.35;
  max-width: 34ch;
  margin: 0 0 16px;
}
.hero .sub {
  color: var(--ink-2);
  max-width: var(--measure);
  margin: 0;
}

/* Sections */
.section { padding-top: var(--gap); }
.section h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
  color: var(--lapis);
}
.section p { max-width: var(--measure); margin: 0; }
.section p + p { margin-top: 1.2em; }
.section h3 {
  font-family: var(--text);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 12px;
}
.note {
  color: var(--ink-2);
  font-size: 16px;
}

/* Principles: bold run-in heads, plain paragraphs */
.principles p + p { margin-top: 1.4em; }
.principles strong { font-weight: 600; }

/* Statement — one display line closing "What we do" */
.section .statement {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--lapis);
  max-width: 18ch;
  margin-top: 56px;
}

/* Bands */
.band { margin-top: var(--gap); padding-top: var(--gap-band); padding-bottom: var(--gap-band); }
.band .section { padding-top: 0; }
.band-dark { background: var(--lapis); color: var(--paper); }
.band-dark .section h2 { color: var(--paper); }
.band-dark a { color: var(--paper); }
.band-dark :focus-visible { outline-color: var(--paper); }
.band-pale { background: var(--lapis-pale); }

/* Principles inside the dark band */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 48px;
  row-gap: 40px;
  margin-top: 8px;
}
.principle h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin: 0 0 14px;
}
.principle p { color: #d9e0f2; max-width: none; }

/* Product */
.product {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 40px;
  align-items: start;
}
.product-side { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: var(--placeholder);
  overflow: hidden;
}
.app-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--lapis);
  border: 1px solid var(--lapis);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  white-space: nowrap;
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lapis); }
.product-text h3 { font-size: 24px; margin-bottom: 14px; }
.section .product-lead { font-size: 21px; line-height: 1.4; margin-bottom: 1em; }
.section .closing { margin-top: 56px; }

/* Contact inside the pale band */
.section .contact-mail {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  max-width: none;
  overflow-wrap: anywhere;
}
.contact-mail a { color: var(--lapis); text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.contact-mail a:hover { text-decoration-thickness: 3px; }

/* Footer */
.site-footer {
  padding-top: 96px;
  padding-bottom: 48px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}
.site-footer p { margin: 0; max-width: var(--measure); }
.footer-mark { height: 32px; width: auto; display: block; margin-bottom: 20px; }
.site-footer .links { margin: 12px 0 20px; display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer .links a { color: var(--ink); text-decoration: none; }
.site-footer .links a:hover { text-decoration: underline; }
.site-footer .legal-line { color: var(--ink-2); }
.site-footer .legal-line a { color: var(--ink-2); }

/* Article pages (privacy, 404) */
.article { padding-top: 48px; padding-bottom: 48px; }
.article h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--lapis);
}
.article .meta { color: var(--ink-2); margin: 0 0 40px; }
.article p { max-width: var(--measure); margin: 0; }
.article p + p { margin-top: 1.2em; }
.article strong { font-weight: 600; }
.article-short { min-height: 60vh; }

/* Responsive */
@media (max-width: 960px) {
  .principles-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  :root { --gap: 96px; --gap-band: 72px; }
  body { font-size: 17px; }
  .section h2, .article h1 { font-size: 32px; margin-bottom: 24px; }
  .hero .lead { font-size: 21px; }
  .hero h1 { margin-bottom: 24px; }
  .wordmark { font-size: 24px; gap: 10px; }
  .wordmark img { height: 36px; }
  .hero .hero-body { flex-direction: column; align-items: flex-start; gap: 0; }
  .hero-mark { order: -1; height: 120px; margin: 0 0 36px; }
  .site-nav { gap: 18px; }
  .site-nav a { font-size: 15px; }
  .product { grid-template-columns: 1fr; gap: 24px; }
  .product-side { flex-direction: row; align-items: center; }
  .principles-grid { grid-template-columns: 1fr; row-gap: 32px; }
  .principle h3 { font-size: 24px; }
  .section .statement { margin-top: 40px; }
  .section .product-lead { font-size: 19px; }
}

@media (max-width: 480px) {
  /* Keep only the mark in the header; the name stays in the aria-label */
  .wordmark { font-size: 0; gap: 0; }
}
