/* dyfiant.tech: a like-for-like rebuild of the OnePress theme the WordPress site used (primary #1d426c,
   secondary #67aec8, Josefin Sans headings, Open Sans text, dark contact section). */
:root {
  --primary: #1d426c;
  --secondary: #67aec8;
  --text: #555;
  --heading: #333;
  --meta-bg: #f8f9f9;
  --line: #e9e9e9;
  --inverse: #222;
  --footer: #111;
  --heading-font: "Josefin Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; font-family: "Open Sans", sans-serif; font-size: 14px; line-height: 1.7; color: var(--text); background: #fff; }
img, video { max-width: 100%; height: auto; }
main { flex: 1 0 auto; }
a { color: var(--primary); }
a:hover { color: #122a45; }
h1, h2, h3, h4 { font-family: var(--heading-font); color: var(--heading); line-height: 1.3; margin: 0 0 0.6em; }
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 30px; } }

.button {
  display: inline-block; min-height: 44px; padding: 0.75rem 1.5rem; border: 2px solid var(--primary); border-radius: 2px;
  background: var(--primary); color: #fff; font-family: var(--heading-font); font-weight: 600; font-size: 15px;
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.button:hover { background: #122a45; border-color: #122a45; color: #fff; }
.button-outline { background: transparent; border-color: #fff; }
.button-outline:hover { background: #fff; border-color: #fff; color: var(--heading); }

/* Header: transparent over the hero or a service's cover image, white with a grey title band elsewhere. */
.masthead { position: relative; }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.logo { display: block; padding: 8px 0; }
.logo img { display: block; height: 100px; width: auto; }
.site-header ul { display: flex; flex-wrap: wrap; gap: 4px 24px; list-style: none; margin: 0; padding: 0; }
.site-header nav a {
  display: inline-block; padding: 10px 0; font-family: var(--heading-font); font-weight: 600; font-size: 14px;
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none; color: var(--heading);
}
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--primary); }
.plain .site-header { border-bottom: 1px solid var(--line); }
.page-header { background: var(--meta-bg); border-bottom: 1px solid var(--line); padding: 32px 0; }
.page-header h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }

.cover .masthead { background: #1b1b1b; color: #fff; overflow: hidden; }
.cover .masthead::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3); }
.cover .site-header, .hero, .cover-title { position: relative; z-index: 1; }
.cover .site-header nav a { color: rgba(255, 255, 255, 0.9); }
.cover .site-header nav a:hover, .cover .site-header nav a[aria-current] { color: #fff; }
.masthead-video, .masthead-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.masthead-video ~ .masthead-image { display: none; }
/* On small screens the hero still stands in for the video, which has no source there (home page template). */
@media (max-width: 720px) {
  .masthead-video { display: none; }
  .masthead-video ~ .masthead-image { display: block; }
}

.hero { padding: 10vh 0 14vh; text-align: center; }
.hero h1 { max-width: 900px; margin: 0 auto 24px; color: #fff; font-size: clamp(32px, 5vw, 56px); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; line-height: 1.15; }
.hero p { max-width: 760px; margin: 0 auto 32px; color: rgba(255, 255, 255, 0.9); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cover-title { padding: 6vw 0 7vw; text-align: center; }
.cover-title h1 { margin: 0; color: #fff; font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
/* Article titles run longer than service names, so they keep their own case. */
.article-cover { padding-bottom: max(7vw, 44px); }
.article-cover h1 { max-width: 900px; margin: 0 auto; letter-spacing: 0; text-transform: none; }
.article-cover .image-credit { position: absolute; right: 12px; bottom: 6px; margin: 0; }
.article-cover .credit { color: rgba(255, 255, 255, 0.85); }

/* Home page sections */
.section { padding: 70px 0; }
.section-meta { background: var(--meta-bg); }
.section-title { margin-bottom: 40px; text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.section-subtitle { margin: 0 0 12px; text-align: center; color: #aaa; font-family: var(--heading-font); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.section-desc { max-width: 1000px; margin: -16px auto 48px; text-align: center; font-size: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.service-item { background: #fff; padding: 30px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); }
.service-item img { display: block; width: 100%; margin-bottom: 24px; }
.service-body { display: flex; gap: 24px; align-items: flex-start; }
.service-icon { flex: none; width: 48px; color: var(--primary); font-size: 40px; text-align: center; }
.service-item h3 { margin-bottom: 8px; font-size: 17px; }
.service-item h3 a { color: var(--heading); text-decoration: none; }
.service-item h3 a:hover { color: var(--primary); }
.service-item p { margin: 0; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; max-width: 900px; margin: 0 auto; }
.person-card { text-align: center; }
.person-card img { display: block; }
.person-card img, .person-card .photo-placeholder { width: 200px; height: 200px; margin: 0 auto 20px; border-radius: 50%; object-fit: cover; }
.person-card :is(h2, h3) { margin-bottom: 4px; font-size: 20px; }
.person-card :is(h2, h3) a { color: var(--heading); text-decoration: none; }
.role { margin: 0 0 12px; color: var(--primary); font-family: var(--heading-font); font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.photo-placeholder { display: grid; place-items: center; aspect-ratio: 1; background: #e6eef5; color: var(--secondary); font-size: 64px; }

.section-inverse { background: var(--inverse); color: rgba(255, 255, 255, 0.5); }
.section-inverse .section-title { color: #fff; }
.section-inverse .section-subtitle { color: rgba(255, 255, 255, 0.7); }
.contact-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px 60px; }

/* The contact form, on the dark home section and on the contact page. */
.contact-form > div { margin-bottom: 16px; }
.contact-form label { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.contact-form input, .contact-form textarea {
  width: 100%; min-height: 44px; padding: 10px; border: 0; border-radius: 0; background: #f2f2f2; color: #333;
  font: inherit; font-size: 16px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}
.contact-form textarea { height: 180px; resize: vertical; }
.contact-form .button { width: 100%; }
.contact-form .errorlist { margin: 0 0 6px; padding: 0; list-style: none; color: #e57373; font-weight: 600; }
.plain .contact-form { max-width: 560px; }
.plain .contact-form label { color: var(--heading); }

/* The contact form's trap for bots (dyfiant/forms.py): off screen for people, filled in by bots. */
.contact-extra {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Inner pages: services, privacy policy, people, articles */
.page-body { padding-top: 48px; padding-bottom: 70px; }
.prose { max-width: 790px; font-size: 15px; }
.prose h2 { margin-top: 1.4em; font-size: 28px; }
.prose h3 { margin-top: 1.2em; font-size: 20px; }
.figure { margin: 1.5em 0; }
.figure img { display: block; max-width: 100%; height: auto; }
.figure figcaption { margin-top: 8px; font-size: 14px; font-style: italic; }
.credit { display: block; color: #6b6b6b; font-size: 12px; font-style: normal; }
.credit a { color: inherit; }
.prose blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--primary); font-style: italic; }
.section .prose { margin: 0 auto; }
.next-step { margin-top: 40px; }

.article-list { display: flex; flex-direction: column; gap: 40px; margin: 32px 0 0; padding: 0; list-style: none; }
.article-summary { display: flex; flex-wrap: wrap; gap: 24px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.article-summary > a { flex: 0 0 240px; }
.article-summary > div { flex: 1 1 320px; }
.article-summary :is(h2, h3) { margin-bottom: 4px; font-size: 22px; }
.article-summary :is(h2, h3) a { color: var(--heading); text-decoration: none; }
.article-summary :is(h2, h3) a:hover { color: var(--primary); }
.byline { margin: 0 0 12px; color: #999; font-size: 13px; }
.authors { max-width: 790px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.author { display: flex; gap: 20px; align-items: flex-start; }
.author img { flex: none; width: 80px; height: 80px; border-radius: 50%; }
.author h2 { margin-bottom: 4px; font-size: 18px; }
.author h2 a { color: var(--heading); text-decoration: none; }
.person-page { display: flex; flex-wrap: wrap; gap: 40px; }
.person-photo { flex: 0 0 240px; }
.person-photo img { display: block; }
.person-photo img, .person-photo .photo-placeholder { width: 240px; height: 240px; border-radius: 50%; object-fit: cover; }
.person-page .prose { flex: 1 1 400px; }

.site-footer { padding: 30px 0; background: var(--footer); color: #bbb; text-align: center; }
.site-footer p { display: inline; margin: 0; }
.site-footer a { color: #fff; }

/* Phones: a compact header with the menu behind a button (dyfiant/menu.js), larger text and tighter
   spacing. Inputs stay at 16px so iPhones don't zoom into the form. */
.menu-toggle {
  display: none; min-height: 44px; padding: 8px 14px; border: 1px solid currentColor; border-radius: 2px;
  background: transparent; color: var(--heading); font-family: var(--heading-font); font-size: 14px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
}
.cover .menu-toggle { color: #fff; }
@media (max-width: 899px) {
  .logo img { height: 64px; }
  .has-toggle .menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .has-toggle nav { display: none; flex-basis: 100%; }
  .has-toggle .menu-toggle[aria-expanded="true"] + nav { display: block; }
  .has-toggle nav { margin: 0 0 8px; padding: 4px 16px; background: #fff; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); }
  .has-toggle ul { flex-direction: column; gap: 0; }
  .has-toggle nav li + li { border-top: 1px solid var(--line); }
  .has-toggle nav a, .cover .has-toggle nav a { display: block; padding: 12px 0; color: var(--heading); }
}
@media (max-width: 720px) {
  body, .prose { font-size: 16px; }
  .hero { padding: 6vh 0 8vh; }
  .hero p { font-size: 17px; }
  .section { padding: 48px 0; }
  .section-title { margin-bottom: 28px; font-size: 24px; }
  .section-desc { margin: -8px auto 32px; }
  .service-item { padding: 20px; }
  .page-header { padding: 20px 0; }
  .page-header h1 { font-size: 20px; }
  .page-body { padding-top: 32px; padding-bottom: 48px; }
}
