/* Thalasso & Myth — Ionian Folio magazine */
:root {
  --ink: #1F1812;
  --mute: #5C5348;
  --foam: #F4EFE6;
  --parchment: #E8DFD0;
  --paper: #FBF7F0;
  --ionian: #1A4554;
  --ionian-deep: #0F2E38;
  --olive: #4A5C32;
  --clay: #A65D3B;
  --sand: #D4C4A8;
  --line: rgba(31, 24, 18, 0.12);
  --display: "Petrona", Georgia, "Times New Roman", serif;
  --body: "DM Sans", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 45% at 100% 0%, rgba(26, 69, 84, 0.1), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(74, 92, 50, 0.08), transparent 50%),
    linear-gradient(180deg, var(--foam) 0%, var(--parchment) 55%, #E4D9C6 100%);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }
ul { list-style: none; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ionian);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* —— Masthead —— */
.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.masthead-inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 0.85rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ionian-deep);
}
.brand span {
  display: block;
  font-size: 0.55em;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  margin-top: 0.15rem;
}

.nav-links {
  display: none;
  gap: 1.35rem;
  align-items: center;
}
@media (min-width: 860px) {
  .nav-links { display: flex; }
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  transition: color 0.25s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ionian); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.4rem;
}
@media (min-width: 860px) {
  .nav-toggle { display: none; }
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer {
  display: none;
  border-top: 1px solid var(--line);
  padding: 1rem 1.25rem 1.25rem;
  background: var(--foam);
}
.nav-drawer.open { display: block; }
.nav-drawer a {
  display: block;
  padding: 0.7rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
@media (min-width: 860px) {
  .nav-drawer { display: none !important; }
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  place-items: end start;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--ionian-deep) center/cover no-repeat;
  transform: scale(1.05);
  animation: tide-drift 20s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(15, 46, 56, 0.82) 0%, rgba(15, 46, 56, 0.35) 48%, rgba(15, 46, 56, 0.55) 100%),
    linear-gradient(180deg, transparent 30%, rgba(15, 46, 56, 0.9) 100%);
}
@keyframes tide-drift {
  to { transform: scale(1.12) translateY(-2%); }
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem);
  max-width: 38rem;
}

.hero-issue {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1rem;
  opacity: 0;
  animation: rise-in 0.8s var(--ease) 0.15s forwards;
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.8rem, 9vw, 5.2rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.1rem;
  opacity: 0;
  animation: rise-in 0.9s var(--ease) 0.28s forwards;
}
.hero-brand em {
  font-style: italic;
  font-weight: 500;
  color: var(--sand);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 500;
  line-height: 1.25;
  max-width: 22ch;
  margin-bottom: 0.85rem;
  opacity: 0;
  animation: rise-in 0.9s var(--ease) 0.4s forwards;
}

.hero-lead {
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  max-width: 38ch;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: rise-in 0.9s var(--ease) 0.52s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  background: var(--clay);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.25s, transform 0.25s var(--ease);
  opacity: 0;
  animation: rise-in 0.9s var(--ease) 0.64s forwards;
}
.hero-cta:hover {
  background: var(--olive);
  transform: translateY(-2px);
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* —— Tide dial (unique UX) —— */
.tide-section {
  width: min(100% - 2rem, var(--max));
  margin: -2.5rem auto 3rem;
  position: relative;
  z-index: 5;
}

.tide-panel {
  background: var(--ionian-deep);
  color: var(--foam);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: 0 24px 50px rgba(15, 46, 56, 0.28);
}

.tide-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.tide-head p {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand);
}
.tide-head h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  max-width: 28ch;
}

.tide-track {
  position: relative;
  height: 72px;
  margin: 0.5rem 0 1rem;
}
.tide-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.tide-points {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 0.25rem;
}
.tide-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(212, 196, 168, 0.45);
  background: rgba(244, 239, 230, 0.06);
  color: var(--sand);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.3s, transform 0.3s var(--ease), border-color 0.3s;
}
.tide-btn:hover,
.tide-btn[aria-pressed="true"] {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
  transform: translateY(-4px);
}

.tide-preview {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(244, 239, 230, 0.12);
  min-height: 4.5rem;
}
.tide-preview .label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
}
.tide-preview strong {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
}
.tide-preview span {
  font-size: 0.92rem;
  color: rgba(244, 239, 230, 0.75);
}

/* —— Sections —— */
.section {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 4rem;
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}
.section-head .eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.45rem;
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
}
.section-head p {
  color: var(--mute);
  font-size: 1.02rem;
}

/* —— Featured —— */
.featured {
  display: grid;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(31, 24, 18, 0.1);
}
@media (min-width: 820px) {
  .featured { grid-template-columns: 1.15fr 1fr; }
}
.featured-media {
  min-height: 260px;
  overflow: hidden;
}
.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
  transition: transform 0.8s var(--ease);
}
.featured:hover .featured-media img { transform: scale(1.04); }
.featured-body {
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-meta {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.65rem;
}
.featured-body h3 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.12;
  margin-bottom: 0.75rem;
  max-width: 16ch;
}
.featured-body p {
  color: var(--mute);
  margin-bottom: 1.25rem;
  max-width: 42ch;
}
.read-link {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ionian);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.read-link::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}
.featured:hover .read-link::after,
.folio-card:hover .read-link::after { transform: translateX(4px); }

