/*
 * Pafta marketing site (infra/site, served by Caddy on SITE_DOMAIN).
 * The colors are the role colors of packages/ui/src/theme.css: the brand is black and white only, the
 * single functional accent is the selection blue. Nothing is loaded from elsewhere (KVKK): the font and
 * every image come from this folder, and the page's CSP allows nothing else (no inline style or script).
 */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/InterVariable.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --border: #e6e6e6;
  --border-strong: #cfcfcf;
  --fg: #111111;
  --fg-muted: #6b6b6b;
  --inverse: #111111;
  --inverse-hover: #2e2e2e;
  --inverse-fg: #ffffff;
  --hover: rgb(0 0 0 / 0.05);
  --accent: #0d99ff;
  --accent-soft: #e5f4ff;
  --accent-fg: #007be5;
  --success-soft: #e3f7ec;
  --success-fg: #0b8a47;
  --shadow: 0 0 0 0.5px rgb(0 0 0 / 0.12), 0 8px 16px rgb(0 0 0 / 0.08), 0 24px 48px rgb(0 0 0 / 0.16);
  --font-sans: "Inter Variable", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1e1e;
    --bg-soft: #2c2c2c;
    --border: #3d3d3d;
    --border-strong: #555555;
    --fg: #f5f5f5;
    --fg-muted: #b3b3b3;
    --inverse: #ffffff;
    --inverse-hover: #e3e3e3;
    --inverse-fg: #111111;
    --hover: rgb(255 255 255 / 0.06);
    --accent-soft: rgb(13 153 255 / 0.2);
    --accent-fg: #5cbcff;
    --success-soft: rgb(20 174 92 / 0.2);
    --success-fg: #3fd184;
    --shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 8px 16px rgb(0 0 0 / 0.3), 0 24px 48px rgb(0 0 0 / 0.5);
  }
}

/* ------------------------------------------------------------------------------------------------ base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--accent-soft);
}

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

.container {
  width: min(100% - 40px, 1120px);
  margin-inline: auto;
}

/* terms that must not break at their hyphen or slash: e-PYS, EK-9, PDF/A */
.nw {
  white-space: nowrap;
}

.skip {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--inverse);
  color: var(--inverse-fg);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---------------------------------------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 4px;
}

