/* django-entwickler.at – see DESIGN.md before changing. Mobile first. */

/* Instrument Serif Italic: only for single emphasised words (<i>) in headlines. Shared with
   stephan-poetschner.at. */
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  /* colour */
  --paper: #ffffff;
  --ground: #f3f5f7;          /* row hover */
  --ink: #161b22;
  --muted: #56606c;           /* 6.3:1 on white */
  --hair: #e1e5ea;
  --accent: #1e3a5c;          /* ink blue: the one accent (labels, links, selected chip, footer) */
  --accent-dark: #142a44;
  --on-accent: #eef3f8;
  --on-accent-muted: #b4c4d6;
  --signal: #ff6b0a;          /* orange: lines and fills only, never text on white (2.85:1) */
  --signal-on-accent: #ff852b;/* orange on ink blue, 4.76:1 (AA for any size) */
  /* portfolio colours: only in the freelancer block (.guest) */
  --green: #1d3b31;
  --guest-signal: #4be38a;            /* portfolio --signal-on-green */
  --guest-signal-hover: #2fd36b;      /* portfolio --signal */
  --on-green: #eef0e6;
  --on-green-muted: #a9bdb2;

  /* type */
  --fs-xl: clamp(2.1rem, 5vw, 3.75rem);
  --fs-lg: clamp(1.35rem, 2.2vw, 1.75rem);
  --fs-md: 1.0625rem;
  --fs-base: 1rem;
  --fs-sm: .875rem;

  /* space: in a group ≪ between groups ≪ between sections */
  --space-in: .25rem;
  --space-group: 1rem;
  --space-section: clamp(2.5rem, 6vw, 4.5rem);

  --wrap: 1140px;
  --measure: 40rem;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-base)/1.55 Ubuntu, system-ui, sans-serif;
}
p, ul, figure, blockquote { margin: 0; }
i { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.15em; letter-spacing: -.01em; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; }

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

.textlink, .lead a, .plain-list a, .after-list a, .detail a {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
  transition: color .15s var(--ease);
}
.textlink:hover, .lead a:hover, .plain-list a:hover, .after-list a:hover, .detail a:hover { color: var(--accent); }

/* ---- header ---- */
.site-header { border-bottom: 1px solid var(--hair); }
.site-header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0 1.5rem; min-height: 4rem;
}
.site-name { font-weight: 500; text-decoration: none; letter-spacing: -.01em; padding: .75rem 0; }
.site-name span { color: var(--muted); font-weight: 400; }
.site-nav { display: flex; gap: 1.25rem; order: 3; width: 100%; }
.site-nav a {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 44px;
  text-decoration: none; color: var(--muted); transition: color .15s var(--ease);
}
.site-nav a span { font-size: var(--fs-sm); font-weight: 500; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--signal); }
.countries { display: flex; align-items: center; gap: .25rem; font-size: var(--fs-sm); color: var(--muted); }
.countries a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .25rem; text-decoration: none; }
.countries a:hover { color: var(--ink); }
.countries a[aria-current] { color: var(--ink); font-weight: 500; }
.country-long { display: none; }

/* ---- intro ---- */
.intro { padding: var(--space-section) 0 calc(var(--space-section) * .6); }
h1 {
  font-size: var(--fs-xl); font-weight: 300; line-height: 1.1; letter-spacing: -.03em;
  margin: 0 0 var(--space-group); max-width: 28ch;
}
h1 strong {
  font-weight: 700; letter-spacing: -.035em;
  text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: .09em;
  text-underline-offset: .1em; text-decoration-skip-ink: none;
}
.lead { max-width: var(--measure); font-size: var(--fs-md); }

/* ---- sections ---- */
.section { padding: 0 0 var(--space-section); }
.section-title {
  font-size: var(--fs-sm); font-weight: 700; color: var(--accent); margin: 0 0 var(--space-group);
  display: flex; gap: .5rem; align-items: center;
}
.section-title::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--signal); flex: none; }
.plain-list { padding-left: 1.1rem; max-width: var(--measure); }
.plain-list li + li { margin-top: .5rem; }
.after-list { margin-top: var(--space-group); max-width: var(--measure); }

