/* ==========================================================================
   uruq.work — single stylesheet
   --------------------------------------------------------------------------
   Everything themeable lives in the token block below. Change the palette,
   the type scale or the spacing rhythm there and the whole site follows.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Palette — light (see the dark override in section 2) */
  --surface:     #ffffff;
  --surface-2:   #f1f2f0;
  --ink:         #0d1011;
  --muted:       #55585c;
  --accent:      #0a6e70;
  --accent-hover:#085153;
  --accent-ink:  #ffffff;
  --line:        #e4e4e2;
  --focus:       #0a6e70;

  /* Status colours for the contact form */
  --ok:          #0a6e70;
  --error:       #a3231f;

  /* Corner cut for the signature notch — echoes the wordmark's diagonal cut */
  --notch: 11px;

  /* Type scale — ~1.25 ratio, fluid where it matters */
  --fs-100: 0.78rem;
  --fs-200: 0.875rem;
  --fs-300: 1rem;
  --fs-400: 1.0625rem;
  --fs-500: clamp(1.15rem, 0.4vw + 1.05rem, 1.3rem);
  --fs-600: clamp(1.35rem, 0.8vw + 1.15rem, 1.65rem);
  --fs-700: clamp(1.7rem, 1.6vw + 1.3rem, 2.2rem);
  --fs-800: clamp(2.1rem, 2.8vw + 1.4rem, 3.1rem);
  --fs-900: clamp(2.5rem, 4vw + 1.5rem, 3.9rem);

  /* Spacing — 4px base */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 7rem;

  /* Layout */
  --measure: 68ch;
  --wrap: 68rem;
  --wrap-narrow: 46rem;
  --radius: 3px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.3, 1);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
               monospace;

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. Dark scheme — colour tokens only, nothing structural
   -------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root {
    --surface:     #0b0d0e;
    --surface-2:   #16181a;
    --ink:         #eef0f0;
    --muted:       #9aa0a3;
    --accent:      #45d6d6;
    --accent-hover:#7be8e8;
    --accent-ink:  #0b0d0e;
    --line:        #2a2d2f;
    --focus:       #45d6d6;

    --ok:          #45d6d6;
    --error:       #ff9a94;

    color-scheme: dark;
  }
}

/* --------------------------------------------------------------------------
   3. Reset / base
   -------------------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-400);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--sp-4);
  line-height: 1.15;
  letter-spacing: -0.018em;
  font-weight: 600;
  text-wrap: balance;
}

h1 { font-size: var(--fs-800); }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-500); letter-spacing: -0.01em; }
h4 { font-size: var(--fs-400); }

p, ul, ol, dl { margin: 0 0 var(--sp-4); }
p { max-width: var(--measure); text-wrap: pretty; }

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

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

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--sp-7) 0;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Utility used by the honeypot field — hidden from humans, present for bots. */
.hp-field {
  display: none;
}

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

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.wrap-narrow { max-width: var(--wrap-narrow); }

main { flex: 1 0 auto; }

.section {
  padding-block: var(--sp-8);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-alt { background: var(--surface-2); }

/* The short accent rule that sits under section headings. */
.rule::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 3px;
  margin-top: var(--sp-4);
  background: var(--accent);
}

.lede {
  font-size: var(--fs-500);
  color: var(--muted);
  max-width: 56ch;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -4rem;
  z-index: 100;
  padding: var(--sp-3) var(--sp-4);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.15s var(--ease);
}
.skip-link:focus {
  top: var(--sp-4);
  color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   5. Header + navigation
   -------------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 4.25rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo svg {
  display: block;
  width: auto;
  height: 3rem;
  fill: currentColor;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--sp-6);
}

.primary-nav a {
  display: inline-block;
  padding-block: var(--sp-2);
  color: var(--muted);
  font-size: var(--fs-300);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.primary-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--line);
}

