/* 3D Garden Designer: site and account pages. Tokens and rules: docs/DESIGN-DIRECTION.md */
@font-face { font-family: "Sorts Mill Goudy"; src: url("/app/fonts/sorts-mill-goudy-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/app/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/app/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  /* palette A "Meadow" (owner pick 10-04): deep garden green, marigold, a pale leaf page. The marigold buttons carry
     the dark green (white on marigold is 3.0:1, too low for their 16 px); --bronze is the deeper marigold the numbers,
     focus ring and stripes use (3.6:1 on the page) */
  --yew: #1d4a2c; --paper: #f5faf0; --bronze: #c96813; --marigold: #e8892b; --ink-on-marigold: #14301e; --box: #3d9a4a;
  --lavender: #7d5bc9; --slate: #46594b; --rule: #cfe4c6; --white: #ffffff;
  --serif: "Sorts Mill Goudy", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--yew); font: 17px/1.55 var(--sans); font-variant-numeric: lining-nums; }   /* Goudy's 1 reads as I otherwise */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: 41px; }
h2 { font-size: 27px; margin-top: 1.6em; }
h3 { font-size: 21px; }
p, li { max-width: 68ch; }
a { color: var(--yew); text-decoration-color: var(--bronze); text-underline-offset: 3px; }
a:hover { color: var(--yew); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 2px; border-radius: 2px; }

/* ---- site frame (home and the public pages) ---- */
.site-head { display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(18px, 5vw, 56px); background: var(--yew); color: var(--white); }
.site-head a, .site-head .wordmark, .site-head summary { color: var(--white); }
.wordmark { font-family: var(--serif); font-size: 23px; text-decoration: none; color: inherit; }
.site-head nav a { margin-inline-start: 22px; text-decoration: none; }
.site-head nav a:hover { text-decoration: underline; }
.site-head nav { display: flex; align-items: center; }
/* the account menu (coordinator on #47): disconnect the assistants, sign out */
.account { position: relative; margin-inline-start: 22px; }
.account summary { cursor: pointer; list-style: none; }
.account summary::-webkit-details-marker { display: none; }
.account summary::after { content: " \25BE"; font-size: .8em; }
.account-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 5; width: 290px; padding: 16px; background: var(--white); color: var(--yew);
  border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 10px 28px rgba(34, 55, 43, .14); }
.account-menu p { margin: 0 0 12px; font-size: 15px; color: var(--slate); }
.account-menu button { width: 100%; }
.account-menu button.link { width: auto; margin-top: 14px; }
.site-head nav a, .account summary { white-space: nowrap; }
@media (max-width: 480px) { .wordmark { font-size: 19px; } .site-head nav a, .account { margin-inline-start: 14px; } .site-head { gap: 10px; } }   /* one line on a phone */
/* a signed-out phone has four things in the bar (wordmark, Design your garden, Sign in, the globe): they do not fit one
   line at 390 px in Hebrew (#123 review P2), so on a narrow screen the nav takes its own row under the wordmark, its
   controls spread across it; nothing is hidden */
@media (max-width: 560px) {
  .site-head:has(.btn.cta) { flex-wrap: wrap; row-gap: 10px; }
  .site-head:has(.btn.cta) nav { flex: 1 1 100%; justify-content: space-between; }
  .site-head:has(.btn.cta) nav > :first-child { margin-inline-start: 0; }
}
/* the language globe on the server-made pages (contract L3b): site.css stands alone, so its own copy of
   the bar control. On the dark site head it follows the nav's links; on an account page's quiet card it
   hangs at the top right, beside the brand (site-i18n.ts puts it there). */
.site-head .globe { position: relative; margin-inline-start: 14px; }
.site-head .globe summary, .card > .globe summary { cursor: pointer; list-style: none; font-size: 18px; line-height: 1; padding: 7px 9px; border-radius: 8px; }
.site-head .globe summary::-webkit-details-marker, .card > .globe summary::-webkit-details-marker { display: none; }
.site-head .globe summary:hover { background: rgba(255, 255, 255, .16); }
.card { position: relative; }   /* the globe's anchor on the account pages */
.card > .globe { position: absolute; top: 2px; inset-inline-end: 22px; }
.card > .globe summary { color: var(--yew); }
.card > .globe summary:hover { background: var(--rule); }
.globe .menu-list { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); z-index: 6; display: flex; flex-direction: column; min-width: 180px;
  max-height: min(420px, 70vh); overflow: auto; padding: 6px; background: var(--white); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(34, 55, 43, .14); }