/* —— Folio grid —— */
.folio-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .folio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .folio-grid { grid-template-columns: repeat(3, 1fr); }
}

.folio-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.folio-card:hover {
  transform: translateY(-4px);
  border-color: rgba(26, 69, 84, 0.35);
  background: #fff;
}
.folio-card-media {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.folio-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.folio-card:hover .folio-card-media img { transform: scale(1.05); }
.folio-card-body {
  padding: 1.15rem 1.2rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.folio-card-body .cat {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.45rem;
}
.folio-card-body h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.folio-card-body p {
  font-size: 0.92rem;
  color: var(--mute);
  margin-bottom: 1rem;
  flex: 1;
}

/* —— Pull quote band —— */
.quote-band {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 4rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--olive);
  color: var(--foam);
  text-align: center;
}
.quote-band blockquote {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  max-width: 28ch;
  margin: 0 auto 1rem;
}
.quote-band cite {
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* —— Article page —— */
.article-hero {
  width: min(100% - 2rem, var(--max));
  margin: 1.5rem auto 2rem;
}
.article-hero .cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.6rem;
}
.article-hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 0.85rem;
}
.article-hero .deck {
  font-size: 1.1rem;
  color: var(--mute);
  max-width: 48ch;
  margin-bottom: 1.25rem;
}
.article-meta {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 1.5rem;
}
.article-cover {
  aspect-ratio: 21/9;
  overflow: hidden;
  border: 1px solid var(--line);
}
@media (max-width: 640px) {
  .article-cover { aspect-ratio: 4/3; }
}
.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body {
  width: min(100% - 2rem, 680px);
  margin: 0 auto 3.5rem;
}
.article-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: #2A241C;
}
.article-body p:first-of-type {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--mute);
}
.article-body h2 {
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 600;
  margin: 2.25rem 0 0.85rem;
  line-height: 1.2;
}
.article-body .pull {
  font-family: var(--display);
  font-size: 1.45rem;
  font-style: italic;
  line-height: 1.35;
  color: var(--ionian);
  border-left: 3px solid var(--clay);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 2rem 0;
  max-width: 28ch;
}
.article-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.article-nav a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ionian);
}

/* —— About / legal —— */
.page-hero {
  width: min(100% - 2rem, var(--max));
  margin: 2rem auto 2.5rem;
  max-width: 40rem;
}
.page-hero .eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.5rem;
}
.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.08;
  margin-bottom: 0.75rem;
}
.page-hero p {
  color: var(--mute);
  font-size: 1.08rem;
}

.about-grid {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 3.5rem;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 800px) {
  .about-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}
.about-prose p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.15rem;
  color: #2A241C;
}
.about-aside {
  background: var(--ionian-deep);
  color: var(--foam);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.about-aside h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  margin-bottom: 0.85rem;
}
.about-aside p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(244, 239, 230, 0.85);
  margin-bottom: 1rem;
}
.about-aside ul li {
  font-size: 0.9rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(244, 239, 230, 0.12);
  color: var(--sand);
}

.legal-page {
  width: min(100% - 2rem, 720px);
  margin: 2rem auto 3.5rem;
}
.legal-page h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.legal-meta {
  font-size: 0.8rem;
  color: var(--mute);
  margin-bottom: 1.75rem;
}
.legal-page h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}
.legal-page h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}
.legal-page p,
.legal-page li {
  font-size: 0.98rem;
  line-height: 1.75;
  color: #2A241C;
  margin-bottom: 0.85rem;
}
.legal-page ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.legal-page a {
  color: var(--ionian);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-box {
  background: rgba(26, 69, 84, 0.06);
  border: 1px solid var(--line);
  padding: 1.15rem 1.25rem;
  margin: 1.25rem 0;
}

/* —— Footer —— */
.site-footer {
  background: var(--ionian-deep);
  color: var(--foam);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}
.footer-inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-brand .brand {
  color: var(--foam);
  margin-bottom: 0.75rem;
}
.footer-brand .brand span { color: var(--sand); }
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(244, 239, 230, 0.72);
  max-width: 36ch;
}
.footer-col h4 {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 0.85rem;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: rgba(244, 239, 230, 0.78);
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(244, 239, 230, 0.12);
  font-size: 0.75rem;
  color: rgba(244, 239, 230, 0.55);
}
.footer-bottom a { color: var(--sand); }

/* —— Cookie —— */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--foam);
  padding: 1rem 1.25rem;
  transform: translateY(110%);
  transition: transform 0.4s var(--ease);
}
.cookie-banner.visible { transform: none; }
.cookie-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-inner p {
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 52ch;
}
.cookie-inner a {
  color: var(--sand);
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}
.cookie-actions button {
  padding: 0.65rem 1.1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cookie-reject {
  border: 1px solid rgba(244, 239, 230, 0.35);
  color: var(--foam);
}
.cookie-accept {
  background: var(--clay);
  color: #fff;
}

.back-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ionian);
  color: #fff;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 50;
  box-shadow: 0 8px 20px rgba(15, 46, 56, 0.3);
}
.back-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-top:hover { transform: translateY(-2px); }

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
