:root {
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
}

/* Layout */
header,
section,
footer,
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
}

header {
  padding-top: 72px;
  padding-bottom: 72px;
}

/* Typography */
h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: 40px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 18px;
}

p {
  max-width: 720px;
  opacity: 0.9;
}

/* Header actions */
.header-actions {
  display: flex;
  gap: 12px;
}

/* Base button */
.btn,
.btn:link,
.btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 18px;
  border-radius: 10px;

  font-size: 15px;
  font-weight: 500;
  text-decoration: none;

  border: 1px solid rgba(127, 127, 127, 0.35);
  background: rgba(127, 127, 127, 0.10);
  color: inherit;

  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.05s ease,
    box-shadow 0.15s ease;
}

/* Hover */
.btn:hover {
  background: rgba(127, 127, 127, 0.22);
}

/* Active */
.btn:active {
  background: rgba(127, 127, 127, 0.32);
  transform: translateY(1px);
}

/* Keyboard focus */
.btn:focus-visible {
  outline: 2px solid rgba(127, 127, 127, 0.6);
  outline-offset: 2px;
}

/* Button variants */

/* Secondary button */
.btn-secondary {
  background: transparent;
  border-color: rgba(127, 127, 127, 0.35);
}

.btn-secondary:hover {
  background: rgba(127, 127, 127, 0.12);
}

/* Primary button */
.btn-primary {
  background: rgba(127, 127, 127, 0.35);
  border-color: rgba(127, 127, 127, 0.55);
}

.btn-primary:hover {
  background: rgba(127, 127, 127, 0.55);
}

/* Images */

img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 20px;
}

.img-40 { width: 40%; }
.img-60 { width: 60%; }
.img-80 { width: 80%; }

/* Cards & grids */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.card {
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 14px;
  padding: 24px;
  background: rgba(127, 127, 127, 0.06);
}

/* Navigation */

.site-header {
  padding: 32px 24px;
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 24px;
  margin: 0;
}

.main-nav {
  display: flex;
  gap: 20px;
}

.main-nav a {
  text-decoration: none;
  font-weight: 500;
  opacity: 0.8;
}

.main-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Footer */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;

  text-align: center;
  padding: 24px 16px;
  border-top: 1px solid rgba(127, 127, 127, 0.25);
  font-size: 14px;
  opacity: 0.75;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  display: inline-block;
  margin: 0 12px;
}

.footer-nav a {
  color: inherit;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* Mobile */

@media (max-width: 700px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    gap: 12px;
  }
}

/* Contact form */

.contactform {
  width: 100%;
  margin-top: 24px;
}

.contactform form {
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 14px;
  background: rgba(127, 127, 127, 0.06);
  padding: 24px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  opacity: 0.85;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 12px 14px;

  font-family: inherit;
  font-size: 15px;
  color: inherit;

  background: rgba(127, 127, 127, 0.08);
  border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: 10px;

  box-sizing: border-box;
  margin-bottom: 18px;

  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  background: rgba(127, 127, 127, 0.12);
  border-color: rgba(127, 127, 127, 0.6);
  box-shadow: 0 0 0 2px rgba(127, 127, 127, 0.25);
}

textarea {
  resize: vertical;
  min-height: 160px;
}

input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 18px;
  border-radius: 10px;

  font-size: 15px;
  font-weight: 500;

  border: 1px solid rgba(127, 127, 127, 0.55);
  background: rgba(127, 127, 127, 0.35);
  color: inherit;

  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.05s ease,
    box-shadow 0.15s ease;
}

input[type="submit"]:hover {
  background: rgba(127, 127, 127, 0.55);
}

input[type="submit"]:active {
  background: rgba(127, 127, 127, 0.65);
  transform: translateY(1px);
}

input[type="submit"]:focus-visible {
  outline: 2px solid rgba(127, 127, 127, 0.6);
  outline-offset: 2px;
}

.form-message {
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.85;
}

.form-message.success {
  color: inherit;
}

.form-message.error {
  color: #b00020;
}
