/* =======================================
   Reset, perustyyli & saavutettavuus
   Jo Designs
======================================= */

/* =================================================================
   2. RESET & BASE STYLES
   ================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =================================================================
   3. ACCESSIBILITY IMPROVEMENTS
   ================================================================= */

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--golden-ochre);
  color: white;
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  z-index: var(--z-tooltip);
  border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
  top: 0;
}

/* Focus styles - WCAG 2.1 compliant */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
  outline: 3px solid var(--golden-ochre);
  outline-offset: 2px;
}

/* Focus visible (for keyboard navigation) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--golden-ochre);
  outline-offset: 2px;
}

/* Remove outline for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-text: #000;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


body {
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.7;
  margin: 0;
  padding: 0;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  overflow-wrap: break-word;
  background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: 0.02em;
  line-height: clamp(1.2, 1vw + 1.1, 1.4);
  margin-bottom: 0.8em;
  font-style: normal;
  font-weight: 500;
}

h1 { font-size: clamp(1.9rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.6rem, 2.5vw, 2rem); }
h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem); }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.3rem); }

p, li, span {
  font-family: var(--font-body);
  line-height: 1.7;
  hyphens: auto;
  overflow-wrap: break-word;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover
{
	text-decoration: underline;
	color: var(--rose-gold);
}

a:focus-visible,
.btn:focus-visible,
.jo-btn:focus-visible,
.button-custom:focus-visible {
  text-decoration: underline;
	outline: 1px solid var(--golden-ochre);     /* lämmin kultainen kehys */
  outline-offset: 3px;
  border-radius: 0;
  box-shadow: 0 0 0 4px rgba(185,149,93,0.35); /* pehmeä hehku */
  text-decoration: none;
  transition: box-shadow 0.25s ease, outline 0.25s ease;
}

.btn:hover:focus-visible,
.jo-btn:hover:focus-visible,
.button-custom:hover:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.services-hero h1,
.hero-intro__text h1,
.brand-hero h1,
.marketing-hero h1,
.web-hero h1,
.va-hero h1,
.author-hero h1,
.contact-hero h1 {
  font-family: var(--font-heading);
  color: #604573;
  line-height:1.25;
  margin-bottom: clamp(0.5rem, 0.8vw, 0.8rem);
  word-break: break-word;
}

@media (max-width: 768px) {
.services-hero h1,
.hero-intro__text h1,
.brand-hero h1,
.marketing-hero h1,
.web-hero h1,
.va-hero h1,
.author-hero h1,
.contact-hero h1,
.divider-title {
 font-size: 1.8rem;
 line-height: 1.15;
 word-break: break-word;}
}
		
