/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.scotland-theme {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1b1b2a;
  background-color: #f5f5fb;
}

/* Layout helpers */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.section {
  padding: 64px 0;
}

.section-alt {
  background-color: #f1f2fa;
}

/* Header and nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.tartan-strip {
  height: 4px;
  background-image:
    linear-gradient(90deg, #6b4ea0 0, #c6a2ff 25%, #5b2d82 50%, #c6a2ff 75%, #6b4ea0 100%);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto; /* logo | nav | login */
  align-items: center;
  padding: 10px 0;
  column-gap: 16px;
}

/* Logo block */
.logo-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  height: 64px;
  width: auto;
}

.saltire-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4ff;
  font-size: 0.78rem;
  color: #2b2f5a;
}

.saltire-flag {
  width: 18px;
  height: 12px;
  background:
    linear-gradient(135deg, transparent 40%, #ffffff 40%, #ffffff 60%, transparent 60%),
    linear-gradient(45deg, transparent 40%, #ffffff 40%, #ffffff 60%, transparent 60%);
  background-color: #005eb9;
  border-radius: 2px;
}

.saltire-text {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Nav */
.main-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 0.9rem;
}

.main-nav a {
  text-decoration: none;
  color: #1b1b2a;
  padding: 6px 8px;
  border-radius: 999px;
}

.main-nav a:hover {
  background: #edf0ff;
}

/* Header actions – login only */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Buttons – base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease;
}

.btn-primary {
  background: #005eb9;
  color: #ffffff;
  padding: 10px 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  background: #004f9c;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

/* Secondary & tertiary buttons */
.btn-secondary {
  background: #ffffff;
  color: #1b1b2a;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid #cbd0e5;
}

.btn-secondary:hover {
  background: #f7f8ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-tertiary {
  background: #ffffff;
  color: #005eb9;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #cbd0e5;
  font-size: 0.85rem;
}

.btn-tertiary:hover {
  background: #f7f8ff;
  transform: translateY(-1px);
}

/* Header login – hero “gateway” */
.header-login {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 10px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2d1e6f, #4c35a8);
  box-shadow: 0 6px 18px rgba(19, 9, 66, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.header-login:hover,
.header-login:focus-visible {
  background: linear-gradient(135deg, #3b29a0, #7050ff);
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 10px 26px rgba(22, 10, 80, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.55);
  outline: none;
}

.header-login:focus-visible {
  box-shadow:
    0 10px 26px rgba(22, 10, 80, 0.55),
    0 0 0 2px #ffffff,
    0 0 0 4px #4c35a8;
}

/* Hero */
.hero {
  position: relative;
  padding: 64px 0 56px;
  background: radial-gradient(circle at top left, #e2e5ff, #f5f5fb 44%, #fdfdff 100%);
  overflow: hidden;
}

.hero-diagonal {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(107, 78, 160, 0.2), transparent 55%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.hero-copy h1 {
  font-size: 2.2rem;
  margin: 0 0 12px;
  color: #1a1635;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  background: #f3f4ff;
  color: #45357a;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.hero-copy p {
  margin: 0 0 16px;
  color: #4a4f6f;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.hero-cta {
  padding-inline: 26px;
}

.hero-secondary {
  font-size: 0.9rem;
}

.hero-support-text {
  font-size: 0.88rem;
  color: #5b5f7c;
  margin-top: 8px;
}

/* Hero panel */
.hero-panel {
  display: flex;
  justify-content: flex-end;
}

.hero-panel-box {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  max-width: 300px;
  border: 1px solid #e2e4f5;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hero-panel-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  border-color: rgba(0, 0, 0, 0.08);
}

.hero-panel-box h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.hero-phone {
  font-weight: 600;
  color: #005eb9;
}

/* Postcode form in hero panel */
.postcode-form {
  margin-top: 14px;
}

.postcode-form label {
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.postcode-row {
  display: flex;
  gap: 8px;
}

.postcode-row input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #cbd0e5;
  font: inherit;
}

.postcode-help {
  font-size: 0.8rem;
  color: #6b6f8a;
  margin-top: 4px;
}

/* Section titles */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  margin: 0 0 16px;
  color: #1b1835;
}

.section-title-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background-image: url("thistle.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Body text in sections */
.section p {
  max-width: 640px;
  color: #4a4f6f;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(220, 224, 243, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  border-color: rgba(0, 0, 0, 0.08);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

/* Soft panel background (no tartan) */
.soft-panel-background {
  background: radial-gradient(circle at top left, #dcdff7, #272342 40%, #1a1635 100%);
  color: #ffffff;
}

.soft-panel-background .section-title {
  color: #ffffff;
}

.soft-panel-background p {
  color: #f5f5ff;
}

.soft-panel-background .card {
  background: rgba(10, 8, 28, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
}

.soft-panel-background .card h3,
.soft-panel-background .card p {
  color: #ffffff;
}

/* Values cards */
.value-card {
  border-top: 3px solid #cdb5ff;
}

/* Three columns (about) */
.three-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

/* Locations */
.card-location h3 {
  margin-bottom: 6px;
}

/* Testimonials */
.testimonial-name {
  font-size: 0.88rem;
  color: #d7d7ff;
  margin-top: 10px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
}

.contact-form .form-row {
  margin-bottom: 12px;
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cbd0e5;
  font: inherit;
}

.checkbox-row label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.85rem;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 2px;
}

.form-status {
  font-size: 0.85rem;
  margin-top: 6px;
}

/* Footer */
.site-footer {
  margin-top: 32px;
  background: #121226;
  color: #e4e4ff;
  font-size: 0.85rem;
}

.footer-tartan {
  background-image:
    linear-gradient(90deg, #6b4ea0 0, #c6a2ff 25%, #5b2d82 50%, #c6a2ff 75%, #6b4ea0 100%);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 16px 24px;
}

.footer-branch {
  text-align: right;
}

/* Responsive tweaks */
@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: auto auto;
    row-gap: 8px;
  }

  .main-nav {
    display: none;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .header-inner {
    grid-template-columns: 1fr;
    row-gap: 8px;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .section {
    padding: 48px 0;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    text-align: left;
  }

  .footer-branch {
    text-align: left;
  }
}
