/* =========================
1. FONTS
========================= */
/* noto-serif */
@font-face {
  font-family: 'Noto Serif';
  src: url('/fonts/NotoSerif-welsh-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Serif';
  src: url('/fonts/NotoSerif-welsh-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Inter */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-welsh-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-welsh-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* =========================
2. VARIABLES
========================= */
:root {
  --primary: #232021ff;
  --bg: #FAF7F5ff;
  --grey: #828489ff;
  --accent: #f28123ff;
  --accent-2: #335f84ff;
  --accent-3: #3d6e42ff;

  --radius-asym: 12px 0 12px 0 ;
  --radius-sym: 12px;
  --shadow: 0 4px 10px rgba(0,0,0,0.25);
  --spacing: 20px;
  --item-width: 33%;

  --star-size: 1.5rem;
  --star-color: #ccc;
  --star-fill: #f5b50a;

  scrollbar-color: var(--accent-2) var(--bg);
}

/* =========================
3. RESET / GLOBAL
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--primary);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
}

.contact-main {
  display: flex;
  flex-direction: column;
}

.contact-main p {
  max-width: 80%;
  margin: 0 auto 15px auto;
}

.contact-hero, .contact-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (min-width: 768px) {
  .contact-main {
    flex-direction: row;
    align-items: stretch;
  }

  .contact-hero {
    align-self: stretch;
  }

  .contact-hero, .contact-container {
    flex: 1;
  }
}

img:not(.logo) {
  max-width: 100%;
  display: inline-block;
  margin: 40px;
}

h1, h2, h3 {
  font-family: 'Noto Serif', serif;
  margin-bottom: 10px;
  text-wrap: balance;
  font-weight: 600; 
}

h1 { 
  text-align: center;
}

p {
  margin-bottom: 15px;
  line-height: 1.6;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =========================
4. LISTS & ICONS
========================= */
nav ul,
.contact-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-card ul {
  display: inline-block;
  text-align: left;
  margin-top: var(--spacing);
}

.contact-card {
  color: var(--primary);
}

.contact-card li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.contact {
  font-size: 1.2rem;
  margin-bottom: var(--spacing);
}

.contact:hover {
  color: var(--accent);
}

.contact-card svg {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  color: inherit; /* works with currentColor in SVG */
}

/* =========================
5. LAYOUT
========================= */
.container {
  max-width: 95%;
  margin: 0 auto;
  padding: 30px 20px;
  border-bottom: 4px solid var(--accent-3);
}

.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.about-intro {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: nowrap;
}

.container:last-of-type {
  border-bottom: none;
}

.icon {
  width: 80%;
  height: auto;
  margin: 0 auto;
}

.contact-card {
  text-align: center;
}

.text-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 0;
  min-width: 0;
  margin: var(--spacing) auto;
}

.about-intro:first-of-type .text-container {
  text-align: right;
  max-width: 600px;
}

.about-intro:first-of-type {
  justify-content: center;
  border-bottom: 4px solid var(--accent-3);
}

.content-image {
  display: block;
  flex: 0 0 250px;
  width: 250px;
  height: auto;
  margin: 0;
  border-radius: 100vw;
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .about-intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .about-intro .content-image {
    order: -1;
    width: min(250px, 80vw);
    margin: 0 0 0.5rem;
  }

  .about-intro:first-of-type .text-container {
    width: 100%;
    text-align: center;
  }

}

#nacs-logo{
  margin: var(--spacing);
  height: 150px;
  width: auto;
}

.text-container:nth-of-type(2) {
  border-bottom: 4px solid var(--accent-3);
}


/* =========================
6. HEADER / NAV
========================= */
header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo {
  height: 80px;
  flex: 0 0 auto;
}

.nav-right {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.menu {
  position: fixed;
  inset: 0;
  background: var(--primary);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.menu.active {
  display: flex;
}

.menu a {
  color: var(--bg);
  font-size: 1.5rem;
}

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

.menu li {
  margin-bottom: 0;
}

.menu.active li {
  margin-bottom: 20px;
}

.menu:not(.active) .long-item {
  display: inline-block;
  max-width: 90px;
  text-align: center;
}

.toggle {
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--bg);
  cursor: pointer;
}

.toggle svg {
  width: 1.8rem;
  height: 1.8rem;
  display: block;
}

.close {
  position: absolute;
  top: 43.6px;
  right: 2rem;
}

.toggle:hover,
.close:hover {
  color: var(--accent);
}

/* =========================
7. HERO
========================= */
.hero {
  padding: 60px 20px 20px 20px;
  text-align: center;
  background: var(--accent-2);
  color: var(--bg);
}

.container.hero-card {
  color: var(--primary);
  background: rgba(250, 247, 245, 0.55);
  backdrop-filter: blur(4px);
  padding: 2.5rem;
  border-radius: 8px;
  max-width: 800px;
}

.main-page {
  background-image: url('/images/LlynPadarnAlt.webp');
  background-size: cover;
  background-position: 50% 25%;
}

.services-hero {
  background-image: url('/images/TomSweeping.jpeg');
  background-size: cover;
  background-position: 50% 30%;
}

.hero h1 { font-size: 2.2rem;}
.hero h2 { font-size: 1.8rem; }

.hero p {
  margin: 20px auto;
  font-size: 1.1rem;
}

/* =========================
9. SERVICES
========================= */

.services-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(300px ,1fr));
  grid-auto-rows: auto;
}

