/*
Theme Name: Sunward Legal
Theme URI: https://sunwardlegal.com
Author: Sunward Legal
Description: Tema a medida de Sunward Legal — editorial escandinavo: Cormorant Garamond + Inter, crema/tinta/latón, amanecer animado y aves migratorias. Diseñado para Rank Math + Polylang + LiteSpeed Cache.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: Proprietary
Text Domain: sunward
*/

/* ============================================================
   SUNWARD LEGAL — Scandinavian editorial mockup
   Restraint, whitespace, hairlines. Cormorant Garamond + Inter.
   ============================================================ */

:root {
  --bg:        #faf8f3;   /* warm white */
  --sand:      #f2eee4;   /* soft sand for alternate sections */
  --ink:       #1d1c18;   /* warm near-black */
  --ink-soft:  #4a483f;
  --ink-mute:  #8a8678;
  --cream:     #f4f1e8;
  --brass:     #a8813c;   /* single muted accent, used sparingly */
  --hairline:  rgba(29, 28, 24, 0.14);
  --hairline-dark: rgba(244, 241, 232, 0.18);
  --ease:      cubic-bezier(.25, .7, .3, 1);
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 300;
  font-size: 1.04rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.frame { max-width: 1180px; margin-inline: auto; padding-inline: clamp(1.4rem, 5vw, 3.5rem); }

em { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; }

/* ---------- shared type ---------- */
.caption {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-mute);
}
.kicker {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.section-no {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 1.1rem;
  border-top: 1px solid var(--hairline);
  margin-bottom: clamp(3rem, 7vw, 5rem);
}
.accent-line { color: var(--brass); font-size: 1.12em; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: 1180px;
  margin-inline: auto;
  padding: 1.15rem clamp(1.4rem, 5vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.brand em { color: var(--brass); }
.brand-mark { flex-shrink: 0; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.3s var(--ease);
}
.nav-links a:hover { color: var(--brass); }
.lang { display: flex; align-items: center; gap: 0.5rem; }
.lang-sep { color: var(--hairline); font-size: 0.8rem; }
.lang-btn {
  font: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink-mute);
  padding: 0.2rem 0.1rem;
  transition: color 0.3s var(--ease);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active { color: var(--ink); border-bottom: 1px solid var(--brass); }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 2rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--cream); }
.btn-light { border-color: var(--cream); color: var(--cream); }
.btn-light:hover { background: var(--cream); color: var(--ink); }

.link-quiet {
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--hairline);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
  align-self: flex-start;
}
.link-quiet:hover { color: var(--brass); border-color: var(--brass); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(4rem, 9vw, 7.5rem) clamp(3rem, 7vw, 5.5rem); }
.hero .kicker { margin-bottom: clamp(2.2rem, 5vw, 3.6rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.hero-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(2.9rem, 6.4vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 15ch;
}
.hero-title em { font-weight: 400; color: var(--brass); }
.hero-sub {
  margin-top: 2rem;
  max-width: 46ch;
  color: var(--ink-soft);
}
.hero-sub em { font-size: 1.08em; }
.hero-actions {
  margin-top: 2.8rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.hero-fig { text-align: center; }
.hero-fig svg { width: 100%; max-width: 460px; height: auto; color: var(--ink-soft); }
.hero-fig .caption { display: block; margin-top: 0.8rem; }
.sun-line { stroke: var(--brass); stroke-width: 1.3; }
.dot-fill { fill: var(--brass); stroke: none; }
.south-fill { fill: var(--brass); stroke: var(--brass); }
.compass-letter {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 20px;
  fill: var(--ink-mute);
  stroke: none;
}

/* ---------- areas strip ---------- */
.strip {
  border-block: 1px solid var(--hairline);
  padding-block: 1.1rem;
  text-align: center;
}
.strip p {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.strip em {
  font-size: 1.25em;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--brass);
}

/* ---------- sections ---------- */
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section-sand { background: var(--sand); }
.section-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  line-height: 1.08;
  margin-bottom: clamp(2.6rem, 6vw, 4.5rem);
  text-wrap: balance;
}
.section-title em, .split-title em, .split-title-sm em { color: var(--brass); }

.section-dark { background: var(--ink); color: var(--cream); }
.section-dark .section-no { color: rgba(244, 241, 232, 0.5); border-color: var(--hairline-dark); }
.section-dark .caption { color: rgba(244, 241, 232, 0.55); }

/* split editorial layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
}
.split-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.12;
  text-wrap: balance;
}
.split-title-sm {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 1.4rem;
  text-wrap: balance;
}
.split-body p + p { margin-top: 1.2rem; }
.split-body .caption { margin-top: 1.4rem; }
.split-body .btn { margin-top: 2.2rem; }

/* ---------- practice cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}
.card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hairline);
}
.card-no {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--brass);
}
.card svg { width: 46px; height: 46px; color: var(--ink-soft); }
.card h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
}
.card p { color: var(--ink-soft); font-size: 0.96rem; flex-grow: 1; }

/* ---------- practice duo: business / personal ---------- */
.section-lede {
  max-width: 56ch;
  color: var(--ink-soft);
  margin-top: -1.6rem;
  margin-bottom: clamp(2.8rem, 6vw, 4.5rem);
}
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}
.duo-col {
  border-top: 1px solid var(--ink);
  padding-top: 1.6rem;
  display: flex;
  flex-direction: column;
}
.duo-label {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.05;
}
.duo-label em { color: var(--brass); }
.duo-intro {
  margin-top: 0.5rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--ink-mute);
  font-size: 1.05rem;
}
.services {
  list-style: none;
  margin-block: 1.8rem 2rem;
}
.services li {
  padding-block: 1.15rem;
  border-top: 1px solid var(--hairline);
}
.services li:last-child { border-bottom: 1px solid var(--hairline); }
.services h4 {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}
.services p {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---------- svenska ---------- */
.fig-min { text-align: center; }
.fig-min svg { width: min(300px, 75%); height: auto; color: var(--ink-soft); }
.fig-min .caption { display: block; margin-top: 0.8rem; }

/* ---------- insights ---------- */
.posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}
.post {
  border-top: 1px solid var(--hairline);
  padding-top: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  cursor: pointer;
}
.post-meta {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.post h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.2;
  transition: color 0.3s var(--ease);
}
.post:hover h3 { color: var(--brass); }
.post p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- contact ---------- */
.contact-note { margin-top: 1.4rem; color: rgba(244, 241, 232, 0.75); max-width: 44ch; }
.contact-meta { margin-top: 2rem; line-height: 2; }
.contact-form { display: flex; flex-direction: column; gap: 1.6rem; }
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(244, 241, 232, 0.6);
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  font-weight: 300;
  font-size: 1rem;
  color: var(--cream);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline-dark);
  padding: 0.55rem 0;
  resize: vertical;
  transition: border-color 0.3s var(--ease);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(244, 241, 232, 0.3); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--brass);
}
.contact-form .btn-light { align-self: flex-start; margin-top: 0.4rem; }
.form-ok { color: var(--brass); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  padding-block: 1.8rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
}
.footer-draft { color: var(--brass); }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* defensive rule — split elements must never stay hidden */
.reveal[data-split] { opacity: 1; transform: none; }
/* no-JS safety */
@media (scripting: none) { .reveal { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .posts { grid-template-columns: 1fr; }
  .strip p { letter-spacing: 0.18em; }
}
@media (max-width: 560px) {
  .hero-title { font-size: clamp(2.3rem, 11vw, 3rem); }
  .hero-actions { gap: 1.2rem; }
}


/* ---------- living logo & migrating birds ---------- */
/* Nav: the sun breathes along its southbound diagonal */
.mark-sun {
  animation: sunDrift 5s ease-in-out infinite alternate;
}
@keyframes sunDrift {
  from { transform: translate(0, 3px); }
  to   { transform: translate(0, -1px); }
}
.brand:hover .mark-sun { animation-duration: 2s; }

/* Hero Fig. 01: the sun arrives from the north-east, then settles */
.fig-sun {
  animation: sunRise 9s linear both,
             sunSettle 8s ease-in-out 9s infinite alternate;
}
/* Amanecer en arco: emerge tras el horizonte por la izquierda y
   asciende curvándose hacia su posición, decelerando como el sol real */
@keyframes sunRise {
  0%   { transform: translate(-150px, 142px); }
  20%  { transform: translate(-122px, 100px); }
  40%  { transform: translate(-92px, 64px); }
  60%  { transform: translate(-62px, 35px); }
  80%  { transform: translate(-31px, 14px); }
  100% { transform: translate(0, 0); }
}
@keyframes sunSettle {
  from { transform: translate(0, 0); }
  to   { transform: translate(3px, -4px); }
}

/* The dotted trajectory marches southward */
.fig-path {
  animation: pathMarch 2.6s linear infinite;
}
@keyframes pathMarch {
  to { stroke-dashoffset: -20; }
}

/* Migrating birds glide across the sky and loop */
.fig-birds {
  animation: birdsMigrate 16s linear infinite;
}
@keyframes birdsMigrate {
  0%   { transform: translate(-60px, -20px); opacity: 0; }
  12%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { transform: translate(150px, 55px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fig-sun { animation: sunRise 0.01s both; }
  .fig-birds { animation-duration: 30s; }
}


/* ---------- service page: steps & FAQ ---------- */
.crumb { color: inherit; text-decoration: none; }
.crumb:hover { color: var(--brass); }
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.steps li {
  border-top: 1px solid var(--hairline);
  padding-top: 1.2rem;
}
.step-no {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--brass);
  display: block;
  margin-bottom: 0.6rem;
}
.steps h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}
.steps p { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

.faq { max-width: 760px; }
.faq details {
  border-top: 1px solid var(--hairline);
  padding-block: 1.2rem;
}
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.35rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  transition: color 0.3s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  color: var(--brass);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--brass); }
.faq details p { margin-top: 0.9rem; color: var(--ink-soft); max-width: 62ch; }

