/* ============================================================
   NettSite — style.css
   All values via CSS custom properties. Edit :root to restyle.
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Brand */
  --color-brand:         #6b8c3e;

  /* Palette */
  --color-bg:            #f9f9f9;
  --color-surface:       #ffffff;
  --color-text:          rgb(99, 99, 99);
  --color-heading:       rgb(164, 164, 164);
  --color-text-inverse:  #ffffff;
  --color-border:        #e5e5e5;

  /* Accent — warm taupe (matches live site hero-split bg) */
  --color-accent:        #cfcabe;

  /* Hero */
  --hero-overlay:        rgba(0, 0, 0, 0.52);
  --hero-min-height:     420px;

  /* Hero — Get in touch page */
  --hero-contact-bg:     #b1c5a4;

  /* Buttons */
  --btn-bg:              rgb(99, 99, 99);
  --btn-color:           #ffffff;
  --btn-radius:          4px;
  --btn-padding:         0.6rem 1.4rem;
  --btn-font-size:       0.95rem;

  /* Typography */
  --font-heading:        'Inter', sans-serif;
  --font-body:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-size-base:      1rem;
  --font-size-sm:        0.875rem;
  --font-size-lg:        1.125rem;
  --line-height-base:    1.65;

  /* Spacing scale */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   7rem;

  /* Layout */
  --container-width:     1140px;
  --container-padding:   1.5rem;

  /* Nav */
  --nav-height:          144px;
  --nav-bg:              #ffffff;
  --nav-shadow:          0 1px 3px rgba(0,0,0,0.08);

  /* Modal */
  --modal-backdrop:      rgba(0,0,0,0.55);
  --modal-radius:        6px;
  --modal-width:         520px;

  /* Cards */
  --card-gap:            2.5rem;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 112%; }

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 400;
  line-height: 1.25;
}

h3, h4, h5, h6 { font-weight: 600; }

h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.05rem; }

p + p { margin-top: 1em; }

/* ── Utilities ──────────────────────────────────────────── */
.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-color);
  padding: var(--btn-padding);
  font-size: var(--btn-font-size);
  border-radius: var(--btn-radius);
  border: none;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }

/* ── Main stacking context ──────────────────────────────── */
main {
  isolation: isolate;
}

/* ── Header / Nav ───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--nav-bg);
  box-shadow: var(--nav-shadow);
  height: var(--nav-height);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: 32px;
  padding-bottom: 32px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.site-logo img { height: 80px; width: auto; }

.site-nav { display: flex; align-items: center; gap: var(--space-md); }

.site-nav a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  transition: color 0.15s;
}
.site-nav a:hover, .site-nav a.active { color: var(--color-brand); }

/* "Get in touch" nav link styled as button */
.site-nav .nav-cta {
  background: var(--btn-bg);
  color: var(--btn-color);
  padding: 0.4rem 1rem;
  border-radius: var(--btn-radius);
  font-size: var(--font-size-sm);
}
.site-nav .nav-cta:hover { opacity: 0.85; color: var(--btn-color); }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--color-text);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Hero — Full-width photo overlay (homepage) ─────────── */
.hero {
  position: relative;
  min-height: var(--hero-min-height);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: #222;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-width);
  padding: var(--space-lg) var(--container-padding);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: var(--hero-min-height);
}

.hero__content h1,
.hero__content h2 {
  color: var(--color-text-inverse);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  text-align: right;
  max-width: 480px;
}

/* ── Hero — Split layout (service pages) ────────────────── */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
  background: var(--color-accent);
}

.hero-split__text {
  padding: var(--space-lg) var(--container-padding) var(--space-lg) calc((100vw - var(--container-width)) / 2 + var(--container-padding));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
  max-width: calc(var(--container-width) / 2 + (100vw - var(--container-width)) / 2);
}

.hero-split__text h1 {
  font-size: clamp(1.4rem, 1.4rem + ((1vw - 0.2rem) * 0.7), 1.9rem);
  color: var(--color-text);
  line-height: 1.2;
}

.hero-split__text p {
  font-size: clamp(1.25rem, 1.25rem + ((1vw - 0.2rem) * 0.5), 1.5rem);
}

.hero-split__text .subtext {
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.hero-split__image {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-md) var(--space-md) 0;
}

.hero-split__image img {
  width: 450px;
  height: 600px;
  object-fit: cover;
  border-radius: 24px;
}