.service {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  padding: var(--spacing);
  border-radius: var(--radius-asym);
  border: 3px solid var(--grey);
  box-shadow: var(--shadow);
  align-items: center;
}

.service .book-btn {
  justify-self: center;
}

use {
  fill: var(--primary);
}

.service:hover {
  box-shadow: inset 5px 0 0 var(--accent-3);
  border-color: var(--accent-3);
  background: white;
}

/* Deferred styles moved to styles-deferred.css to reduce render-blocking for LCP */

#smoke {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
}

#setmore-booking {
  scroll-margin-top: 15vh;
}

/* =========================
13. BUTTONS
========================= */

.btn, .btn-alt, .btn-2 {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
}

.btn {
  height: 56px;
  padding: 14px 40px;
  border-radius: calc(56px/5);
  
  font-size: 1rem;
}

.book-btn > .btn, .btn-2 {
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}

.btn, .btn-2{
  background: var(--accent);
  color: var(--primary);
}

.btn-alt, .btn-2 {
  padding: 10px 30px;
  margin-top: 10px;
  height: 44px;
  border-radius: calc(44px/5);
  font-size: 0.9rem;
}

.btn-alt {
  background: transparent;
  border: 3px solid var(--accent-2);
  color: var(--accent-2);
}

.lang-btn {
  background: transparent;
  color: var(--bg);
  padding: 6px 20px;
  height: 32px;
  border-radius: calc(32px/5);
  border: 1.5px solid var(--bg);
  font-size: 0.875rem;
  font-weight: 600;
}

.btn:hover {
  background: #d96e18;
}

.btn-2:hover {
  background: var(--accent-3);
  color: var(--bg);
}

.lang-btn:hover,
.btn-alt:hover {
  background: var(--accent-2);
  color: var(--bg);
}

.book-btn:after,
.btn-cy:after {
  font-size: 10px;
  margin-top: 5px !important;
  display: block;
  text-align: center;
}

.book-btn:after {
  content: "No upfront payment required.";
}

.btn-cy:after {
  content: "Nid oes angen taliad ymlaen llaw.";
}

/* =========================
14. FOOTER
========================= */
footer {
  padding: 2rem 2rem;
  background: var(--primary);
  color: var(--bg);
}

.footer-content {
  display: flex;
  justify-content: space-between;
}

.footer-content p {
  margin: 0;
}

.social-links {
  display: flex;
  gap: var(--spacing);
}

.social-links a svg {
  width: 1.5rem;
  display: block;
  color: var(--bg);
}

.social-links a:hover svg {
  color: var(--accent);
}

/* =========================
15. MEDIA QUERIES
========================= */

/* Tablet */
@media (min-width: 685px) {

  .container {
    max-width: 85%;
  }
}

/* Desktop */
@media (min-width: 990px) {

  .menu {
    position: static;
    display: flex !important;
    flex-direction: row;
    background: none;
    height: auto;
    width: auto;
    order: 2; 
    margin: 0 20px; 
  }

  .menu a {
    font-size: 1rem;
  }

  .toggle,
  .close {
    display: none;
  }

   li {
    padding: 0 10px;
  }

  .menu li:nth-child(1) {
    padding: 0;
  }

  nav {
    justify-content: space-between;
  }
  
  nav strong {
    order: 1; 
  }

  .nav-right {
     order: 3; 
  }

  .hero h1 {
    font-size: 3rem;
  }
  .hero h2 {
    font-size: 2rem;
  }
}