/* ---------- article template ---------- */
.frame-narrow { max-width: 760px; margin-inline: auto; padding-inline: clamp(1.4rem, 5vw, 3.5rem); }
.article-head { padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2rem, 4vw, 3rem); }
.article-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.08;
  margin-top: 1.6rem;
  text-wrap: balance;
}
.article-title em { color: var(--brass); }
.article-lede {
  margin-top: 1.4rem;
  font-size: 1.25rem;
  color: var(--ink-soft);
  font-weight: 300;
}
.article-byline { margin-top: 1.6rem; }
.article-body { padding-bottom: clamp(3rem, 6vw, 5rem); }
.article-body p { margin-block: 1.2rem; max-width: 66ch; }
.article-body h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-top: 3rem;
  margin-bottom: 0.6rem;
}
.article-body h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.4rem;
  margin-top: 2.2rem;
}
.article-body strong { font-weight: 500; }
.dropcap {
  float: left;
  font-family: "Cormorant Garamond", serif;
  font-size: 3.4em;
  line-height: 0.85;
  padding-right: 0.12em;
  color: var(--brass);
}
.pullquote {
  border-left: 2px solid var(--brass);
  margin-block: 2.4rem;
  padding-left: 1.6rem;
}
.pullquote p {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.35;
  color: var(--ink-soft);
}
.article-fig { margin-block: 2.4rem; text-align: center; }
.article-fig svg { width: 100%; max-width: 480px; color: var(--ink-soft); }
.article-fig .caption { display: block; margin-top: 0.6rem; }
.article-cta {
  background: var(--sand);
  border-block: 1px solid var(--hairline);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.article-cta p { max-width: none; }
.article-cta .btn { margin-top: 1.4rem; }


/* ============ Ajustes WordPress ============ */
/* Contenido Gutenberg dentro de .article-body */
.article-body ul, .article-body ol { margin: 1.2rem 0 1.2rem 1.4rem; max-width: 62ch; }
.article-body li { margin-block: 0.4rem; }
.article-body li::marker { color: var(--brass); }
.article-body a { color: inherit; text-decoration-color: var(--brass); text-underline-offset: 3px; }
.article-body a:hover { color: var(--brass); }
.article-body table { border-collapse: collapse; margin-block: 1.6rem; width: 100%; font-size: 0.95rem; }
.article-body th { background: var(--sand); font-weight: 500; text-align: left; }
.article-body th, .article-body td { border: 1px solid var(--hairline); padding: 0.6rem 0.8rem; }
.article-body blockquote:not(.pullquote) {
  border-left: 2px solid var(--brass); padding-left: 1.6rem; margin-block: 2rem;
  font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.3rem; color: var(--ink-soft);
}
.article-body img { max-width: 100%; height: auto; }
.article-body .wp-block-details, .article-body details {
  border-top: 1px solid var(--hairline); padding-block: 1rem; max-width: 66ch;
}
.article-body details summary {
  font-family: "Cormorant Garamond", serif; font-weight: 500; font-size: 1.25rem;
  cursor: pointer; list-style: none;
}
.article-body details summary::-webkit-details-marker { display: none; }
.article-body details summary::after { content: " +"; color: var(--brass); }
.article-body details[open] summary::after { content: " −"; }
/* Primera letra capitular automática en artículos */
.single .article-body > p:first-of-type::first-letter {
  float: left; font-family: "Cormorant Garamond", serif; font-size: 3.4em;
  line-height: 0.85; padding-right: 0.12em; color: var(--brass);
}
/* Alineaciones y utilidades WP */
.alignwide { max-width: 1180px; margin-inline: auto; }
.alignfull { width: 100%; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pagination { margin-top: 3rem; text-align: center; }
.pagination .nav-links a, .pagination .nav-links span { padding: 0.3rem 0.6rem; text-decoration: none; color: var(--ink-soft); }
.pagination .current { color: var(--brass); }
/* Menú WP: los <a> del nav heredan el estilo existente */
.nav-links .current-menu-item > a, .nav-links .current_page_item > a { color: var(--brass); }
