/* White Rose Code -- main stylesheet.
   Single file, CSS custom properties for theming, mobile-first. */

:root {
  --navy: #192947;
  --navy-deep: #0f1a2e;
  --cream: #ede4cd;
  --cream-light: #f7f1e3;
  --slate: #3a4d6e;
  --slate-soft: #5a6d8e;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(15, 26, 46, 0.12);
  --shadow-hover: 0 6px 24px rgba(15, 26, 46, 0.18);

  --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-body: 'Lora', Georgia, serif;

  --max-width: 1100px;
  --gutter: 1.5rem;

  --radius: 6px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--navy-deep);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--slate);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
  border-bottom: 1px solid transparent;
}
a:hover { color: var(--navy); border-bottom-color: var(--navy); }
a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5em;
}
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}
h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin-bottom: 1em; }
strong { font-weight: 600; color: var(--navy); }
ul, ol { margin: 0 0 1em 1.5em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.site-header {
  background: var(--navy);
  padding: 0.5rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  border: none;
}
.brand:hover { border: none; }
.brand img {
  height: 64px;
  width: auto;
}
.primary-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.primary-nav a {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cream);
  border: none;
  padding: 0.5rem 0;
  font-weight: 500;
}
.primary-nav a:hover { color: var(--white); border: none; }
.primary-nav a.is-current { border-bottom: 2px solid var(--cream); }

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  background: linear-gradient(180deg, var(--cream-light) 0%, var(--cream) 100%);
}
.hero h1 { margin-bottom: 0.75rem; }
.hero .tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--slate);
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}
.hero .lead {
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 2rem;
  color: var(--navy-deep);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  border: 2px solid transparent;
}
.btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.btn-primary {
  background: var(--navy);
  color: var(--cream-light);
}
.btn-primary:hover {
  background: var(--navy-deep);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
  border-bottom: 2px solid transparent;
}
.btn-primary:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-secondary:hover {
  background: var(--navy);
  color: var(--cream-light);
  border-bottom: 2px solid var(--navy);
  transform: translateY(-1px);
}

/* Sections */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--cream-light); }
.section-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-heading::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: var(--slate);
  margin: 0.75rem auto 0;
}

/* Principles grid (homepage) */
.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.principle {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--navy);
  box-shadow: var(--shadow);
}
.principle h3 { margin-bottom: 0.5rem; }
.principle p { margin-bottom: 0; font-size: 0.95rem; }

/* Product card */
.product-card {
  background: var(--cream-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 720px) {
  .product-card { grid-template-columns: 1fr 2fr; align-items: start; }
}
.product-card .product-mark { text-align: center; }
.product-card .product-mark img {
  max-width: 220px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
}
.product-card h2 { text-align: left; margin-bottom: 0.5rem; }
.product-card h2::after { display: none; }
.product-card .product-tagline {
  font-style: italic;
  color: var(--slate);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}
.product-card ul {
  list-style: none;
  margin-left: 0;
  margin-bottom: 1.5rem;
}
.product-card ul li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
}
.product-card ul li::before {
  content: "\2766";
  position: absolute;
  left: 0;
  color: var(--slate);
}

/* Prose (about, etc.) */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 {
  text-align: left;
  margin-top: 2rem;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
}
.prose h2::after { display: none; }
.prose h2:first-of-type { margin-top: 0; }
.prose ul { margin-left: 1.5rem; }
.prose ul li { margin-bottom: 0.5rem; }

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto;
}
.contact-form {
  background: var(--cream-light);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.contact-form .form-row { margin-bottom: 1.25rem; }
.contact-form label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.825rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius);
  color: var(--navy-deep);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(25, 41, 71, 0.15);
}
.contact-form textarea { resize: vertical; min-height: 150px; }
.form-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  display: none;
  font-size: 0.95rem;
}
.form-status.is-success {
  display: block;
  background: #d8e7d8;
  color: #1f4d1f;
}
.form-status.is-error {
  display: block;
  background: #f0d4d4;
  color: #6e1f1f;
}
.form-status a { color: inherit; border-bottom-color: currentColor; }

.contact-fallback {
  text-align: center;
  padding: 1.25rem;
  margin-top: 1rem;
}
.contact-fallback p { color: var(--slate); margin: 0; }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: var(--cream);
  padding: 2.5rem 0 1.5rem;
  margin-top: 4rem;
}
.site-footer .container { display: grid; gap: 1.5rem; }
@media (min-width: 720px) {
  .site-footer .container { grid-template-columns: 2fr 1fr 1fr; }
}
.site-footer h4 {
  color: var(--cream-light);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.site-footer p,
.site-footer li { font-size: 0.95rem; color: var(--cream); }
.site-footer ul { list-style: none; margin-left: 0; }
.site-footer ul li { margin-bottom: 0.3rem; }
.site-footer a {
  color: var(--cream);
  border-bottom: 1px solid transparent;
}
.site-footer a:hover {
  color: var(--white);
  border-bottom: 1px solid var(--cream);
}
.legal-line {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(237, 228, 205, 0.2);
  font-size: 0.825rem;
  color: var(--slate-soft) !important;
  text-align: center;
}

/* Accessibility skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: var(--navy);
  color: var(--cream);
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: var(--radius);
}
.skip-link:focus { left: 0.5rem; }
