/* ============================================================
   styles.css — Main stylesheet for rgsimey.scot
   ============================================================
   Sections (search for these):
     1. ROOT VARIABLES (colours, type, rules)
     2. BASE
     3. MASTHEAD
     4. HERO
     5. PRACTICE (skills + map)
     6. WORK
     7. ABOUT
     8. CLIENTS
     9. CONTACT
    10. FOOTER
    11. RESPONSIVE
   ============================================================ */

/* ─── FALLBACK FONTS ──────────────────────────────────
   These match Georgia and Arial's metrics to Playfair / Fraunces / Inter
   so the swap when Google Fonts arrive doesn't cause layout shift.
   ──────────────────────────────────────────────────── */
@font-face {
  font-family: 'Playfair fallback';
  src: local('Georgia');
  size-adjust: 108%;
  ascent-override: 92%;
  descent-override: 25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Fraunces fallback';
  src: local('Georgia');
  size-adjust: 104%;
  ascent-override: 94%;
  descent-override: 26%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter fallback';
  src: local('Arial');
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 22%;
  line-gap-override: 0%;
}


/* ─── 1. ROOT VARIABLES ────────────────────────────── */
:root {
  /* Palette */
  --paper: #f5f1ea;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --rule: #1a1a1a;
  --rule-soft: #b8b0a0;
  --wash: #4a6478;
  --wash-soft: rgba(74, 100, 120, 0.22);
  --accent: #8b3a2e;

  /* Type */
  --font-display: 'Playfair Display', 'Playfair fallback', Georgia, serif;
  --font-body: 'Fraunces', 'Fraunces fallback', Georgia, serif;
  --font-meta: 'Inter', 'Inter fallback', Arial, sans-serif;
}


/* ─── 2. BASE ──────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(139, 58, 46, 0.015) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(107, 138, 158, 0.015) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}


/* ─── 3. MASTHEAD ─────────────────────────────────── */
.masthead {
  padding: 1.25rem 0;
  border-top: 6px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 1.5rem;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-meta);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Hairline under the main border — the broadsheet masthead double-rule */
.masthead::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--rule);
}

.masthead .logo img {
  height: 88px;
  width: auto;
  display: block;
}

.masthead nav { display: flex; gap: 1.75rem; font-weight: 500; }

.masthead nav a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}

.masthead nav a:hover { color: var(--accent); }


/* ─── 4. HERO ─────────────────────────────────────── */
.hero {
  padding: 3.5rem 0 4.5rem;
  border-bottom: 3px solid var(--rule);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text {
  min-width: 0;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.25rem, 9vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.hero h1 .surname {
  display: block;
  color: var(--ink);
}

.hero .role {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.hero .role em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  font-size: 1.05em;
}

.hero .standfirst {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 2rem;
}

.hero .standfirst strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hero-cta a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--paper);
  background: var(--ink);
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s, color 0.2s;
}

.hero-cta a:hover {
  background: var(--accent);
  color: var(--paper);
}

.hero-cta a span {
  transition: transform 0.2s;
}

.hero-cta a:hover span {
  transform: translateX(3px);
}

.hero-cta-meta {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}


/* ─── 5. PRACTICE (skills list only — map has moved to hero) */
.practice {
  padding: 4.5rem 0;
  border-bottom: 3px solid var(--rule);
}

.skills-list {
  list-style: none;
}

.skills-list li {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
  align-items: baseline;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule-soft);
}

.skills-list li:last-child {
  border-bottom: none;
}

.skills-list .skill-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.2;
  color: var(--ink);
}

.skills-list .skill-detail {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Map frame & SVG sizing (used by hero) */
.map-frame {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.map-svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  overflow: visible;
}

.map-caption {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  width: 100%;
  max-width: 380px;
}

.map-caption em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  font-size: 1.05em;
}


/* ─── 6. WORK ─────────────────────────────────────── */
.work {
  padding: 4.5rem 0;
  border-bottom: 3px solid var(--rule);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--rule);
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 2.5rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.section-head .meta {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 2.5rem;
}

.project {  cursor: pointer;
            text-decoration: none !important; 
            color: var(--ink) !important; 
          }


.project-image {
  background: #e8e3d8;
  aspect-ratio: 4 / 3;
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--rule);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project:hover .project-image img { transform: scale(1.02); }

.project-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8e3d8, #d8d2c5);
  color: var(--ink-soft);
  font-family: var(--font-meta);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.project-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.project-client {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--ink-soft);
}


/* ─── 7. ABOUT ────────────────────────────────────── */
.about {
  padding: 4.5rem 0;
  border-bottom: 3px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: flex-start;
}