/* ── Hero — Contact / Get in touch ──────────────────────── */
.hero-contact {
  display: grid;
  grid-template-columns: 2fr 3fr;
  min-height: 380px;
  background: var(--hero-contact-bg);
  align-items: center;
}

.hero-contact__left {
  padding: var(--space-lg) var(--space-md) var(--space-lg) calc((100vw - var(--container-width)) / 2 + var(--container-padding));
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: flex-start;
  justify-content: center;
}

.hero-contact__write {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 5rem + ((1vw - 0.2rem) * 11.4), 12rem);
  font-weight: 400;
  color: var(--color-heading);
  writing-mode: vertical-rl;
  text-align: right;
  line-height: 1;
}

.hero-contact__cta {
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hero-contact__cta p {
  color: var(--color-text);
  font-size: var(--font-size-base);
}

.hero-contact__image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-md) var(--space-md) 0;
}

.hero-contact__image img {
  width: 450px;
  height: 600px;
  object-fit: cover;
  border-radius: 24px;
}

/* ── Sections ───────────────────────────────────────────── */
.section {
  padding: var(--space-lg) 0;
  background: var(--color-surface);
}

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

.section__header {
  text-align: center;
  margin-bottom: var(--space-md);
}

.section__header h2 {
  margin-bottom: 0.75rem;
}

.section__header p {
  max-width: 600px;
  margin-inline: auto;
  color: var(--color-text);
}

/* ── Service / Feature Cards ────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
  margin-top: var(--space-md);
}

.card-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid--1col {
  grid-template-columns: 1fr;
  max-width: 640px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Asterisk decorative marker — matches TwentyTwentyFour is-style-asterisk */
.is-style-asterisk::before {
  content: '';
  display: block;
  width: 1.5rem;
  height: 3rem;
  background: var(--color-heading);
  clip-path: path('M11.93.684v8.039l5.633-5.633 1.216 1.23-5.66 5.66h8.04v1.737H13.2l5.701 5.701-1.23 1.23-5.742-5.742V21h-1.737v-8.094l-5.77 5.77-1.23-1.217 5.743-5.742H.842V9.98h8.162l-5.701-5.7 1.23-1.231 5.66 5.66V.684h1.737Z');
  margin-bottom: 0.5rem;
}

/* Legacy span marker — used on service-page cards */
.card__marker {
  display: block;
  font-size: 1.6rem;
  color: var(--color-heading);
  margin-bottom: 0.25rem;
  line-height: 1;
}

.card h3 {
  font-size: 1rem;
  color: var(--color-heading);
}

.card p, .card ul {
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.card ul { padding-left: 1.2rem; list-style: disc; }
.card ul li + li { margin-top: 0.4rem; }

.card strong {
  display: block;
  color: var(--color-heading);
  margin-bottom: 0.2rem;
}

/* ── Section background variant ─────────────────────────── */
.section--body-bg { background: var(--color-bg); }

/* ── Websites page — pullquote + columns layout ─────────── */
.websites-layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-lg);
  align-items: start;
  padding: var(--space-md) 0;
}

.pullquote {
  padding: var(--space-md) 0;
}

.pullquote blockquote p {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-style: italic;
  color: var(--color-heading);
  line-height: 1.5;
}

.websites-intro {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.websites-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
}

.websites-columns ul {
  list-style: disc;
  padding-left: 1.2rem;
  margin-top: 0.5rem;
}

.websites-columns ul li + li { margin-top: 0.4rem; }

.websites-columns p + p { margin-top: 0.75rem; }

/* ── Feature list (servers page) ────────────────────────── */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.feature-list__item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.feature-list__bullet {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-heading);
  margin-top: 0.55rem;
}

/* ── Intro text block (passion section) ─────────────────── */
.intro-block {
  text-align: center;
  padding: var(--space-lg) 0 var(--space-md);
}

.intro-block h2 { margin-bottom: 0.75rem; }
.intro-block p  { max-width: 600px; margin-inline: auto; }

/* ── Home service cards (3-col, linked) ─────────────────── */
.service-card a {
  display: block;
}
.service-card h3 {
  margin-bottom: 0.4rem;
  transition: color 0.15s;
}
.service-card:hover h3 { color: var(--color-brand); }

