/* apertrail.com: one stylesheet for every page.
   Layout and type as nodatrail.com; colours are APERtrail's: the silver of its mark
   (TripsAccent #D4D2E4 in Trail.Ui/Theme/Tokens.axaml) and the greys and steel blue of the icon.
   Change a colour here, nowhere else. */

:root {
  color-scheme: light;

  /* page */
  --bg: #ffffff;
  --bg-alt: #f4f4f6;
  --text: #1d1e23;
  --text-soft: #4a4b54;
  --text-muted: #6a6b75;
  --line: #e3e3e8;

  /* the icon's dark ring, used for the hero, the band and the photo frames */
  --ground: #18191e;
  --surface: #25272e;
  --on-ground: #ecebf2;
  --on-ground-soft: #c9c8d6;
  --on-ground-muted: #a7a5ab;
  --line-dark: #3d3e47;

  /* APERtrail's tones: one per section */
  --silver: #d4d2e4;   /* the mark; Reisen */
  --mist: #b9b8c9;     /* Fotos */
  --steel: #a7a5ab;    /* the aperture blades; Fotospots */
  --blue: #8e9bb3;     /* the road's steel blue; Mit NODAtrail */
  --graphite: #4c4c54; /* accents on white, where silver would be too faint */

  --accent: var(--silver);

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;

  --wrap: 1160px;
  --gutter: 24px;
  --radius: 14px;
}

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-display: swap; src: url("fonts/Fraunces-SemiBold.woff2") format("woff2"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 10; }

/* header: logo left, menu right */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-size: 1.15rem; letter-spacing: .01em; }
.brand img { width: 40px; height: 40px; }
.brand small { display: block; font-weight: 400; font-size: .72rem; color: var(--text-muted); letter-spacing: .04em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--text-soft); font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }
.nav .lang { margin-left: 8px; border: 1px solid var(--line); font-size: .85rem; }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .nav { display: flex; }
@media (max-width: 860px) {
  .site-header > .wrap > .nav { display: none; }
  .menu { display: block; }
  .menu .nav { display: none; position: absolute; right: var(--gutter); left: var(--gutter); top: 64px; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
  .menu .nav .lang { margin: 4px 0 0; }
}

/* hero: the dark ring of the icon with a silver glow */
.hero { background: var(--ground); color: var(--on-ground); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 900px; height: 900px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero.solo .wrap { grid-template-columns: 1fr; max-width: 860px; }
.hero p.lead { color: var(--on-ground-soft); font-size: 1.15rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
/* the road in the icon: a dashed silver line */
.trail { height: 3px; width: 120px; margin: 0 0 24px; background: repeating-linear-gradient(90deg, var(--silver) 0 14px, transparent 14px 22px); border-radius: 3px; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; } }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; text-decoration: none; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem; border: 1px solid transparent; }
.btn.primary { background: var(--text); color: #fff; }
.btn.ghost { border-color: var(--line); color: var(--text); }
.hero .btn.primary, .band .btn.primary { background: var(--silver); color: #18191e; }
.hero .btn.ghost, .band .btn.ghost { border-color: var(--line-dark); color: var(--on-ground); }

/* photos and screenshots: a dark frame that shows the placeholder until the file exists */
.photo { margin: 0; }
.photo .frame { position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-dark); overflow: hidden; }
.photo.wide .frame { aspect-ratio: 16 / 9; box-shadow: 0 24px 60px rgba(10,10,20,.35); }
.photo.app .frame { aspect-ratio: 16 / 10; box-shadow: 0 24px 60px rgba(10,10,20,.28); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.photo.app img { object-position: top left; }
.photo .ph { position: absolute; inset: 12px; border: 1.5px dashed var(--line-dark); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 12px; color: var(--on-ground-muted); font-size: .85rem; }
.photo .ph b { font-family: ui-monospace, Menlo, monospace; font-weight: 600; color: var(--accent); letter-spacing: .05em; }
.photo figcaption { font-size: .88rem; color: var(--text-muted); margin-top: 12px; }
.hero .photo figcaption { color: var(--on-ground-muted); }

/* sections */
section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p { color: var(--text-soft); font-size: 1.1rem; }
.feature { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; }
.feature + .feature { margin-top: 96px; }
.feature.flip > :first-child { order: 2; }
.feature p { color: var(--text-soft); }
.feature h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
@media (max-width: 880px) { .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; } .feature.flip > :first-child { order: 0; } section { padding: 64px 0; } }

/* the four sections on the home page, each in its own silver tone */
.section-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.section-card { display: block; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; transition: transform .15s, box-shadow .15s; }
.section-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20,20,30,.08); }
.section-card::before { content: ""; position: absolute; left: 24px; top: 0; width: 44px; height: 4px; border-radius: 0 0 4px 4px; background: color-mix(in srgb, var(--m) 70%, var(--graphite)); }
.section-card h3 { margin: 6px 0 6px; }
.section-card p { color: var(--text-soft); font-size: .95rem; margin: 0; }

/* trips and spots: picture on top, text below */
.entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.entries.two { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
@media (max-width: 520px) { .entries.two { grid-template-columns: 1fr; } }
.entry { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.entry .photo .frame { border-radius: 0; border: 0; }
.entry .body { padding: 20px 22px 22px; }
.entry .meta { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.entry h3 { margin-bottom: 6px; }
.entry p { color: var(--text-soft); font-size: .95rem; margin: 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 14px 0 0; font-size: .9rem; }
.facts dt { color: var(--text-muted); }
.facts dd { margin: 0; color: var(--text); }

/* gallery: a plain grid of tiles */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 45%), 1fr)); gap: 12px; }
.tile { display: block; }
.tile .photo .frame { border-radius: 10px; transition: transform .15s; }
.tile:hover .photo .frame { transform: scale(1.015); }

/* map placeholder on the spots page */
.map { aspect-ratio: 21 / 9; border-radius: var(--radius); background: var(--surface); border: 1.5px dashed var(--line-dark); display: grid; place-items: center; padding: 24px; margin-bottom: 40px; text-align: center; color: var(--on-ground-muted); font-size: .92rem; }
.map span { max-width: 520px; }
@media (max-width: 520px) { .map { aspect-ratio: 4 / 3; } }

/* small cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.card p { color: var(--text-soft); font-size: .95rem; margin: 0; }
.card .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--graphite); margin-bottom: 14px; }

/* the dark band before the footer */
.band { background: var(--ground); color: var(--on-ground); }
.band .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.band h2 { margin: 0 0 6px; }
.band p { color: var(--on-ground-soft); margin: 0; max-width: 640px; }
.band .buttons { margin-top: 0; }

/* footer */
.site-footer { background: #111216; color: var(--on-ground-muted); padding: 64px 0 40px; font-size: .92rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 880px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--on-ground); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 12px; }
.site-footer a { color: var(--on-ground-soft); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .legal { border-top: 1px solid #26272e; margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.site-footer .brand { color: var(--on-ground); margin-bottom: 14px; }
.site-footer .brand small { color: var(--on-ground-muted); }

/* legal pages */
.legal-text { max-width: 760px; }
.legal-text h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal-text h2:first-child { margin-top: 0; }
.legal-text p { color: var(--text-soft); }
mark.todo { background: #fff1d6; color: #7a4a00; padding: 0 4px; border-radius: 4px; }