/* ---- filter chips ---- */
.filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--space-group); }
.chip {
  font: inherit; font-size: var(--fs-sm); min-height: 44px; padding: 0 1rem; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--hair); background: var(--paper); color: var(--ink);
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.chip span { color: var(--muted); margin-left: .15rem; }
.chip:hover { border-color: var(--accent); }
.chip:active { transform: translateY(1px); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip[aria-pressed="true"] span { color: var(--signal-on-accent); }

/* ---- directory table (stacks to rows on phones) ---- */
.directory { width: 100%; border-collapse: collapse; }
.directory thead { position: absolute; left: -9999px; }
.directory tr { display: block; padding: .75rem 0; border-bottom: 1px solid var(--hair); }
.directory td { display: block; padding: 0; }
.row-name { font-weight: 500; font-size: var(--fs-md); margin-bottom: var(--space-in); }
.row-name a { text-decoration: none; }
.row-name a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.row-desc a { text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: .2em; }
.row-desc a:hover { text-decoration-color: var(--signal); }
.row-place { font-size: var(--fs-sm); color: var(--muted); margin-top: var(--space-in); }
.row-place a { color: var(--ink); }

@media (min-width: 700px) {
  .directory thead { position: static; }
  .directory tr { display: table-row; padding: 0; }
  .directory td { display: table-cell; vertical-align: baseline; padding: .85rem 1rem .85rem 0; border-bottom: 1px solid var(--hair); }
  .directory thead th {
    font-size: var(--fs-sm); font-weight: 500; color: var(--accent); text-align: left;
    padding: .6rem 1rem .6rem 0; border-bottom: 2px solid var(--accent);
  }
  .directory tbody tr { transition: background .15s var(--ease); }
  .directory tbody tr:hover { background: var(--ground); box-shadow: inset 3px 0 0 var(--signal); }
  .row-name { width: 34%; margin: 0; }
  .row-place { width: 18%; white-space: nowrap; margin: 0; }
  .directory-2 .row-name { width: auto; }
  .directory-2 .row-place { width: 30%; }
}

/* ---- freelancer block: portfolio colours, the only place they appear ---- */
.guest { background: var(--green); color: var(--on-green); margin-bottom: var(--space-section); }
.guest-grid { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.guest-kicker { color: var(--guest-signal); font-weight: 700; font-size: var(--fs-sm); margin-bottom: var(--space-group); }
.guest-who { display: flex; gap: 1rem; align-items: center; margin-bottom: var(--space-group); }
.guest-who img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.guest-name { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.guest-name a { text-decoration: none; }
.guest-name a:hover { text-decoration: underline; text-decoration-color: var(--guest-signal); text-underline-offset: .15em; }
.guest-role { color: var(--on-green-muted); font-size: var(--fs-sm); }
.guest-text { max-width: var(--measure); }
.guest-refs { list-style: none; padding: 0; margin-top: var(--space-group); max-width: var(--measure); }
.guest-refs li { padding: .45rem 0; border-top: 1px solid rgba(238, 240, 230, .15); }
.guest-refs a { color: var(--guest-signal); font-weight: 500; text-underline-offset: .2em; }
.guest-refs span { color: var(--on-green-muted); }
.guest-quote { margin-top: calc(var(--space-group) * 1.5); max-width: var(--measure); padding-left: 1rem; border-left: 2px solid var(--guest-signal); }
.guest-quote figcaption { margin-top: .5rem; font-size: var(--fs-sm); color: var(--on-green-muted); }
/* highlighted words in the quote: a thick green underline (a fill stripe would sit behind light text) */
.guest mark { background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--guest-signal);
  text-decoration-thickness: .2em; text-underline-offset: .1em; text-decoration-skip-ink: none; }
.guest-quote cite { font-style: normal; color: var(--on-green); font-weight: 500; }
.pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: .6rem 1.4rem;
  margin-top: calc(var(--space-group) * 1.5);
  border-radius: 999px; background: var(--guest-signal); color: var(--ink); font-weight: 700; text-decoration: none;
  transition: background .15s var(--ease), transform .1s var(--ease);
}
.pill:hover { background: var(--guest-signal-hover); }
.pill:active { transform: translateY(1px); }
.pill:focus-visible { outline-color: var(--guest-signal); }
.guest-meta { margin-top: .75rem; font-size: var(--fs-sm); color: var(--on-green-muted); }
.guest-meta a { color: var(--on-green); display: inline-block; padding: .6rem 0; }
.guest a:focus-visible { outline-color: var(--guest-signal); }

/* ---- detail pages ---- */
.back { margin-bottom: var(--space-group); font-size: var(--fs-sm); }
.back a { text-decoration: none; color: var(--muted); display: inline-block; padding: .6rem 0; }
.back a:hover { color: var(--ink); }
.detail h1 { font-weight: 700; letter-spacing: -.035em; }  /* a name: strong, like names in the table */
.detail-sub { font-size: var(--fs-md); margin-bottom: var(--space-group); }
.detail-address { color: var(--muted); margin-bottom: var(--space-group); }
.detail-address p { margin: 0; }
.prose p { max-width: var(--measure); margin-bottom: 1rem; }

/* ---- footer ---- */
.site-footer { background: var(--accent); color: var(--on-accent); padding: var(--space-section) 0 2rem; }
.footer-claim { font-size: var(--fs-lg); font-weight: 300; letter-spacing: -.02em; line-height: 1.25; max-width: 30ch; }
.footer-claim a { color: var(--on-accent); font-weight: 500; text-decoration: underline; text-decoration-color: var(--signal-on-accent);
  text-decoration-thickness: 2px; text-underline-offset: .15em; }
.footer-claim a:hover { text-decoration-thickness: 4px; }
.footer-counts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin: var(--space-section) 0 2.5rem; }
.footer-counts a { text-decoration: none; font-size: var(--fs-sm); color: var(--on-accent-muted); display: block; }
.footer-counts b {
  display: block; font-size: clamp(2.25rem, 4vw, 3.25rem); font-weight: 700; line-height: 1;
  letter-spacing: -.03em; color: var(--signal-on-accent); margin-bottom: .25rem;
}
.footer-counts a:hover { color: var(--on-accent); }
.footer-small { font-size: var(--fs-sm); color: var(--on-accent-muted); border-top: 1px solid rgba(238, 243, 248, .15); padding-top: 1rem; }
.footer-small p + p { margin-top: .5rem; }
.footer-small a { color: var(--on-accent); }
.site-footer a:focus-visible { outline-color: var(--signal-on-accent); }