.logo img {
  width: auto;
  height: 20px;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a,
.link {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--fg-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 120ms ease,
    background-color 120ms ease;
}

.nav a:hover,
.link:hover {
  background: var(--hover);
  color: var(--fg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }
}

@media (max-width: 400px) {
  .login {
    display: none;
  }
}

/* --------------------------------------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease;
}

.btn-primary {
  background: var(--inverse);
  color: var(--inverse-fg);
}

.btn-primary:hover {
  background: var(--inverse-hover);
}

.btn-secondary {
  border-color: var(--border-strong);
  color: var(--fg);
}

.btn-secondary:hover {
  background: var(--hover);
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* ------------------------------------------------------------------------------------------------ hero */

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

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

h1 {
  max-width: 18em;
  font-size: clamp(1.875rem, 1.1rem + 3vw, 3.25rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lead {
  max-width: 48rem;
  margin-top: 24px;
  color: var(--fg-muted);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  text-wrap: balance;
}

/* ------------------------------------------------------------------------------------ editor screenshot */

/* a real screenshot of the editor (e2e/site/ekran-goruntusu.spec.ts), light or dark with the page */
.shot {
  margin-top: clamp(48px, 7vw, 72px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.shot img {
  width: 100%;
  height: auto;
}

/* -------------------------------------------------------------------------------------------- sections */

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section-tight {
  padding-top: 0;
}

.section-head {
  max-width: 44rem;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

h2 {
  font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.375rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section-intro {
  margin-top: 16px;
  color: var(--fg-muted);
  font-size: 1.125rem;
  text-wrap: pretty;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* steps */

/* axonometric line drawings of the steps and features: ink lines, two tones for the side faces, hatch on
   the cut tops of walls; the tones mix the text colour into the page, so both themes work */
.ill {
  --ill-l: color-mix(in srgb, var(--fg) 7%, var(--bg));
  --ill-r: color-mix(in srgb, var(--fg) 17%, var(--bg));
  --ill-win: color-mix(in srgb, var(--fg) 32%, var(--bg));
  width: 100%;
  max-width: 360px;
  height: auto;
  margin-bottom: 24px;
  overflow: visible;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill-defs {
  position: absolute;
  overflow: hidden;
}

/* the faces of a volume: fills only, its edges are one path of their own (.e) */
.ill .ft {
  fill: var(--bg);
}

.ill .fl {
  fill: var(--ill-l);
}

.ill .fr {
  fill: var(--ill-r);
}

.ill .fh {
  fill: url(#ill-tarama);
}

.ill .fk {
  fill: var(--fg);
}

.ill .e,
.ill .ln,
.ill .dim,
.ill .gh,
.ill .c,
.ill .ax,
.ill .okmark {
  fill: none;
}

.ill .e,
.ill .top,
.ill .sr,
.ill .seal,
.ill .tagbox {
  stroke: var(--fg);
  stroke-width: 0.55;
}

.ill .top,
.ill .seal,
.ill .tagbox {
  fill: var(--bg);
}

.ill .sr {
  fill: var(--ill-r);
}

.ill .win {
  fill: var(--ill-win);
  stroke: var(--fg);
  stroke-width: 0.4;
}

.ill .ink {
  fill: var(--fg);
  stroke: none;
}

.ill .cur {
  fill: var(--fg);
  stroke: var(--bg);
  stroke-width: 1;
}

.ill .ln {
  stroke: var(--fg);
  stroke-width: 0.5;
}

.ill .dim {
  stroke: var(--fg);
  stroke-width: 0.45;
}

.ill .okmark {
  stroke: var(--fg);
  stroke-width: 0.95;
}

.ill .gh {
  stroke: var(--fg-muted);
  stroke-width: 0.5;
  stroke-dasharray: 3 2;
}

/* the hatch pattern lives in its own hidden svg (.ill-defs), not in a drawing */
.ill .c,
.ill-defs .tarama {
  stroke: var(--fg-muted);
  stroke-width: 0.4;
}

.ill .ax {
  stroke: var(--border-strong);
  stroke-width: 0.4;
}

.ill .tag,
.ill .tag-inv,
.ill .lbl {
  font-weight: 600;
  letter-spacing: 0.06em;
}

.ill .tag {
  fill: var(--fg);
  font-size: 7.5px;
}

.ill .tag-inv {
  fill: var(--bg);
  font-size: 7px;
}

.ill .lbl {
  fill: var(--fg-muted);
  font-size: 7px;
}

.item-body {
  padding-top: 20px;
  border-top: 1px solid var(--border-strong);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 56px;
}

.step-no {
  color: var(--fg-muted);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.step h3 {
  margin-top: 12px;
  font-size: 1.25rem;
}

.step p {
  margin-top: 8px;
  color: var(--fg-muted);
}

@media (max-width: 800px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* features */

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

.feature p {
  margin-top: 8px;
  color: var(--fg-muted);
}

@media (max-width: 960px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* timeline */

/* the date sits above its dot: a row of dates, the line with the dots, then the titles */
.timeline {
  --t-date: 21px;
  --t-dot: calc(var(--t-date) + 12px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: 56px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: calc(var(--t-dot) + 6px);
  right: 0;
  left: 0;
  height: 1px;
  background: var(--border-strong);
}

.timeline li {
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: var(--t-dot);
  left: 0;
  width: 13px;
  height: 13px;
  border: 2px solid var(--fg);
  border-radius: 50%;
  background: var(--bg);
}

.t-date {
  display: block;
  margin-bottom: 45px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: var(--t-date);
  font-variant-numeric: tabular-nums;
}

.t-text {
  margin-top: 6px;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

.source {
  margin-top: 40px;
  color: var(--fg-muted);
  font-size: 0.875rem;
}

@media (max-width: 860px) {
  .timeline {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .timeline::before {
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: 1px;
    height: auto;
  }

  /* one column: the dot on the line at the left, the date beside it */
  .timeline li {
    padding-left: 36px;
  }

  .timeline li::before {
    top: 4px;
  }

  .t-date {
    margin-bottom: 6px;
  }
}

/* questions */

.faq {
  max-width: 50rem;
  margin: 48px auto 0;
  border-top: 1px solid var(--border);
}

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

/* a block, not a flex row: a flex row would pull a question's words apart at every inline element in it */
.faq summary {
  position: relative;
  display: block;
  padding: 20px 40px 20px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* a plus that turns into a cross */
.faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  margin-top: -6px;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  transition: transform 160ms ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  max-width: 42rem;
  padding-bottom: 20px;
  color: var(--fg-muted);
}

.faq a {
  color: var(--fg);
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

.faq a:hover {
  text-decoration-color: currentColor;
}

/* closing call to action */

.cta-box {
  padding-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-box h2 {
  max-width: 36rem;
  margin: 0 auto;
}

.cta-box .section-intro {
  max-width: 36rem;
  margin-inline: auto;
}

.cta {
  padding-top: 0;
  padding-bottom: clamp(56px, 8vw, 96px);
}

/* ---------------------------------------------------------------------------------------------- footer */

.site-footer {
  padding-block: 56px 32px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-brand img {
  width: 18px;
  height: 18px;
}

.footer-brand p {
  margin-top: 12px;
  color: var(--fg-muted);
}

.footer-col h2 {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
}

.footer-col ul {
  display: grid;
  gap: 8px;
}

.footer-col a {
  color: var(--fg-muted);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}