/* ── Spam banner ─────────────────────────────────────────── */
.spam-banner {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: var(--space-md) var(--container-padding);
  font-size: var(--font-size-sm);
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: var(--space-md) 0 var(--space-sm);
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-logo img { height: 42px; width: auto; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

.footer-nav a {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  transition: color 0.15s;
}
.footer-nav a:hover { color: var(--color-brand); }

.footer-fine {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-sm);
  font-size: var(--font-size-sm);
}

.footer-fine a { color: var(--color-text); text-decoration: underline; }
.footer-fine a:hover { color: var(--color-brand); }

/* ── Modal ──────────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--modal-radius);
  width: 90%;
  max-width: var(--modal-width);
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-md);
  position: relative;
}

.modal__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text);
  padding: 0.25rem 0.5rem;
  transition: color 0.15s;
}
.modal__close:hover { color: #333; }

.modal__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-heading);
  text-align: center;
  margin-bottom: var(--space-md);
  font-weight: 400;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.modal label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.modal input[type=text],
.modal input[type=email],
.modal input[type=tel],
.modal textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color 0.15s;
}

.modal input:focus,
.modal textarea:focus {
  outline: none;
  border-color: var(--color-heading);
}

.modal textarea { min-height: 120px; resize: vertical; }

.modal__submit { margin-top: 0.25rem; }

.modal__honeypot { display: none; }

.modal__msg {
  display: none;
  padding: 0.75rem;
  border-radius: var(--btn-radius);
  font-size: var(--font-size-sm);
  text-align: center;
}
.modal__msg--success { background: #e8f5e9; color: #2e7d32; display: block; }
.modal__msg--error   { background: #fdecea; color: #c62828; display: block; }

/* ── Blog ───────────────────────────────────────────────── */
.blog-header {
  text-align: center;
  padding: var(--space-lg) 0 var(--space-md);
}

.blog-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--card-gap);
  padding-bottom: var(--space-lg);
}

.post-card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #ddd;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-card__image img { transform: scale(1.03); }

.post-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-heading);
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

.post-card__meta {
  font-size: var(--font-size-sm);
  color: var(--color-heading);
  margin-bottom: 0.4rem;
}

.post-card__excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

/* ── Blog post ──────────────────────────────────────────── */
.post-hero {
  position: relative;
  height: 340px;
  background: #222;
  overflow: hidden;
}

.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.post-body {
  max-width: 740px;
  margin-inline: auto;
  padding: var(--space-lg) var(--container-padding);
}

.post-body h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--color-heading);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.post-meta {
  font-size: var(--font-size-sm);
  color: var(--color-heading);
  margin-bottom: var(--space-md);
}

.post-content h2 {
  font-size: 1.25rem;
  margin-top: var(--space-md);
  margin-bottom: 0.5rem;
}

.post-content p { margin-bottom: 1em; }

.post-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1em;
}

.post-content ul li + li { margin-top: 0.4rem; }

.post-cta {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--btn-radius);
  padding: var(--space-md);
  margin-top: var(--space-lg);
  text-align: center;
}

.post-cta h2 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.post-tags {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: var(--font-size-sm);
  color: var(--color-heading);
  background: var(--color-border);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  /* ── Header ── */
  :root { --nav-height: 72px; }

  .site-logo img { height: 48px; }

  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-sm) var(--container-padding);
    gap: var(--space-sm);
    box-shadow: var(--nav-shadow);
    z-index: 199;
  }

  .site-nav.is-open { display: flex; }

  /* ── Service page heroes ── */
  .hero-split,
  .hero-contact {
    grid-template-columns: 1fr;
  }

  .hero-split__text {
    padding: var(--space-md) var(--container-padding);
    max-width: 100%;
  }

  .hero-split__image {
    justify-content: center;
    padding: var(--space-md) var(--container-padding) var(--space-md);
    order: -1;
  }

  .hero-split__image img {
    width: 96%;
    margin-inline: auto;
    height: 260px;
    border-radius: 16px;
  }

  /* ── Get in touch hero ── */
  .hero-contact__left {
    padding: var(--space-md) var(--container-padding);
  }

  .hero-contact__write {
    display: none;
  }

  .hero-contact__image {
    padding: var(--space-md) var(--container-padding) var(--space-md);
    justify-content: center;
    order: -1;
  }

  .hero-contact__image img {
    width: 96%;
    margin-inline: auto;
    height: 260px;
    border-radius: 16px;
  }

  /* ── Content grids ── */
  .card-grid,
  .card-grid--2col {
    grid-template-columns: 1fr;
  }

  .websites-layout {
    grid-template-columns: 1fr;
  }

  .websites-columns {
    grid-template-columns: 1fr;
  }

  /* ── Footer ── */
  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  :root { --hero-min-height: 300px; }
}