.globe .menu-list button { min-height: 40px; padding: 8px 12px; border: 0; border-radius: 6px; background: none; font-weight: 400; text-align: start; color: var(--yew); }
.globe .menu-list button.on { background: var(--paper); font-weight: 700; }
.globe .menu-list button:hover { background: var(--paper); filter: none; }
.page { padding: 8px clamp(18px, 5vw, 56px) 64px; max-width: 880px; }
.page.home { max-width: 1160px; }   /* the home page's steps and plan use the width; reading pages keep the measure */
.site-foot { display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 26px clamp(18px, 5vw, 56px) 40px; border-top: 1px solid var(--rule);
  color: var(--slate); font-size: 15px; }
.site-foot a { color: var(--slate); }
.site-foot .company { margin-inline-end: auto; }
.site-foot .note { flex-basis: 100%; max-width: none; margin: 0; font-size: 14px; }

/* home: the render is the hero; text sits in its lower third, left-aligned */
.hero { position: relative; min-height: min(78vh, 760px); display: flex; align-items: flex-end; color: var(--paper);
  background: #3b5a44 center / cover no-repeat; background-image: url("/branding/hero-garden.jpg"); }
.hero::after { content: ""; position: absolute; inset: 0;   /* a scrim under the text: the render's sky is pale */
  background: linear-gradient(90deg, rgba(20, 33, 25, .5) 0%, rgba(20, 33, 25, .16) 50%, rgba(20, 33, 25, 0) 75%),
    linear-gradient(180deg, rgba(20, 33, 25, .06) 0%, rgba(20, 33, 25, .22) 45%, rgba(20, 33, 25, .78) 100%); }
.hero { flex-direction: column; justify-content: space-between; align-items: stretch; }   /* the bar in flow at the top, the text at the bottom: they can never overlap, however the bar wraps (#123 review 6022782249) */
.hero .site-head { position: relative; z-index: 1; color: var(--paper); }
.hero .site-head a { color: var(--paper); }
.hero-text { position: relative; z-index: 1; padding: 12px clamp(18px, 5vw, 56px) clamp(28px, 6vh, 64px); max-width: 760px; }   /* 12px: air under the bar when the text fills the hero */
.hero h1 { font-size: clamp(36px, 6vw, 64px); margin-bottom: .35em; }
.hero p { font-size: 19px; color: #e4e9e1; margin: 0 0 22px; }
/* the home steps (contract L5, issue #122 item 1): one row each - its number in its own column, the sentence beside it */
.steps { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 760px; padding: 0; margin: 28px 0 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding-top: 14px; border-top: 2px solid var(--yew); }
.steps li::before { content: counter(step); grid-column: 1; font-family: var(--serif); font-size: 33px; line-height: 1.1; color: var(--bronze); }
.steps + .btn.cta { margin-top: 28px; }
.home .note { margin: 14px 0 0; color: var(--slate); font-size: 15px; }
/* the closing call to action: the same marigold button again, under the plan */
.cta-end { margin-top: 56px; padding: clamp(28px, 5vw, 48px); text-align: center; background: var(--white); border: 1px solid var(--rule); border-radius: 16px; }
.cta-end h2 { margin-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; margin-top: 48px; }
.split img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); background: var(--white); }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } h1 { font-size: 33px; } }

/* buttons: one primary per screen */
.btn, button { display: inline-block; font: 700 16px/1 var(--sans); padding: 15px 22px; min-height: 48px; border-radius: 6px;
  border: 1px solid var(--yew); background: transparent; color: var(--yew); cursor: pointer; text-decoration: none; }
.primary { background: var(--marigold); color: var(--ink-on-marigold); border-color: var(--marigold); }
.hero .primary { background: var(--marigold); color: var(--ink-on-marigold); border-color: var(--marigold); }
/* the one call to action (contract L5, issue #122 item 2): marigold, the most prominent thing on the page */
.btn.cta { background: var(--marigold); color: var(--ink-on-marigold); border-color: var(--marigold); font-size: 18px; padding: 16px 26px; }
.site-head .btn.cta { background: var(--marigold); color: var(--ink-on-marigold); border-color: var(--marigold); font-size: 15px; padding: 10px 16px; min-height: 44px; }   /* its own rule: .hero .site-head a would out-rank plain .btn.cta on the photo's head */
@media (max-width: 560px) { .site-head .btn.cta { padding: 8px 10px; font-size: 14px; } }   /* the header CTA stays on a phone, never hidden */
.hero-text .btn:not(.primary) { background: transparent; color: var(--paper); border: 1px solid var(--paper); margin-inline-start: 8px; }   /* the example tour reads second on the photo (L5): the marigold is the CTA's alone */
.hero-text a.link { color: var(--paper); text-decoration-color: var(--paper); margin-inline-start: 8px; }
.hero-text a.link:hover { color: var(--white); text-decoration-color: var(--white); }
.btn:hover, button:hover { filter: brightness(1.08); }
button.link { border: 0; padding: 0; min-height: 0; font-weight: 400; text-decoration: underline; text-decoration-color: var(--bronze); background: none; }