.about-image {
  background: #e8e3d8;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--rule);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image .caption {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  font-family: var(--font-meta);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  padding: 0.3rem 0.55rem;
  font-weight: 500;
}

.about-text h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--rule);
}

.about-text p {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 1.25rem;
  max-width: 34rem;
}

.about-text p.lineage {
  border-left: 4px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1.45;
  margin: 2.5rem 0;
  font-weight: 400;
}

.about-text .gaelic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
}

.about-text a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-soft);
}
.about-text a:hover { border-bottom-color: var(--accent); }


/* ─── 8. CLIENTS ──────────────────────────────────── */
.clients {
  padding: 4rem 0;
  border-bottom: 3px solid var(--rule);
}

.clients h2 {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2rem;
  padding-bottom: 0.875rem;
  border-bottom: 2px solid var(--rule);
}

.clients-list {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  line-height: 1.5;
  color: var(--ink);
  columns: 2;
  column-gap: 3rem;
}

.clients-list span {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule-soft);
  break-inside: avoid;
}

.clients-list em {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.7em;
  margin-left: 0.5rem;
  font-weight: 300;
}


/* ─── 9. CONTACT ──────────────────────────────────── */
.contact {
  padding: 5rem 0;
  text-align: center;
}

.contact h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.contact h2 em {
  font-weight: 400;
  font-style: italic;
  color: var(--ink-soft);
  display: block;
  font-size: 0.65em;
  margin-top: 0.3rem;
}

.contact p {
  font-family: var(--font-body);
  font-size: 1.125rem;
  color: var(--ink);
  max-width: 32rem;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.contact a.email {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--paper);
  background: var(--ink);
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  display: inline-block;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.contact a.email:hover {
  background: var(--accent);
  color: var(--paper);
  transform: translateY(-1px);
}


/* ─── 10. FOOTER ──────────────────────────────────── */
footer {
  padding: 2.5rem 0;
  border-top: 4px solid var(--rule);
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-mark .logo img {
  height: 88px;
  width: auto;
  display: block;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  text-align: right;
}

.footer-social {
  display: flex;
  gap: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--rule);
  color: var(--ink);
  border-radius: 50%;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.footer-social a:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.footer-social svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.footer-social .label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}


/* ─── SUBPAGE STYLES ───────────────────────────────
   Used by books / maps / print / branding / logos / websites
   ───────────────────────────────────────────────── */

.page-hero {
  padding: 3.5rem 0 3rem;
  border-bottom: 3px solid var(--rule);
}

.page-hero .back-link {
  display: inline-block;
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.page-hero .back-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.page-hero .standfirst {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 44rem;
}

.gallery {
  padding: 4rem 0;
  border-bottom: 3px solid var(--rule);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 2.5rem;
}

.gallery-item {
  display: block;
  text-decoration: none;
  color: var(--ink);
}

.gallery-figure {
  background: #e8e3d8;
  aspect-ratio: 4 / 3;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--rule);
}

.gallery-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-figure img { transform: scale(1.02); }

.gallery-item h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.gallery-item p {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.gallery-item p a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-soft);
}
.gallery-item p a:hover { border-bottom-color: var(--accent); }


/* ─── 11. RESPONSIVE ──────────────────────────────── */
/* Tablet / smaller desktop — keep hero side by side, shrink everything */
@media (max-width: 800px) {
  html { font-size: 15px; }
  .container { padding: 0 1.25rem; }

  /* Hero stays 2-column but tighter */
  .hero {
    gap: 1.75rem;
    padding: 2.5rem 0 3rem;
    grid-template-columns: 1.4fr 1fr;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 9vw, 4.5rem);
  }

  .hero .role {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .hero .standfirst {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .map-svg { max-width: 220px; }
  .map-caption { max-width: 220px; font-size: 0.65rem; }

  .practice { padding: 3.5rem 0; }

  .skills-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 1rem 0;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about-image {
    aspect-ratio: 4 / 5;
    max-width: 320px;
  }

  .clients-list { columns: 1; }

  .masthead {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  /* Subpages */
  .page-hero { padding: 2.5rem 0 2.5rem; }
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Footer stacks */
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .footer-meta {
    align-items: flex-start;
    text-align: left;
  }
}

/* Phone — stack the hero, since the map gets too tiny otherwise */
@media (max-width: 520px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 13vw, 4rem);
  }

  .hero .standfirst {
    font-size: 1.0625rem;
  }

  .map-svg { max-width: 200px; }
  .map-caption { max-width: 200px; }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
