/* apila.co.uk - single stylesheet
   Recreates the 2017 dark one-page look: near-black sections, white Muli text,
   teal (#4ecac2) accents with a pink (#c94e8e) hover, minimal sticky header,
   full-screen hero with a dark overlay, black "socket" footer. */

:root {
  --bg-main: #141414;      /* main_color */
  --bg-alt: #111111;       /* alternate_color */
  --bg-header: #1a1a1a;    /* header_color */
  --bg-socket: #000000;    /* socket footer */
  --bg-loader: #151515;
  --text: #ffffff;
  --muted: #8c8c8c;
  --soft: #eeeeee;
  --line: #363636;
  --teal: #4ecac2;
  --teal-light: #6fece4;
  --teal-dark: #2ca8a0;
  --pink: #c94e8e;
  --pink-light: #da5f9f;
  --wrap: 1010px;
  --font: "Muli", "Mulish", Verdana, Geneva, sans-serif;
  --logo-font: "Varela Round", "Muli", "Mulish", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; transition: color .2s ease; }
a:hover, a:focus { color: var(--pink); }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.3; margin: 0 0 .6em; color: var(--text); }
p { margin: 0 0 1.1em; }
.container { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--teal); color: #141414; padding: 6px 12px; z-index: 300; }

/* ---------- Preloader (CSS only, fades out) ---------- */
.siteloader {
  position: fixed; inset: 0; z-index: 500;
  background: var(--bg-loader);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  animation: loader-out .5s ease 1.1s forwards;
  pointer-events: none;
}
.siteloader .wordmark { font-size: 54px; }
.siteloader .spinner {
  width: 34px; height: 34px; margin-top: 22px;
  border: 2px solid rgba(255,255,255,.15); border-top-color: #fff; border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .siteloader { display: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Wordmark logo ---------- */
.wordmark {
  font-family: var(--logo-font);
  font-weight: 400;
  letter-spacing: -.02em;
  color: #fff;
  text-transform: lowercase;
  line-height: 1;
  display: inline-flex; align-items: baseline;
}
.wordmark .dot {
  display: inline-block; width: .2em; height: .2em; border-radius: 50%;
  background: var(--teal); margin-left: .06em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(26,26,26,.96);
  border-bottom: 1px solid #2b2b2b;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 50px; max-width: none; padding: 0 30px;
}
.site-header .logo { font-size: 30px; color: #fff; }
.site-header .logo:hover { color: #fff; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav a {
  display: block; padding: 0 14px; line-height: 50px;
  color: #fff; font-size: 13px; letter-spacing: .04em;
  position: relative;
}
.main-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 2px; background: var(--teal); transform: scaleX(0); transition: transform .25s ease;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--teal); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

@media (max-width: 767px) {
  .site-header .container { padding: 0 16px; }
  .nav-toggle-label {
    display: block; cursor: pointer; width: 30px; height: 30px; position: relative;
  }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
    position: absolute; left: 4px; right: 4px; height: 2px; background: #fff; content: "";
  }
  .nav-toggle-label span { top: 14px; }
  .nav-toggle-label span::before { top: -7px; left: 0; right: 0; }
  .nav-toggle-label span::after { top: 7px; left: 0; right: 0; }
  .main-nav {
    position: absolute; top: 50px; left: 0; right: 0;
    background: var(--bg-header); border-bottom: 1px solid #2b2b2b;
    display: none;
  }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { line-height: 46px; padding: 0 16px; border-top: 1px solid #2b2b2b; font-size: 15px; }
  .main-nav a::after { display: none; }
}

/* ---------- Hero (full-screen slider look) ---------- */
.hero {
  position: relative;
  min-height: min(calc(100vh - 50px), 820px);
  display: flex; align-items: center; justify-content: center; text-align: center;
  background:
    linear-gradient(rgba(0,0,0,.7), rgba(0,0,0,.7)),
    radial-gradient(circle at 20% 30%, #2a7fb8 0, transparent 45%),
    radial-gradient(circle at 80% 70%, #1d5f8f 0, transparent 50%),
    linear-gradient(135deg, #0b3a5c 0%, #1f6fa3 50%, #0e4a73 100%);
  padding: 80px 20px;
}
.hero-inner { max-width: 760px; min-width: 0; width: 100%; }
@media (max-width: 480px) { .hero .tagline { letter-spacing: .08em; font-size: 14px; } .hero p.lead { font-size: 17px; } .btn { padding: 12px 18px; } }
.hero .wordmark { font-size: clamp(64px, 14vw, 120px); margin-bottom: 14px; }
.hero .tagline { font-size: 15px; letter-spacing: .2em; overflow-wrap: anywhere; text-transform: lowercase; color: var(--soft); margin-bottom: 28px; }
.hero p.lead { font-size: 20px; color: #fff; line-height: 1.6; }
.scroll-down {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.scroll-down::before { content: ""; width: 9px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-2px) rotate(45deg); }

/* Page hero (inner pages) */
.page-hero {
  background:
    linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.72)),
    linear-gradient(135deg, #0b3a5c 0%, #1f6fa3 55%, #0e4a73 100%);
  text-align: center; padding: 90px 20px 70px;
}
.page-hero h1 { font-size: clamp(30px, 6vw, 42px); margin-bottom: .3em; }
.page-hero p { color: var(--soft); margin: 0 auto; max-width: 640px; font-size: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; margin: 6px 6px 0;
  padding: 14px 26px; border-radius: 3px;
  font-size: 13px; letter-spacing: .05em; text-transform: uppercase;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  border: 1px solid transparent;
}
.btn-light { background: transparent; color: #fff; border-color: #fff; }
.btn-light:hover { background: #fff; color: #141414; }
.btn-theme { background: var(--teal); color: #141414; border-color: var(--teal); }
.btn-theme:hover { background: var(--pink); border-color: var(--pink); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; background: var(--bg-main); }
.section.alt { background: var(--bg-alt); }
.section.huge { padding: 100px 0; }

/* "modern-quote modern-centered" special heading */
.special-heading { text-align: center; margin: 0 auto 40px; max-width: 620px; }
.special-heading h2, .special-heading h3 { font-size: 30px; margin: 0 0 10px; }
.special-heading .sub { color: var(--muted); font-size: 15px; margin: 0; }
.special-heading::after {
  content: ""; display: block; width: 60px; height: 1px; margin: 18px auto 0;
  background: #fff; opacity: .9;
}

/* ---------- Portfolio masonry (3 col, no gap) ---------- */
.masonry { display: grid; grid-template-columns: repeat(3, 1fr); background: #000; }
.masonry figure {
  margin: 0; position: relative; aspect-ratio: 1 / 1; overflow: hidden;
}
.masonry .tile {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  padding: 22px; transition: transform .5s ease;
}
.masonry figure:hover .tile { transform: scale(1.04); }
.masonry figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.72); padding: 14px 18px;
  font-size: 14px; color: #fff; line-height: 1.45;
}
.masonry figcaption strong { display: block; color: var(--teal); font-weight: 400; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.tile .shape { position: absolute; }
.t1 { background: linear-gradient(135deg, #4ecac2, #2ca8a0); }
.t2 { background: #f2f2f2; }
.t3 { background: linear-gradient(160deg, #c94e8e, #7d2457); }
.t4 { background: #222; }
.t5 { background: linear-gradient(135deg, #1f6fa3, #0b3a5c); }
.t6 { background: #e8e2d6; }
.t7 { background: linear-gradient(45deg, #111 50%, #4ecac2 50%); }
.t8 { background: #f7c948; }
.t9 { background: linear-gradient(135deg, #363636, #141414); }
.tile .big { font-family: var(--logo-font); font-size: clamp(36px, 7vw, 72px); line-height: 1; position: absolute; top: 18%; left: 10%; }

@media (max-width: 767px) { .masonry { grid-template-columns: repeat(2, 1fr); } .masonry figcaption { font-size: 12px; padding: 10px 12px; } }
@media (max-width: 480px) { .masonry .tile .big { font-size: 34px; } .masonry figcaption { font-size: 11px; padding: 8px 10px; } .masonry figcaption strong { font-size: 10px; } }

/* ---------- About ---------- */
.about-intro { text-align: center; max-width: 760px; margin: 0 auto; font-size: 18px; }
.about-intro .big { font-size: 26px; line-height: 1.45; margin-bottom: 1em; }
.client-types { text-align: center; color: var(--muted); max-width: 820px; margin: 40px auto 0; font-size: 15px; }
.client-types h3 { color: #fff; font-size: 22px; }

/* ---------- Services (3 columns with icons) ---------- */
.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.service { text-align: center; }
.service .icon {
  width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 50%;
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: var(--teal); transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.service:hover .icon { background: var(--teal); color: #fff; border-color: var(--teal-dark); }
.service h3 { font-size: 22px; margin-bottom: .4em; }
.service p { color: var(--muted); }
@media (max-width: 767px) { .columns { grid-template-columns: 1fr; gap: 34px; } }

/* ---------- Article cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.card { background: var(--bg-alt); border: 1px solid var(--line); display: flex; flex-direction: column; }
.section.alt .card { background: var(--bg-main); }
.card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #222; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2); transition: transform .5s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.card .body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.card .cat { color: var(--teal); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.card h3 { font-size: 20px; margin-bottom: .5em; }
.card h3 a { color: #fff; }
.card h3 a:hover { color: var(--pink); }
.card p { color: var(--muted); font-size: 15px; flex: 1; }
.card .more { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.card .soon { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.center { text-align: center; }
.mt { margin-top: 40px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Contact band (parallax look) ---------- */
.contact-band {
  text-align: center; padding: 110px 20px;
  background:
    linear-gradient(rgba(0,0,0,.75), rgba(0,0,0,.75)),
    linear-gradient(135deg, #0e4a73, #2a7fb8 60%, #4ecac2);
  background-attachment: fixed, fixed;
}
.contact-band h2 { font-size: clamp(24px, 4.5vw, 32px); }
.contact-band p { color: var(--soft); max-width: 600px; margin: 0 auto 1.4em; font-size: 18px; }
.contact-band .mail { font-size: clamp(20px, 5vw, 28px); }
@media (max-width: 767px) { .contact-band { background-attachment: scroll, scroll; } }

/* ---------- Article / prose pages ---------- */
.prose { max-width: 760px; margin: 0 auto; font-size: 17px; }
.prose h2 { font-size: 26px; margin-top: 1.8em; }
.prose h3 { font-size: 20px; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--teal);
  font-size: 20px; color: var(--soft);
}
.prose .note { background: var(--bg-alt); border: 1px solid var(--line); padding: 18px 22px; margin: 1.6em 0; }
.post-meta { color: var(--muted); font-size: 14px; margin-top: 10px; }
.post-meta span + span::before { content: "\00b7"; margin: 0 8px; }
.post-figure { margin: 0 0 2em; }
.post-figure img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.post-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.author-box { border-top: 1px solid var(--line); margin-top: 3em; padding-top: 1.5em; color: var(--muted); font-size: 15px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--soft); }
.placeholder { background: rgba(201,78,142,.18); outline: 1px dashed var(--pink); padding: 0 4px; }

/* ---------- Footer (socket) ---------- */
.site-footer { background: var(--bg-socket); color: var(--soft); font-size: 13px; border-top: 1px solid #222; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 22px; padding-bottom: 22px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--soft); text-decoration: underline; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer .disclaimer { width: 100%; color: var(--muted); font-size: 12px; margin: 0; }
.to-top {
  position: fixed; right: 20px; bottom: 20px; width: 40px; height: 40px; border-radius: 3px;
  background: rgba(0,0,0,.6); border: 1px solid #333; display: flex; align-items: center; justify-content: center; z-index: 90;
}
.to-top::before { content: ""; width: 9px; height: 9px; border-left: 2px solid #fff; border-top: 2px solid #fff; transform: translateY(2px) rotate(45deg); }
