/* Cuisy web — legal & support pages.
   Colour values mirror design/tokens/tokens.json ("Patlıcan & Safran"), same as src/global.css.
   Change the Python token source first, then src/global.css, then here. */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("/assets/fonts/big-shoulders-display-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/assets/fonts/martian-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --patlican: #22122b;
  --safran: #f4b42c;
  --tuz: #f6f4f7;

  --background: #f6f4f7;
  --foreground: #22122b;
  --surface: #ffffff;
  --surface-secondary: #efebf1;
  --muted: #6b5e74;
  --accent: #f4b42c;
  --accent-foreground: #22122b;
  --accent-ink: #8a5a00;
  --accent-soft: #fcefd0;
  --border: #e2dce6;
  --separator: #cfc6d5;
  --focus: #6b4482;
  --danger: #c9321c;
  --danger-foreground: #ffffff;
  --surface-shadow: 0 1px 2px 0 rgba(34, 18, 43, 0.06), 0 4px 12px 0 rgba(34, 18, 43, 0.05);

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-headline: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "Martian Mono", ui-monospace, monospace;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #150a1a;
    --foreground: #f6f2f7;
    --surface: #1f1226;
    --surface-secondary: #2a1833;
    --muted: #ae9fb8;
    --accent-ink: #f4b42c;
    --accent-soft: #3a2a12;
    --border: #33223c;
    --separator: #4a3654;
    --focus: #f4b42c;
    --danger: #ff6a50;
    --danger-foreground: #22122b;
    --surface-shadow: none;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-foreground);
  border-radius: var(--radius-md);
  font-weight: 700;
  z-index: 10;
}
.skip:focus {
  top: 16px;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: inline-flex;
  color: var(--foreground);
  padding: 8px 0;
}
.brand svg {
  height: 30px;
  width: auto;
  display: block;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.top nav a {
  color: var(--foreground);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.top nav a:hover {
  background: var(--surface-secondary);
}
.top nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--foreground);
}
.top nav .lang {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.3px;
  border: 1px solid var(--border);
}

main {
  flex: 1;
  padding-top: 16px;
  padding-bottom: 64px;
}

/* Type */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

h1,
.display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(44px, 9vw, 64px);
  /* Never below 0.95: Turkish capitals (İ, Ğ, Ş, Ç) collide with the line above. */
  line-height: 0.97;
  letter-spacing: 0;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}
h2 {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 48px 0 12px;
}
h3 {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.2px;
  margin: 28px 0 8px;
}
p,
ul,
ol {
  margin: 0 0 16px;
}
ul,
ol {
  padding-left: 22px;
}
li {
  margin-bottom: 8px;
}
li::marker {
  color: var(--muted);
}
strong {
  font-weight: 700;
}
.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--foreground);
  max-width: 34em;
}
.muted {
  color: var(--muted);
}
.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.3px;
  color: var(--muted);
  margin: 0 0 32px;
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.3px;
}

/* Surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--surface-shadow);
  padding: 20px;
  margin: 0 0 16px;
}
.card > :last-child {
  margin-bottom: 0;
}
.note {
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin: 0 0 24px;
}
.note > :last-child {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--border);
}
th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

/* Link list (home, support) */
.links {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--surface-shadow);
  overflow: hidden;
}
.links li {
  margin: 0;
}
.links li + li {
  border-top: 1px solid var(--border);
}
/* Title (text node) on row 1, description (span) on row 2, arrow spanning both on the right. */
.links a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  padding: 14px 20px;
  min-height: 56px;
  color: var(--foreground);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
}
.links a span {
  grid-column: 1;
  grid-row: 2;
  font-weight: 500;
  font-size: 15px;
  color: var(--muted);
}
.links a::after {
  content: "→";
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--accent-ink);
  font-weight: 700;
}
.links a:hover {
  background: var(--surface-secondary);
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 120ms ease-out;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-foreground);
}
.btn-secondary {
  background: var(--surface-secondary);
  color: var(--foreground);
}
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.btn-danger {
  background: var(--danger);
  color: var(--danger-foreground);
}

/* Forms (account deletion request) */
.form .actions {
  margin: 16px 0 0;
}
.field-label {
  display: block;
  font-weight: 700;
  margin: 0 0 8px;
}
.field {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  background: var(--background);
  color: var(--foreground);
  font: inherit;
}
.form .field + .field-label {
  margin-top: 16px;
}
select.field {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
textarea.field {
  min-height: 112px;
  resize: vertical;
}
/* Honeypot for the public business form: off-screen, never for people. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.field[aria-invalid="true"] {
  border-color: var(--danger);
}
.field-error,
.status-danger {
  color: var(--danger);
}
.field-error {
  margin: 8px 0 0;
  font-size: 15px;
}
.status {
  margin: 16px 0 0;
  font-weight: 700;
}

/* Invite code ticket: a fixed brand moment (aubergine in both themes). */
.ticket {
  background: var(--patlican);
  color: var(--tuz);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin: 24px 0;
  box-shadow: inset 0 0 0 1px rgba(246, 244, 247, 0.1);
}
.ticket .eyebrow {
  color: var(--safran);
}
.code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px;
  font-family: var(--font-mono);
  font-size: 30px;
  line-height: 1;
}
.code span {
  width: 42px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(246, 244, 247, 0.08);
}
.code .sep {
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--safran);
}
.ticket p {
  margin: 12px 0 0;
  font-size: 15px;
  color: rgba(246, 244, 247, 0.78);
}

/* Footer */
.foot {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  font-size: 14px;
  color: var(--muted);
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 16px;
}
.foot a {
  color: var(--muted);
  display: inline-flex;
  min-height: 32px;
  align-items: center;
}
.foot a:hover {
  color: var(--foreground);
}
.foot .signoff {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 22px;
  line-height: 1;
  color: var(--foreground);
  margin: 0 0 8px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .top nav {
    justify-content: flex-start;
    margin-left: -12px;
  }
  h2 {
    font-size: 22px;
  }
  /* Stack table rows into labelled blocks (labels come from data-label, set by the build). */
  thead {
    display: none;
  }
  tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  td {
    display: block;
    border: 0;
    padding: 2px 0;
  }
  td + td::before {
    content: attr(data-label);
    display: block;
    margin-top: 8px;
    font-size: 11px;
    line-height: 14px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
  }
  .code {
    font-size: 24px;
  }
  .code span {
    width: 36px;
    height: 46px;
  }
  .actions .btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

@media print {
  .top nav,
  .skip,
  .foot nav {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