/* ---- breakpoints ---- */
@media (min-width: 700px) {
  .site-nav { order: 0; width: auto; }
}
@media (min-width: 900px) {
  .country-short { display: none; }
  .country-long { display: inline; }
}
@media (min-width: 1000px) {
  .guest-grid { display: grid; grid-template-columns: 1fr 3fr; gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .chip:active, .pill:active { transform: none; }
}

/* references after the address in a directory entry */
.row-extra { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
.row-extra:empty { display: none; }
.row-extra p, .row-extra ul { margin: var(--space-in) 0 0; padding: 0; list-style: none; }
.row-extra a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: .2em; }
.row-extra a:hover { text-decoration-color: var(--signal); }

/* freelancer block as last section: touch the footer, no white gap */
main > .guest:last-child { margin-bottom: 0; }

/* inset the first column so the orange hover bar has room */
@media (min-width: 700px) {
  .directory th:first-child, .directory td:first-child { padding-left: .875rem; }
}

/* curation note under a list */
.stand { margin-top: var(--space-group); max-width: var(--measure); font-size: var(--fs-sm); color: var(--muted); }
.stand-ask { margin-top: .75rem; font-size: var(--fs-base); color: var(--ink); }

/* freelancer / agency / hiring guidance */
.choose { margin: 0; display: grid; gap: var(--space-group); max-width: 60rem; }
.choose dt { font-weight: 500; font-size: var(--fs-md); }
.choose dt a { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.choose dd { margin: var(--space-in) 0 0; }
@media (min-width: 900px) { .choose { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

/* `display` on rows would override the hidden attribute the filter sets */
.directory tr[hidden] { display: none; }
