/* Compiled output, committed so a deploy never depends on a build step
   running on the server (DEPLOYMENT.md §4.5). Once the Tailwind build is
   wired up, edit assets/src/template.css and rebuild — not this file.

   No Tailwind preflight: platform-base ships a scoped reset that does not
   fight core block styles (TEMPLATE-STANDARD.md §5).

   Every colour and space below resolves through theme.json, so changing
   palette_slots restyles the whole template without touching this file.
   Budget: 60KB. */

/* ---------------------------------------------------------------- type */

body {
  font-family: var(--wp--preset--font-family--sans, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  color: var(--wp--preset--color--text);
  background: var(--wp--preset--color--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Fluid, but clamped. Customers replace headings with longer text than
   you designed for, and an unclamped vw scale breaks at both ends. */
h1, .wp-block-post-title {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-block: 0 0.6em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 650;
  margin-block: 2.2em 0.5em;
  text-wrap: balance;
}

h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  line-height: 1.3;
  font-weight: 650;
  margin-block: 1.8em 0.4em;
}

p, li {
  /* A readable measure. Without this, text runs the full width of a
     desktop window and nobody finishes a sentence. */
  max-width: 68ch;
}

p { margin-block: 0 1.15em; }

.wp-block-group > :first-child,
.wp-block-cover__inner-container > :first-child { margin-block-start: 0; }

a { text-underline-offset: 0.18em; }

/* ------------------------------------------------------------ sections */

.drovi-section {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, var(--wp--preset--spacing--50, 4rem));
}

.drovi-section + .drovi-section {
  border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--text) 10%, transparent);
}

/* --------------------------------------------------------------- hero */

.wp-block-cover {
  min-height: clamp(22rem, 55vh, 34rem);
}

.wp-block-cover .wp-block-cover__inner-container {
  text-align: center;
}

.wp-block-cover h1,
.wp-block-cover p {
  color: var(--wp--preset--color--surface);
  margin-inline: auto;
}

.wp-block-cover p {
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
  opacity: 0.92;
}

/* ------------------------------------------------------------- header */

.drovi-header {
  padding-block: var(--wp--preset--spacing--30);
  gap: var(--wp--preset--spacing--30);
  border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--text) 10%, transparent);
}

.drovi-header .wp-block-site-title a {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--wp--preset--color--text);
}

.drovi-header .wp-block-navigation {
  gap: clamp(0.75rem, 2vw, 1.75rem);
  font-size: 0.95rem;
}

.drovi-header .wp-block-navigation a {
  text-decoration: none;
  color: color-mix(in srgb, var(--wp--preset--color--text) 78%, transparent);
}

.drovi-header .wp-block-navigation a:hover,
.drovi-header .wp-block-navigation .current-menu-item a {
  color: var(--wp--preset--color--accent);
}

/* ------------------------------------------------------------- footer */

.drovi-footer {
  padding-block: var(--wp--preset--spacing--40);
  margin-block-start: var(--wp--preset--spacing--50);
  border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--text) 15%, transparent);
  font-size: 0.925rem;
  color: color-mix(in srgb, var(--wp--preset--color--text) 72%, transparent);
}

/* -------------------------------------------------------------- images */

/* Customers upload whatever they have. A fixed height would break; a
   ratio plus object-fit crops instead (TEMPLATE-STANDARD.md §13.6). */
.wp-block-image img { height: auto; max-width: 100%; border-radius: 2px; }
.wp-block-image { margin-block: 1.75em; }

.drovi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.drovi-grid .wp-block-image { margin-block: 0; }
.drovi-grid .wp-block-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Marks a block the customer is expected to replace. The dashboard
   checklist and the completeness gate key off the manifest, not this
   class, so it is presentational only. */
.drovi-editable { position: relative; }

.drovi-free-content { margin-block-start: var(--wp--preset--spacing--40); }

/* ------------------------------------------------------------ buttons */

.wp-block-button__link,
.drovi-contact-form button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--surface);
  border: 0;
  border-radius: 2px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}

.wp-block-button__link:hover,
.drovi-contact-form button:hover {
  background: color-mix(in srgb, var(--wp--preset--color--accent) 85%, black);
}

/* Visible focus on everything interactive. Never outline: none. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------- form */

.drovi-contact-form { margin-block-start: 1.5rem; }
.drovi-contact-form p { max-width: 32rem; }
.drovi-contact-form label { display: block; font-weight: 600; margin-block-end: 0.3rem; }
.drovi-contact-form input,
.drovi-contact-form textarea {
  width: 100%;
  max-width: 32rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--text) 30%, transparent);
  border-radius: 2px;
  background: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--text);
  font: inherit;
}
.drovi-contact-form input:focus,
.drovi-contact-form textarea:focus { border-color: var(--wp--preset--color--accent); }

.drovi-contact-form__errors,
.drovi-contact-form__ok {
  max-width: 32rem;
  padding: 0.7rem 0.9rem;
  border-inline-start: 3px solid var(--wp--preset--color--accent);
  background: color-mix(in srgb, var(--wp--preset--color--accent) 8%, transparent);
  font-weight: 500;
}

/* -------------------------------------------------------------- mobile */

/* Polish local-business traffic is mobile-majority: every section has to
   survive 360px (TEMPLATE-STANDARD.md §6). */
@media (max-width: 480px) {
  .wp-block-cover { min-height: 60vh; }
  .drovi-header { flex-direction: column; align-items: flex-start; }
}

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