.primary-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* The toggle is only meaningful once JS is running; see section 5b. */
.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  font: inherit;
  font-size: var(--fs-200);
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--muted); }

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1rem;
  height: 2px;
  background: currentColor;
}
.nav-toggle-bars {
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after  { top: 5px; }

/* 5b. Mobile behaviour.
   Without JS the `js` class is never set, so the nav simply stacks and stays
   visible — the site remains fully navigable. With JS, the toggle takes over. */

@media (max-width: 46rem) {
  .header-inner { min-height: 3.75rem; }

  .primary-nav {
    flex-basis: 100%;
    border-top: 1px solid var(--line);
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding-block: var(--sp-2);
  }

  .primary-nav a {
    display: block;
    padding: var(--sp-3) 0;
    border-bottom: 0;
    border-left: 2px solid transparent;
    padding-left: var(--sp-3);
    font-size: var(--fs-400);
  }

  .primary-nav a:hover { border-bottom: 0; border-left-color: var(--line); }
  .primary-nav a[aria-current="page"] {
    border-bottom: 0;
    border-left-color: var(--accent);
  }

  .js .nav-toggle { display: inline-flex; }
  .js .primary-nav { display: none; }
  .js .nav-toggle[aria-expanded="true"] + .primary-nav { display: block; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: var(--sp-8) var(--sp-7);
}

.hero-grid {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
    gap: var(--sp-8);
  }
}

.hero h1 { margin-bottom: var(--sp-5); }

.hero-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* Compact hero for the secondary pages. */
.hero-compact { padding-block: var(--sp-7) var(--sp-6); }
.hero-compact h1 { font-size: var(--fs-700); }
.hero-compact .hero-media img { max-height: 20rem; object-fit: cover; }

/* --------------------------------------------------------------------------
   7. Cards / service grids
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: 1fr;
  margin-top: var(--sp-6);
}

@media (min-width: 46rem) {
  .card-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}

.card h3 { margin-bottom: var(--sp-3); }
.card p:last-child { margin-bottom: 0; }

.section-alt .card { background: var(--surface); }

/* Long-form service blocks on /services */
.service-block {
  padding-block: var(--sp-7);
  border-top: 1px solid var(--line);
}
.service-block:first-of-type { border-top: 0; padding-top: var(--sp-6); }

.service-index {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-200);
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--sp-3);
}

/* --------------------------------------------------------------------------
   8. Buttons + CTA
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: var(--sp-3) var(--sp-5);
  font: inherit;
  font-size: var(--fs-300);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}

/* clip-path clips the native outline at the notched corner, so pull the
   focus ring inward rather than losing it there. */
.btn:focus-visible {
  outline-offset: -4px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}
.btn-primary[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); }

.cta {
  text-align: center;
}
.cta h2 { margin-bottom: var(--sp-4); }
.cta p { margin-inline: auto; margin-bottom: var(--sp-6); }

.link-arrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  margin-top: var(--sp-2);
}
.link-arrow:hover { color: var(--accent-hover); text-decoration: underline; }

/* --------------------------------------------------------------------------
   9. Contact page: form
   -------------------------------------------------------------------------- */

.field { margin-bottom: var(--sp-5); }

.field label {
  display: block;
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: var(--sp-2);
}

.field .optional {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: var(--sp-3);
  font: inherit;
  font-size: var(--fs-300);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field input:hover,
.field textarea:hover { border-color: var(--muted); }

.field textarea { min-height: 11rem; resize: vertical; }

.field-hint {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-200);
  color: var(--muted);
}

.form-status {
  margin-top: var(--sp-4);
  font-size: var(--fs-300);
}
.form-status:empty { margin-top: 0; }

.form-status[data-state="ok"] {
  color: var(--ok);
  font-weight: 600;
}
.form-status[data-state="error"] {
  color: var(--error);
  font-weight: 600;
}

.noscript-note {
  padding: var(--sp-4);
  margin-bottom: var(--sp-5);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  background: var(--surface-2);
}
.noscript-note p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   10. 404
   -------------------------------------------------------------------------- */

.error-page {
  padding-block: var(--sp-9);
  text-align: center;
}
.error-code {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-200);
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: var(--sp-4);
}
.error-page p { margin-inline: auto; margin-bottom: var(--sp-6); }

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  flex-shrink: 0;
  margin-top: var(--sp-8);
  padding-block: var(--sp-7);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--fs-300);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4) var(--sp-7);
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  margin: 0;
}
.footer-brand svg {
  display: block;
  width: auto;
  height: 3rem;
  fill: currentColor;
}

.footer-inner p { margin: 0; }
.footer-legal { font-size: var(--fs-200); }
.footer-location { font-size: var(--fs-200); }