/* gardens list: plain rows, not cards */
.gardens { list-style: none; padding: 0; margin: 18px 0 32px; border-top: 1px solid var(--rule); }
.gardens li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 16px 0; border-bottom: 1px solid var(--rule); max-width: none; }
.gardens .name { font-family: var(--serif); font-size: 23px; margin-inline-end: auto; text-decoration: none; }
.gardens .when { color: var(--slate); font-size: 15px; }

/* ---- account pages (sign in, connect, confirm, reset): one quiet column ---- */
.card { max-width: 440px; margin: 7vh auto 40px; padding: 0 22px; }
.card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; text-decoration: none; color: inherit; }
.card .brand img { width: 40px; height: 40px; border-radius: 9px; }
.card .brand span { font-family: var(--serif); font-size: 23px; }
.card h1 { font-size: 27px; }
.card form { margin: 0; }
input { display: block; width: 100%; margin: 10px 0; padding: 13px 14px; font: 17px var(--sans); color: var(--yew); background: var(--white);
  border: 1px solid #b9c1b6; border-radius: 6px; }
input:focus { border-color: var(--bronze); outline: none; box-shadow: 0 0 0 3px rgba(149, 112, 67, .25); }
.card button { width: 100%; margin: 8px 0; }
.row { display: flex; gap: 10px; }
.tabs { display: flex; gap: 24px; margin: 4px 0 8px; border-bottom: 1px solid var(--rule); }
.tab { width: auto; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 0; min-height: 44px; font-weight: 400; color: var(--slate); background: none; }
.tab.active { color: var(--yew); border-bottom-color: var(--yew); font-weight: 700; }
.who { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.who span { overflow-wrap: anywhere; }
.hint, .footer { color: var(--slate); font-size: 15px; }
.msg { min-height: 1.4em; color: #8a2b1a; }
/* owner test 6: Undo right after a delete; Recently deleted */
.undo-note { display: flex; align-items: center; gap: 12px; width: fit-content; margin: 12px 0 0; padding: 8px 10px 8px 16px; border-radius: 999px;
  background: var(--ink, #22372b); color: #fff; }
.undo-note button { border: 0; border-radius: 999px; padding: 6px 14px; background: #fff; color: #22372b; font: inherit; font-weight: 700; cursor: pointer; }
.footer { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer a { color: var(--slate); }

/* Continue with Google: Google's neutral light button, with its "G" mark */
.btn.google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; box-sizing: border-box;
  background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.btn.google .glyph { font: 700 20px/1 Arial, sans-serif; color: #4285f4; }
p.or { text-align: center; color: var(--slate, #5a625b); margin: 6px 0 10px; }

/* Your gardens (owner tests 2 and 3): big cards, each with the garden's own 3D picture; a clear start when there are none */
.page:has(> .gardens-page) { max-width: 1160px; }
.gardens-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 8px 0 4px; }
.gardens-head h1 { margin: 0; }
.start { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 8px; }
.gardens-head .start { margin: 0; }
.start .big { font-size: 19px; padding: 18px 28px; }
.no-gardens { margin: 28px 0 48px; display: grid; grid-template-columns: 1.2fr 1fr; max-width: 1160px; overflow: hidden; background: var(--white); border: 1px solid var(--rule); border-radius: 16px; }
.empty-showcase { width: 100%; height: 100%; min-height: 380px; object-fit: cover; }
.empty-welcome { align-self: center; padding: clamp(24px, 4vw, 48px); }
@media (max-width: 760px) {
  .no-gardens { grid-template-columns: 1fr; }
  .empty-showcase { height: 250px; min-height: 0; }
}
.no-gardens h2 { margin-top: 0; font-size: 33px; }
.no-gardens p { color: var(--slate); }
.no-gardens .start { margin-bottom: 0; }
.no-gardens .msg { margin: 8px 0 0; }
.garden-cards { list-style: none; padding: 0; margin: 20px 0 48px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; }   /* 3 a row on a wide screen */
.garden-cards li { display: flex; flex-direction: column; max-width: none; padding-bottom: 18px; background: var(--white); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease; }
.garden-cards li:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(34, 55, 43, .12); }   /* a lift, nothing more (coordinator on #47) */
@media (prefers-reduced-motion: reduce) { .garden-cards li { transition: none; } .garden-cards li:hover { transform: none; } }
.garden-cards .pic { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #dfe5d8; text-decoration: none; }
.garden-cards .pic > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }   /* every card the same height */
.garden-cards .pic-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: #f4f6f1; color: var(--slate); font-size: 15px; }   /* nothing drawn yet (coordinator on #49) */
.garden-cards .pic-empty .pencil { font-size: 34px; line-height: 1; color: var(--bronze); }
/* the card menu (owner test 4): Rename, Duplicate, Delete, at the picture's top right */
.garden-cards li { position: relative; }
.card-menu { position: absolute; top: 10px; right: 10px; z-index: 2; }
.card-menu summary { display: grid; place-items: center; width: 40px; height: 36px; list-style: none; cursor: pointer; font-size: 20px; line-height: 1;
  background: rgba(241, 243, 238, .94); border: 1px solid var(--rule); border-radius: 999px; }
.card-menu summary::-webkit-details-marker { display: none; }
.card-menu > div { position: absolute; right: 0; top: calc(100% + 6px); display: flex; flex-direction: column; min-width: 170px; padding: 6px;
  background: var(--white); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 10px 28px rgba(34, 55, 43, .14); }
.card-menu > div button { min-height: 40px; padding: 8px 12px; border: 0; border-radius: 6px; background: none; font-weight: 400; text-align: left; }
.card-menu > div button:hover { background: var(--paper); filter: none; }
.card-menu [data-act="delete"] { color: #8a2b1a; }
.garden-dlg { width: min(420px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--rule); border-radius: 14px; color: var(--yew); }
.garden-dlg::backdrop { background: rgba(34, 55, 43, .35); }
.garden-dlg h2 { margin-top: 0; }
/* the close X (owner 10-04): upper right (upper left in a right-to-left page); Cancel stays beside the action */
.garden-dlg .dlg-x { position: absolute; top: 10px; inset-inline-end: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: var(--yew); font: 400 26px/1 system-ui, sans-serif; cursor: pointer; }
.garden-dlg .dlg-x:hover { background: var(--paper); }
.garden-dlg h2 { padding-inline-end: 40px; }
.garden-dlg input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; border: 1px solid var(--rule); border-radius: 6px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.danger { background: #8a2b1a; border-color: #8a2b1a; color: var(--white); }
.garden-cards .name { margin: 16px 20px 0; font-family: var(--serif); font-size: 25px; line-height: 1.2; text-decoration: none; }
.garden-cards .name:hover { text-decoration: underline; }
.garden-cards .when { margin: 2px 20px 0; color: var(--slate); font-size: 14px; }
.garden-cards .links { display: flex; gap: 20px; margin: 12px 20px 0; }

/* ---- the home page's carousel (owner 10-04): example gardens as plan, live 3D, realistic picture; the pattern is
   WalkMyPlan's home journey (walkmyplan web/src/styles .journey / .jtabs / .show-stage) ---- */
.examples { padding: 40px clamp(18px, 5vw, 56px) 8px; }
.ex-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.ex-head h2 { margin: 0; }
.ex-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-pick { font: 600 15px/1 var(--sans); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--rule); background: var(--white); color: var(--yew); cursor: pointer; }
.ex-pick.on { background: var(--yew); border-color: var(--yew); color: var(--white); }
.ex-show { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px; align-items: start; }
.ex-steps { display: flex; flex-direction: column; gap: 10px; }
.ex-step { text-align: left; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--rule); background: var(--white); color: var(--yew); cursor: pointer; font: 15px/1.35 var(--sans); }
.ex-step b { display: block; font-size: 17px; margin-bottom: 4px; }
.ex-step span { color: var(--slate); }
.ex-step.on { border-color: var(--bronze); box-shadow: inset 4px 0 0 var(--bronze); }
.ex-links { margin: 6px 0 0; }
.ex-stage { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #e7ebe3; }
.ex-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .5s; pointer-events: none; }
.ex-slide.on { opacity: 1; pointer-events: auto; }
.ex-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-slide[data-step="plan"] img { object-fit: contain; background: #f7f8f4; }
.ex-frame, .ex-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ex-frame iframe { opacity: 0; transition: opacity .6s; }
.ex-frame iframe.ready { opacity: 1; }
.ex-live { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border: 0; border-radius: 999px;
  background: rgba(20, 48, 30, .88); color: #fff; font: 600 16px/1 var(--sans); cursor: pointer; box-shadow: 0 4px 18px rgba(0, 0, 0, .3); }
.ex-live::before { content: ""; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent currentColor; }
.ex-live[hidden] { display: none; }
@media (max-width: 760px) { .ex-show { grid-template-columns: 1fr; } .ex-steps { order: 2; } }
@media (prefers-reduced-motion: reduce) { .ex-slide, .ex-frame iframe { transition: none; } }

/* right-to-left (Hebrew, Arabic): the margins above use logical properties and flex rows follow the
   direction already; these few place something on a physical side, so they flip by hand */
[dir="rtl"] .account-menu, [dir="rtl"] .card-menu > div { right: auto; left: 0; }
[dir="rtl"] .card-menu { right: auto; left: 10px; }
[dir="rtl"] .hero::after { transform: scaleX(-1); }   /* the scrim darkens the side the text reads from */
[dir="rtl"] .ex-step.on { box-shadow: inset -4px 0 0 var(--bronze); }
